From 33c326204c27fcff3102b6c1966c724f06d5b4d4 Mon Sep 17 00:00:00 2001 From: Emoly Liu Date: Tue, 18 Feb 2014 19:53:20 +0800 Subject: [PATCH] LU-4442 test: add version check for replay-vbr.sh test_7g In replay-vbr.sh test_7g.3, because mdt_object_exists() was added in http://review.whamcloud.com/#/c/8371, client will not be evicted without object version check. The patch also fixes the wrong usage of wait_mds_ost_sync() in replay_vbr.sh test_7_cycle(). The first parameter should be a timeout in seconds, not a facet. Test-Parameters: envdefinitions=SLOW=yes,ONLY=7 testlist=replay-vbr Signed-off-by: Emoly Liu Signed-off-by: Jian Yu Change-Id: I4a960fc53451fc717370bc96f926f067bbb2946a Reviewed-on: http://review.whamcloud.com/9290 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/replay-vbr.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lustre/tests/replay-vbr.sh b/lustre/tests/replay-vbr.sh index 2b1f031..4018a9b 100644 --- a/lustre/tests/replay-vbr.sh +++ b/lustre/tests/replay-vbr.sh @@ -728,7 +728,7 @@ test_7_cycle() { client_evicted $CLIENT1 || rc=1 wait_recovery_complete $SINGLEMDS - wait_mds_ost_sync $SINGLEMDS + wait_mds_ost_sync || error "wait_mds_ost_sync failed" rm -rf $DIR/$tdir return $rc @@ -887,7 +887,14 @@ test_7g() { first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile" lost="createmany -o $MOUNT2/$tdir/$tfile- 1" last="link $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1" - test_7_cycle "$first" "$lost" "$last" || error "Test 7g.3 failed" + if [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.5.1) ] + then + test_7_cycle "$first" "$lost" "$last" || + error "Test 7g.3 failed" + else #LU-4442 LU-3528 + test_7_cycle "$first" "$lost" "$last" && + error "Test 7g.3 failed" + fi return 0 } run_test 7g "rename, {lost}, create" -- 1.8.3.1