X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=507812df6c524d601d11b9a57c7ea199d0b46865;hb=6cde14a5df781ae29da88f98a2559eb4342fe1f3;hp=b6cd7eca356729a36111d7f50d30fbb583a258f2;hpb=09b0ef0c85ad73f06e517632f1b4ffa3a7174c2b;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index b6cd7ec..507812d 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -12662,10 +12662,11 @@ test_224c() { # LU-6441 error "conf_param timeout=5 failed" #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB3 0x520 - $LCTL set_param fail_loc=0x520 + do_facet ost1 $LCTL set_param fail_loc=0x520 + $LFS setstripe -c 1 -i 0 $DIR/$tfile dd if=/dev/zero of=$DIR/$tfile bs=8MB count=1 sync - $LCTL set_param fail_loc=0 + do_facet ost1 $LCTL set_param fail_loc=0 set_conf_param_and_check client "$test_at" "$param_at" $at_max || error "conf_param at_max=$at_max failed" @@ -13868,18 +13869,9 @@ test_247e() { run_test 247e "mount .. as fileset" test_248() { - local my_error=error - local fast_read_sav=$($LCTL get_param -n llite.*.fast_read 2>/dev/null) [ -z "$fast_read_sav" ] && skip "no fast read support" && return - # This test case is time sensitive and Maloo uses KVM to run autotest. - # Therefore the complete time of I/O task is unreliable and depends on - # the workload on the host machine when the task is running. - local virt=$(running_in_vm) - [ -n "$virt" ] && echo "running in VM '$virt', ignore error" && - my_error="error_ignore env=$virt" - # create a large file for fast read verification dd if=/dev/zero of=$DIR/$tfile bs=1M count=128 > /dev/null 2>&1 @@ -13901,7 +13893,8 @@ test_248() { # verify that fast read is 4 times faster for cache read [ $(bc <<< "4 * $t_fast < $t_slow") -eq 1 ] || - $my_error "fast read was not 4 times faster: $t_fast vs $t_slow" + error_not_in_vm "fast read was not 4 times faster: " \ + "$t_fast vs $t_slow" echo "Test 2: verify the performance between big and small read" $LCTL set_param -n llite.*.fast_read=1 @@ -13918,7 +13911,7 @@ test_248() { # verify that big IO is not 4 times faster than small IO [ $(bc <<< "4 * $t_1k >= $t_1m") -eq 1 ] || - $my_error "bigger IO is way too fast: $t_1k vs $t_1m" + error_not_in_vm "bigger IO is way too fast: $t_1k vs $t_1m" $LCTL set_param -n llite.*.fast_read=$fast_read_sav rm -f $DIR/$tfile @@ -14098,14 +14091,6 @@ ladvise_willread_performance() local repeat=10 local average_cache=0 local average_ladvise=0 - local my_error=error - - # This test case is time sensitive and Maloo uses KVM to run autotest. - # Therefore the complete time of I/O task is unreliable and depends on - # the workload on the host machine when the task is running. - local virt=$(running_in_vm) - [ -n "$virt" ] && echo "running in VM '$virt', ignore error" && - my_error="error_ignore env=$virt" for ((i = 1; i <= $repeat; i++)); do echo "Iter $i/$repeat: reading without willread hint" @@ -14156,8 +14141,8 @@ ladvise_willread_performance() local lowest_speedup=$((average_cache / 2)) [ $average_ladvise -gt $lowest_speedup ] || - $my_error "Speedup with willread is less than "\ - "$lowest_speedup%, got $average_ladvise%" + error_not_in_vm "Speedup with willread is less than " \ + "$lowest_speedup%, got $average_ladvise%" echo "Speedup with willread ladvise: $average_ladvise%" echo "Speedup with cache: $average_cache%" } @@ -14305,6 +14290,29 @@ test_256() { } run_test 256 "Check llog delete for empty and not full state" +test_257() { + remote_mds_nodsh && skip "remote MDS with nodsh" && return + [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.8.55) ]] && + skip "Need MDS version at least 2.8.55" && return + + test_mkdir -p $DIR/$tdir + + setfattr -n trusted.name1 -v value1 $DIR/$tdir || + error "setfattr -n trusted.name1=value1 $DIR/$tdir failed" + stat $DIR/$tdir + +#define OBD_FAIL_MDS_XATTR_REP 0x161 + local mdtidx=$($LFS getstripe -M $DIR/$tdir) + local facet=mds$((mdtidx + 1)) + set_nodes_failloc $(facet_active_host $facet) 0x80000161 + getfattr -n trusted.name1 $DIR/$tdir 2> /dev/null + + stop $facet || error "stop MDS failed" + start $facet $(mdsdevname $((mdtidx + 1))) $MDS_MOUNT_OPTS || + error "start MDS fail" +} +run_test 257 "xattr locks are not lost" + test_260() { #define OBD_FAIL_MDC_CLOSE 0x806 $LCTL set_param fail_loc=0x80000806 @@ -15213,7 +15221,7 @@ test_399() { # LU-7655 for OST fake write echo "fake write $duration_fake vs. normal write $duration in seconds" [ $(bc <<< "$duration_fake < $duration") -eq 1 ] || - error "fake write is slower" + error_not_in_vm "fake write is slower" $LCTL set_param -n debug="$saved_debug" rm -f $DIR/$tfile