X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=5026f661fcec89041e3605db839867e6956543f9;hb=f70a6f551025eddc14d1e69935b85c95e5dcac64;hp=5b3011884959e063d800abeb2d64a68e63e64937;hpb=7ce25baf31572ceb2b1d2ff4b13b3958004c9a59;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 5b30118..5026f66 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -14,6 +14,8 @@ ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"42b"} SRCDIR=`dirname $0` PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH +TMP=${TMP:-/tmp} + CHECKSTAT=${CHECKSTAT:-"checkstat -v"} CREATETEST=${CREATETEST:-createtest} LFIND=${LFIND:-lfind} @@ -27,6 +29,8 @@ TRUNCATE=${TRUNCATE:-truncate} MUNLINK=${MUNLINK:-munlink} SOCKETSERVER=${SOCKETSERVER:-socketserver} SOCKETCLIENT=${SOCKETCLIENT:-socketclient} +IOPENTEST1=${IOPENTEST1:-iopentest1} +IOPENTEST2=${IOPENTEST2:-iopentest2} if [ $UID -ne 0 ]; then RUNAS_ID="$UID" @@ -697,8 +701,8 @@ test_27e() { if [ ! -d $DIR/d27 ]; then mkdir $DIR/d27 fi - $LSTRIPE $DIR/d27/f12 8192 1 2 || error - $LSTRIPE $DIR/d27/f12 8192 1 2 && error + $LSTRIPE $DIR/d27/f12 8192 0 2 || error + $LSTRIPE $DIR/d27/f12 8192 0 2 && error $CHECKSTAT -t file $DIR/d27/f12 || error } run_test 27e "lstripe existing file (should return error) ======" @@ -707,7 +711,7 @@ test_27f() { if [ ! -d $DIR/d27 ]; then mkdir $DIR/d27 fi - $LSTRIPE $DIR/d27/fbad 100 1 1 && error + $LSTRIPE $DIR/d27/fbad 100 0 1 && error dd if=/dev/zero of=$DIR/d27/f12 bs=4k count=4 || error $LFIND $DIR/d27/fbad || error } @@ -728,6 +732,14 @@ test_27g() { } run_test 27g "test lfind =======================================" +test_27j() { + if [ ! -d $DIR/d27 ]; then + mkdir $DIR/d27 + fi + $LSTRIPE $DIR/d27/f27j 8192 $STRIPECOUNT 1 && error || true +} +run_test 27j "lstripe with bad stripe offset (should return error)" + test_28() { mkdir $DIR/d28 $CREATETEST $DIR/d28/ct || error @@ -1480,7 +1492,7 @@ run_test 52b "immutable flag test ==============================" test_53() { for i in /proc/fs/lustre/osc/OSC*mds1 ; do - ostname=`echo $i | cut -d _ -f 3-4` + ostname=`echo $i | cut -d _ -f 3-4 | sed -e s/_mds1//` ost_last=`cat /proc/fs/lustre/obdfilter/$ostname/last_id` mds_last=`cat $i/prealloc_last_id` echo "$ostname.last_id=$ost_last ; MDS.last_id=$mds_last" @@ -1534,6 +1546,22 @@ test_54d() { } run_test 54d "fifo device works in lustre" +test_55() { + for i in `ls $TMP|grep -E 'mds|ost'` ; do + rm -rf $DIR/d55 + mkdir $DIR/d55 + mount -o loop,iopen $TMP/$i $DIR/d55 + touch $DIR/d55/foo + $IOPENTEST1 $DIR/d55/foo $DIR/d55 + $IOPENTEST2 $DIR/d55 + echo "check for $TMP/$i. Please wait..." + sleep 6 + rm -rf $DIR/d55/* + umount $DIR/d55 + done +} +run_test 55 "check iopen_connect_dentry()=======================" + test_59() { echo "touch 130 files" for i in `seq 1 130` ; do @@ -1576,6 +1604,25 @@ test_62() { } run_test 62 "verify obd_match failure doesn't LBUG (should -EIO)" +# bug 2319 - osic_wait() interrupted causes crash because of invalid waitq. +test_63() { + for i in /proc/fs/lustre/osc/*/max_dirty_mb ; do + echo 0 > $i + done + for i in `seq 10` ; do + dd if=/dev/zero of=$DIR/syncwrite_testfile bs=8k & + sleep 5 + kill $! + sleep 1 + done + + for i in /proc/fs/lustre/osc/*/max_dirty_mb ; do + echo $[ 64 ] > $i + done + true +} +run_test 63 "Verify osic_wait interruption does not crash" + # on the LLNL clusters, runas will still pick up root's $TMP settings, # which will not be writable for the runas user, and then you get a CVS # error message with a corrupt path string (CVS bug) and panic.