From c0d3e6a3b639104a262b34be3e5753dd8f5dcdac Mon Sep 17 00:00:00 2001 From: yangsheng Date: Tue, 15 Oct 2013 00:59:04 +0800 Subject: [PATCH] LU-3373 tests: small fixes for sanity tests --test_24d fix typo --test_24A cleanup work directory in advance --test_27k make up message more clear --test-framework enforce LANG to en_US Signed-off-by: yang sheng Change-Id: I61c227028b44a198482b4e5c9a9f715af08c3e5f Reviewed-on: http://review.whamcloud.com/7948 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 7 ++++--- lustre/tests/test-framework.sh | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index c4035d4..b012490 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -788,7 +788,7 @@ run_test 24c "rename directory to non-existent target" test_24d() { test_mkdir $DIR/$tdir test_mkdir $DIR/$tdir/d$testnum.1 - test_mkdir $DIR/$tdir/d$ttestnum.2 + test_mkdir $DIR/$tdir/d$testnum.2 mrename $DIR/$tdir/d$testnum.1 $DIR/$tdir/d$testnum.2 $CHECKSTAT -a $DIR/$tdir/d$testnum.1 || error "d$testnum.1 exists" $CHECKSTAT -t dir $DIR/$tdir/d$testnum.2 || error "d$testnum.2 not dir" @@ -1126,6 +1126,7 @@ run_test 24z "rename one remote dir to another remote dir should fail" test_24A() { # LU-3182 local NFILES=5000 + rm -rf $DIR/$tdir mkdir -p $DIR/$tdir createmany -m $DIR/$tdir/$tfile $NFILES local t=`ls $DIR/$tdir | wc -l` @@ -1283,10 +1284,10 @@ test_27k() { # bug 2844 [ ! -d $DIR/d27 ] && test_mkdir -p $DIR d27 $SETSTRIPE -S 67108864 $FILE || error "setstripe failed" BLKSIZE=`stat $FILE | awk '/IO Block:/ { print $7 }'` - [ $BLKSIZE -le $LL_MAX_BLKSIZE ] || error "$BLKSIZE > $LL_MAX_BLKSIZE" + [ $BLKSIZE -le $LL_MAX_BLKSIZE ] || error "1:$BLKSIZE > $LL_MAX_BLKSIZE" dd if=/dev/zero of=$FILE bs=4k count=1 BLKSIZE=`stat $FILE | awk '/IO Block:/ { print $7 }'` - [ $BLKSIZE -le $LL_MAX_BLKSIZE ] || error "$BLKSIZE > $LL_MAX_BLKSIZE" + [ $BLKSIZE -le $LL_MAX_BLKSIZE ] || error "2:$BLKSIZE > $LL_MAX_BLKSIZE" } run_test 27k "limit i_blksize for broken user apps =============" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 50bb524..47dfe99 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -5,6 +5,7 @@ trap 'print_summary && touch $TF_FAIL && \ set -e #set -x +export LANG=en_US export EJOURNAL=${EJOURNAL:-""} export REFORMAT=${REFORMAT:-""} export WRITECONF=${WRITECONF:-""} -- 1.8.3.1