diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index e43528c01a605b66ea509f20e5ae65ea679617bd..35048b2f8f959bf4a78633cc5ebe45d8b684c198 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -6,6 +6,7 @@ set -e PATH=`dirname $0`/../utils:$PATH +[ -z "$CONFIG" -a "$NAME" ] && CONFIGS=$NAME [ "$CONFIGS" ] || CONFIGS="local" #"local lov" [ "$MAX_THREADS" ] || MAX_THREADS=20 RAMKB=`awk '/MemTotal:/ { print $2 }' /proc/meminfo` diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 757d9cccf96b8b568cadd5bd0728ea290190eb82..bfd73588a9ceef30e004ab1aa1d06d9102d1fef2 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -883,7 +883,7 @@ test_26() { # we need modules before mount for sysctl, so make sure... [ -z "$(lsmod | grep lustre)" ] && modprobe lustre #define OBD_FAIL_MDS_FS_SETUP 0x135 - sysctl -w lustre.fail_loc=0x80000135 + do_facet mds "sysctl -w lustre.fail_loc=0x80000135" start_mds && echo MDS started && return 1 cat $LPROC/devices DEVS=$(cat $LPROC/devices | wc -l) diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index 8bc2441bf5ce259e060d675596b215cd8f6fee26..bf472ddcd2aef3ada1a638026f509a1a87e1a9f4 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -832,13 +832,13 @@ run_test 55 "ost_brw_read/write drops timed-out read/write request" test_56() { # b=11277 #define OBD_FAIL_MDS_RESEND 0x136 - touch $MOUNT/$tfile + touch $DIR/$tfile do_facet mds sysctl -w lustre.fail_loc=0x80000136 - stat $MOUNT/$tfile + stat $DIR/$tfile do_facet mds sysctl -w lustre.fail_loc=0 - rm -f $MOUNT/$tfile + rm -f $DIR/$tfile } -run_test 56 "replace lock race" +run_test 56 "do not allow reconnect to busy exports" test_57_helper() { # no oscs means no client or mdt diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index 1881cee10ee5caf5add695bff02e19d0b61f3d4e..820a97b584e1929d31ff00d70b8c9b842c7ae05c 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -65,7 +65,6 @@ test_2() { checkstat $MOUNT2/adir && return 2 return 0 } - run_test 2 "|X| mkdir adir" test_3() { @@ -81,7 +80,6 @@ test_3() { checkstat $MOUNT2/adir/bdir && return 4 return 0 } - run_test 3 "|X| mkdir adir, mkdir adir/bdir " test_4() { @@ -99,7 +97,6 @@ test_4() { checkstat $MOUNT2/adir/bdir && return 5 return 0 } - run_test 4 "|X| mkdir adir (-EEXIST), mkdir adir/bdir " diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index bf11532299ee0fb1185a7886a437ffd8a8650284..32ffd8bf8d1839bdc7e479c33d12feb702ba75be 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -744,7 +744,7 @@ test_33() { fail_abort mds # this file should be gone, because the replay was aborted $CHECKSTAT -t file $DIR/$tfile && return 3 - $CHECKSTAT -t file $DIR/$tfile-* && return 3 + $CHECKSTAT -t file $DIR/$tfile-* && return 4 unlinkmany $DIR/$tfile-%d 0 100 return 0 } diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 6b35da25d50e6e4ceaaaf1ca03bf4b3b6957b88c..8c78a74826db02fe35d7e0b24dbbe8b9363d9bd9 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -11,7 +11,7 @@ ONLY=${ONLY:-"$*"} ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27o 27q 42a 42b 42c 42d 45 68 75"} # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! -[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 24o 27m 36f 36g 51b 51c 63 64b 71 73 77 101 115" +[ "$SLOW" = "no" ] && EXCEPT="$EXCEPT 24o 27m 36f 36g 51b 51c 63 64b 71 73 101 115" # Tests that fail on uml, maybe elsewhere, FIXME CPU=`awk '/model/ {print $4}' /proc/cpuinfo` @@ -2550,7 +2550,7 @@ run_test 63b "async write errors should be returned to fsync ===" test_64a () { df $DIR - grep "[0-9]" $LPROC/osc/*[oO][sS][cC]*/cur* + grep "[0-9]" $LPROC/osc/*[oO][sS][cC][_-]*/cur* } run_test 64a "verify filter grant calculations (in kernel) =====" @@ -2676,9 +2676,9 @@ test_67() { # bug 3285 - supplementary group fails on MDS, passes on client run_test 67 "supplementary group failure (should return error) =" cleanup_67b() { + set +vx trap 0 echo NONE > $LPROC/mds/$MDS/group_upcall - set +vx } test_67b() { # bug 3285 - supplementary group fails on MDS, passes on client @@ -2695,7 +2695,6 @@ test_67b() { # bug 3285 - supplementary group fails on MDS, passes on client chgrp $T67_UID $DIR/$tdir echo `which l_getgroups` > $LPROC/mds/$MDS/group_upcall l_getgroups -d $T67_UID - $RUNAS -u $T67_UID -g $((T67_UID + 1)) -G8,9 id $RUNAS -u $T67_UID -g 999 -G8,9,$T67_UID touch $DIR/$tdir/$tfile || \ error "'touch $DIR/$tdir/$tfile' failed" [ -f $DIR/$tdir/$tfile ] || error "$DIR/$tdir/$tfile create error" @@ -3008,31 +3007,34 @@ set_checksums() } F77_TMP=$TMP/f77-temp +F77SZ=8 +setup_f77() { + dd if=/dev/urandom of=$F77_TMP bs=1M count=$F77SZ || \ + error "error writing to $F77_TMP" +} + test_77a() { # bug 10889 + [ ! -f $F77_TMP ] && setup_f77 set_checksums 1 - if [ ! -f $F77_TMP ]; then - dd if=/dev/urandom of=$F77_TMP bs=1M count=8 || \ - error "error writing to $F77_TMP" - fi - dd if=$F77_TMP of=$DIR/$tfile bs=1M count=8 || error "dd error" + dd if=$F77_TMP of=$DIR/$tfile bs=1M count=$F77SZ || error "dd error" set_checksums 0 } run_test 77a "normal checksum read/write operation =============" test_77b() { # bug 10889 - [ ! -f $F77_TMP ] && echo "requires 77a" && return + [ ! -f $F77_TMP ] && setup_f77 #define OBD_FAIL_OSC_CHECKSUM_SEND 0x409 sysctl -w lustre.fail_loc=0x80000409 set_checksums 1 - dd if=$F77_TMP of=$DIR/f77b bs=8M count=1 conv=sync || \ - error "write error: rc=$?" + dd if=$F77_TMP of=$DIR/f77b bs=1M count=$F77SZ conv=sync || \ + error "dd error: $?" sysctl -w lustre.fail_loc=0 set_checksums 0 } run_test 77b "checksum error on client write ====================" test_77c() { # bug 10889 - [ ! -f $F77_TMP ] && echo "requires 77a" && return + [ ! -f $DIR/f77b ] && log "requires 77b - skipping" && return cancel_lru_locks osc #define OBD_FAIL_OSC_CHECKSUM_RECEIVE 0x408 sysctl -w lustre.fail_loc=0x80000408 @@ -3047,18 +3049,21 @@ test_77d() { # bug 10889 #define OBD_FAIL_OSC_CHECKSUM_SEND 0x409 sysctl -w lustre.fail_loc=0x80000409 set_checksums 1 - directio write $DIR/f77 0 1 || error "direct write: rc=$?" + directio write $DIR/f77 0 $F77SZ $((1024 * 1024)) || \ + error "direct write: rc=$?" sysctl -w lustre.fail_loc=0 set_checksums 0 } run_test 77d "checksum error on OST direct write ===============" test_77e() { # bug 10889 + [ ! -f $DIR/f77 ] && log "requires 77d - skipping" && return #define OBD_FAIL_OSC_CHECKSUM_RECEIVE 0x408 sysctl -w lustre.fail_loc=0x80000408 set_checksums 1 cancel_lru_locks osc - directio read $DIR/f77 0 1 || error "direct read: rc=$?" + directio read $DIR/f77 0 $F77SZ $((1024 * 1024)) || \ + error "direct read: rc=$?" sysctl -w lustre.fail_loc=0 set_checksums 0 } @@ -3068,29 +3073,31 @@ test_77f() { # bug 10889 #define OBD_FAIL_OSC_CHECKSUM_SEND 0x409 sysctl -w lustre.fail_loc=0x409 set_checksums 1 - directio write $DIR/f77 0 1 && error "direct write succeeded" + directio write $DIR/f77 0 $F77SZ $((1024 * 1024)) && \ + error "direct write succeeded" sysctl -w lustre.fail_loc=0 set_checksums 0 } run_test 77f "repeat checksum error on write (expect error) ====" test_77g() { # bug 10889 - [ ! -f $F77_TMP ] && echo "requires 77a" && return [ $(grep -c obdfilter $LPROC/devices) -eq 0 ] && \ echo "skipping $TESTNAME (remote OST)" && return + [ ! -f $F77_TMP ] && setup_f77 #define OBD_FAIL_OST_CHECKSUM_RECEIVE 0x21a sysctl -w lustre.fail_loc=0x8000021a set_checksums 1 - dd if=$F77_TMP of=$DIR/f77 bs=8M count=1 || error "write error: rc=$?" + dd if=$F77_TMP of=$DIR/f77 bs=1M count=$F77SZ || \ + error "write error: rc=$?" sysctl -w lustre.fail_loc=0 set_checksums 0 } run_test 77g "checksum error on OST write ======================" test_77h() { # bug 10889 - [ ! -f $DIR/f77 ] && echo "requires 77a,g" && return [ $(grep -c obdfilter $LPROC/devices) -eq 0 ] && \ echo "skipping $TESTNAME (remote OST)" && return + [ ! -f $DIR/f77 ] && log "requires 77g - skipping" && return cancel_lru_locks osc #define OBD_FAIL_OST_CHECKSUM_SEND 0x21b sysctl -w lustre.fail_loc=0x8000021b @@ -3212,7 +3219,7 @@ function get_named_value() done } -export CACHE_MAX=`cat /proc/fs/lustre/llite/*/max_cached_mb | head -n 1` +export CACHE_MAX=`cat $LPROC/llite/*/max_cached_mb | head -n 1` cleanup_101() { for s in $LPROC/llite/*/max_cached_mb; do echo $CACHE_MAX > $s @@ -3707,6 +3714,8 @@ free_min_max () { test_116() { [ "$OSTCOUNT" -lt "2" ] && echo "not enough OSTs" && return + [ $(grep -c obdfilter $LPROC/devices) -eq 0 ] && + echo "remote MDS, skipping test" && return echo -n "Free space priority " cat $LPROC/lov/*/qos_prio_free @@ -3798,9 +3807,9 @@ run_test 117 "verify fsfilt_extend ==========" test_118() #bug 11710 { - + sync; sleep 1; sync multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c; - dirty=$(grep -c dirty /proc/fs/lustre/llite/*/dump_page_cache) + dirty=$(grep -c dirty $LPROC/llite/*/dump_page_cache) return $dirty } diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index 100b586e38ede7b205b8b4d1e792d97428ec5dad..ab9e37b83d5684987b0a4d42e29e40fa398d699b 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -405,7 +405,7 @@ test_14a() { multiop $DIR2/d14/multiop Oc && error "expected error, got success" kill -USR1 $MULTIPID || return 2 wait $MULTIPID || return 3 - rm $TMP/test14.junk + rm $TMP/test14.junk $DIR1/d14/multiop || error "removing multiop" } run_test 14a "open(RDWR) of executing file returns -ETXTBSY ====" @@ -420,7 +420,7 @@ test_14b() { # bug 3192, 7040 kill -USR1 $MULTIPID || return 2 wait $MULTIPID || return 3 cmp `which multiop` $DIR1/d14/multiop || error "binary changed" - rm $TMP/test14.junk + rm $TMP/test14.junk $DIR1/d14/multiop || error "removing multiop" } run_test 14b "truncate of executing file returns -ETXTBSY ======" @@ -434,7 +434,7 @@ test_14c() { # bug 3430, 7040 kill -USR1 $MULTIPID || return 2 wait $MULTIPID || return 3 cmp `which multiop` $DIR1/d14/multiop || error "binary changed" - rm $TMP/test14.junk + rm $TMP/test14.junk $DIR1/d14/multiop || error "removing multiop" } run_test 14c "open(O_TRUNC) of executing file return -ETXTBSY ==" @@ -449,7 +449,7 @@ test_14d() { # bug 10921 kill -USR1 $MULTIPID || return 2 wait $MULTIPID || return 3 cmp `which multiop` $DIR1/d14/multiop || error "binary changed" - rm $TMP/test14.junk + rm $TMP/test14.junk $DIR1/d14/multiop || error "removing multiop" } run_test 14d "chmod of executing file is still possible ========" @@ -460,7 +460,9 @@ test_15() { # bug 974 - ENOSPC run_test 15 "test out-of-space with multiple writers ===========" test_16() { - fsx -c 50 -p 100 -N 2500 -S 0 $MOUNT1/fsxfile $MOUNT2/fsxfile + rm -f $MOUNT1/fsxfile + lfs setstripe $MOUNT1/fsxfile 0 -1 -1 # b=10919 + fsx -c 50 -p 100 -N 2500 -l $((SIZE * 256)) -S 0 $MOUNT1/fsxfile $MOUNT2/fsxfile } run_test 16 "2500 iterations of dual-mount fsx ================="