X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=fb22df9fbcbff2d180f15e31f0d56168bedbadc1;hb=20baff1f7f77b02f629e5f7980807ad151423b3b;hp=6ab66ad73422436501e8f734e10a2602870defe7;hpb=11b26155714118d38348eadde91ce623ec570ec6;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 6ab66ad..fb22df9 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -9,7 +9,7 @@ set -e ONLY=${ONLY:-"$*"} # bug number for skipped test: 13297 2108 9789 3637 9789 3561 12622 5188 -ALWAYS_EXCEPT=" 27u 42a 42b 42c 42d 45 51d 68b $SANITY_EXCEPT" +ALWAYS_EXCEPT=" 42a 42b 42c 42d 45 51d 68b $SANITY_EXCEPT" # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! # with LOD/OSP landing @@ -58,7 +58,7 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/${NAME}.sh} init_logging -[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 24v 27m 36f 36g 36h 51b 60c 63 64b 68 71 73 77f 78 101a 103 115 120g 124b" +[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 24v 27m 36f 36g 36h 51b 60c 63 64b 68 71 73 77f 78 101a 115 120g 124b" [ $(facet_fstype $SINGLEMDS) = "zfs" ] && # bug number for skipped test: LU-2834 LU-1593 LU-2610 LU-2833 LU-1957 LU-2805 @@ -1484,6 +1484,7 @@ test_27u() { # bug 4900 #define OBD_FAIL_MDS_OSC_PRECREATE 0x139 do_facet $SINGLEMDS lctl set_param fail_loc=0x139 test_mkdir -p $DIR/$tdir + rm -rf $DIR/$tdir/* createmany -o $DIR/$tdir/t- 1000 do_facet $SINGLEMDS lctl set_param fail_loc=0 @@ -1638,6 +1639,19 @@ test_27y() { do_facet $SINGLEMDS lctl --device %$OSC activate fi done + + # all osp devices get activated, hence -1 stripe count restored + local stripecnt=0 + + # sleep 2*lod_qos_maxage seconds waiting for lod qos to notice osp + # devices get activated. + sleep_maxage + $SETSTRIPE -c -1 $DIR/$tfile + stripecnt=$($GETSTRIPE -c $DIR/$tfile) + rm -f $DIR/$tfile + [ $stripecnt -ne $OSTCOUNT ] && + error "Of $OSTCOUNT OSTs, only $stripecnt is available" + return 0 } run_test 27y "create files while OST0 is degraded and the rest inactive" @@ -1768,6 +1782,55 @@ test_27A() { # b=19102 } run_test 27A "check filesystem-wide default LOV EA values" +test_27B() { # LU-2523 + test_mkdir -p $DIR/$tdir + rm -f $DIR/$tdir/f0 $DIR/$tdir/f1 + touch $DIR/$tdir/f0 + # open f1 with O_LOV_DELAY_CREATE + # rename f0 onto f1 + # call setstripe ioctl on open file descriptor for f1 + # close + multiop $DIR/$tdir/f1 oO_RDWR:O_CREAT:O_LOV_DELAY_CREATE:nB1c \ + $DIR/$tdir/f0 + + rm -f $DIR/$tdir/f1 + # open f1 with O_LOV_DELAY_CREATE + # unlink f1 + # call setstripe ioctl on open file descriptor for f1 + # close + multiop $DIR/$tdir/f1 oO_RDWR:O_CREAT:O_LOV_DELAY_CREATE:uB1c + + # Allow multiop to fail in imitation of NFS's busted semantics. + true +} +run_test 27B "call setstripe on open unlinked file/rename victim" + +test_27C() { #LU-2871 + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return + + declare -a ost_idx + local index + local i + local j + + test_mkdir -p $DIR/$tdir + cd $DIR/$tdir + for i in $(seq 0 $((OSTCOUNT - 1))); do + # set stripe across all OSTs starting from OST$i + $SETSTRIPE -i $i -c -1 $tfile$i + # get striping information + ost_idx=($($GETSTRIPE $tfile$i | + tail -n $((OSTCOUNT + 1)) | awk '{print $1}')) + echo ${ost_idx[@]} + # check the layout + for j in $(seq 0 $((OSTCOUNT - 1))); do + index=$(((i + j) % OSTCOUNT)) + [ ${ost_idx[$j]} -eq $index ] || error + done + done +} +run_test 27C "check full striping across all OSTs" + # createtest also checks that device nodes are created and # then visible correctly (#2091) test_28() { # bug 2091 @@ -6164,8 +6227,12 @@ test_103 () { run_acl_subtest inheritance || error "inheritance test failed" rm -f make-tree - echo "LU-974 ignore umask when acl is enabled..." - run_acl_subtest 974 || error "LU-974 test failed" + echo "LU-974 ignore umask when acl is enabled..." + run_acl_subtest 974 || error "LU-974 test failed" + if [ $MDSCOUNT -ge 2 ]; then + run_acl_subtest 974_remote || + error "LU-974 test failed under remote dir" + fi echo "LU-2561 newly created file is same size as directory..." run_acl_subtest 2561 || error "LU-2561 test failed" @@ -8415,15 +8482,29 @@ test_151() { set_osd_param $list '' writethrough_cache_enable 1 - # pages should be in the case right after write - dd if=/dev/urandom of=$DIR/$tfile bs=4k count=$CPAGES || error "dd failed" - local BEFORE=`roc_hit` - cancel_lru_locks osc - cat $DIR/$tfile >/dev/null - local AFTER=`roc_hit` - if ! let "AFTER - BEFORE == CPAGES"; then - error "NOT IN CACHE: before: $BEFORE, after: $AFTER" - fi + # check write cache is enabled on all obdfilters + if get_osd_param $list '' writethrough_cache_enable | grep 0; then + echo "oss write cache is NOT enabled" + return 0 + fi + +#define OBD_FAIL_OBD_NO_LRU 0x609 + do_nodes $list $LCTL set_param fail_loc=0x609 + + # pages should be in the case right after write + dd if=/dev/urandom of=$DIR/$tfile bs=4k count=$CPAGES || + error "dd failed" + + local BEFORE=`roc_hit` + cancel_lru_locks osc + cat $DIR/$tfile >/dev/null + local AFTER=`roc_hit` + + do_nodes $list $LCTL set_param fail_loc=0 + + if ! let "AFTER - BEFORE == CPAGES"; then + error "NOT IN CACHE: before: $BEFORE, after: $AFTER" + fi # the following read invalidates the cache cancel_lru_locks osc @@ -9492,7 +9573,8 @@ test_184c() { dd if=$ref1 of=$file1 bs=16k & local DD_PID=$! - sleep 0.$((RANDOM % 5 + 1)) + # Make sure dd starts to copy file + while [ ! -f $file1 ]; do sleep 0.1; done $LFS swap_layouts $file1 $file2 local rc=$? @@ -10824,6 +10906,20 @@ test_231b() { } run_test 231b "must not assert on fully utilized OST request buffer" +test_232() { + mkdir -p $DIR/$tdir + #define OBD_FAIL_LDLM_OST_LVB 0x31c + $LCTL set_param fail_loc=0x31c + + # ignore dd failure + dd if=/dev/zero of=$DIR/$tdir/$tfile bs=1M count=1 || true + + $LCTL set_param fail_loc=0 + umount_client $MOUNT || error "umount failed" + mount_client $MOUNT || error "mount failed" +} +run_test 232 "failed lock should not block umount" + # # tests that do cleanup/setup should be run at the end #