X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Freplay-single.sh;h=7dcad42e92d41bad364dfe5a8c0d89596cb7734f;hp=c6e8b1132fd3a2ba9ba4cfb8e7a750fa725a808a;hb=c7515002525bb10ef51c2bb8e5dc23cfef7bc484;hpb=55d89fb36e358faee78cb77dfdf62bbeacac9e17 diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index c6e8b11..7dcad42 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -13,13 +13,14 @@ CLEANUP=${CLEANUP:-} . $LUSTRE/tests/test-framework.sh init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} +init_logging CHECK_GRANT=${CHECK_GRANT:-"yes"} GRANT_CHECK_LIST=${GRANT_CHECK_LIST:-""} -remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0 +require_dsh_mds || exit 0 # Skip these tests -# bug number: 17466 18857,15962 +# bug number: 17466 18857 ALWAYS_EXCEPT="61d 33a 33b $REPLAY_SINGLE_EXCEPT" if [ "$FAILURE_MODE" = "HARD" ] && mixed_ost_devs; then @@ -1169,6 +1170,9 @@ test_53c() { kill -USR1 $close_pid cancel_lru_locks mdc # force the close + #bz20647: make sure all pids are exists before failover + [ -d /proc/$close_pid ] || error "close_pid doesn't exist" + [ -d /proc/$open_pid ] || error "open_pid doesn't exists" replay_barrier_nodf $SINGLEMDS fail_nodf $SINGLEMDS wait $open_pid || return 1 @@ -1184,6 +1188,7 @@ test_53c() { run_test 53c "|X| open request and close request while two MDC requests in flight" test_53d() { + cancel_lru_locks mdc # cleanup locks from former test cases rm -rf $DIR/${tdir}-1 $DIR/${tdir}-2 mkdir -p $DIR/${tdir}-1 @@ -1261,6 +1266,9 @@ test_53f() { kill -USR1 $close_pid cancel_lru_locks mdc # force the close + #bz20647: make sure all pids are exists before failover + [ -d /proc/$close_pid ] || error "close_pid doesn't exist" + [ -d /proc/$open_pid ] || error "open_pid doesn't exists" replay_barrier_nodf $SINGLEMDS fail_nodf $SINGLEMDS wait $open_pid || return 1 @@ -1293,8 +1301,11 @@ test_53g() { do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000115" kill -USR1 $close_pid cancel_lru_locks mdc # force the close - do_facet $SINGLEMDS "lctl set_param fail_loc=0" + + #bz20647: make sure all pids are exists before failover + [ -d /proc/$close_pid ] || error "close_pid doesn't exist" + [ -d /proc/$open_pid ] || error "open_pid doesn't exists" replay_barrier_nodf $SINGLEMDS fail_nodf $SINGLEMDS wait $open_pid || return 1 @@ -1328,6 +1339,9 @@ test_53h() { cancel_lru_locks mdc # force the close sleep 1 + #bz20647: make sure all pids are exists before failover + [ -d /proc/$close_pid ] || error "close_pid doesn't exist" + [ -d /proc/$open_pid ] || error "open_pid doesn't exists" replay_barrier_nodf $SINGLEMDS fail_nodf $SINGLEMDS wait $open_pid || return 1 @@ -1841,7 +1855,7 @@ test_70b () { [ "$SLOW" = "no" ] && duration=60 local cmd="rundbench 1 -t $duration" local PID="" - do_nodes --verbose $clients "set -x; MISSING_DBENCH_OK=$MISSING_DBENCH_OK \ + do_nodesv $clients "set -x; MISSING_DBENCH_OK=$MISSING_DBENCH_OK \ PATH=:$PATH:$LUSTRE/utils:$LUSTRE/tests/:$DBENCH_LIB \ DBENCH_LIB=$DBENCH_LIB TESTSUITE=$TESTSUITE TESTNAME=$TESTNAME \ LCTL=$LCTL $cmd" & @@ -2019,8 +2033,8 @@ test_83b() { run_test 83b "fail log_add during unlink recovery" test_84a() { -#define OBD_FAIL_MDS_OPEN_WAIT_CREATE 0x143 - do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000143" +#define OBD_FAIL_MDS_OPEN_WAIT_CREATE 0x144 + do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000144" createmany -o $DIR/$tfile- 1 & PID=$! mds_evict_client @@ -2029,6 +2043,19 @@ test_84a() { } run_test 84a "stale open during export disconnect" +test_85() { # bug 22190 + local fail=0 + do_facet ost1 "lctl set_param -n obdfilter.${ost1_svc}.sync_journal 1" + + replay_barrier ost1 + lfs setstripe -i 0 -c 1 $DIR/$tfile + dd oflag=dsync if=/dev/urandom of=$DIR/$tfile bs=4k count=100 || fail=1 + fail_abort ost1 + echo "FAIL $fail" + [ $fail -ne 0 ] || error "Write was successful" +} +run_test 85 "ensure there is no reply on bulk write if obd is in rdonly mode" + equals_msg `basename $0`: test complete, cleaning up check_and_cleanup_lustre [ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true