From: Nathaniel Clark Date: Thu, 10 Oct 2013 15:46:54 +0000 (-0400) Subject: LU-1458 tests: wait for dbench to start X-Git-Tag: 2.5.51~34 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=206db60c884a9f96342d8c3f91f8b2f0101a716a;p=fs%2Flustre-release.git LU-1458 tests: wait for dbench to start Use wait_for_function instead of just guessing that 20s will be long enough for dbench to start. Wait for up to 6min in 5 second intervals. This also ensures that dbench will run for a little while after it starts. Signed-off-by: Nathaniel Clark Change-Id: Ic9c61b487c4013cccd620491d617c10e2206fd62 Reviewed-on: http://review.whamcloud.com/7914 Tested-by: Hudson Reviewed-by: Bobi Jam Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/lustre-rsync-test.sh b/lustre/tests/lustre-rsync-test.sh index 416ced3..84050d5 100644 --- a/lustre/tests/lustre-rsync-test.sh +++ b/lustre/tests/lustre-rsync-test.sh @@ -233,14 +233,17 @@ run_test 2a "Replicate files created by dbench." # Test 2b - Replicate files changed by dbench. test_2b() { + local child_pid init_src init_changelog # Run dbench sh rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME & - sleep 20 + # wait for dbench to start + wait_for_function 'child_pid=$(pgrep dbench)' 360 + # let dbench run for a bit + sleep 10 - local child_pid=$(pgrep dbench) echo PIDs: $child_pid echo Stopping dbench $KILL -SIGSTOP $child_pid