From: Keith Mannthey Date: Mon, 21 Jan 2013 18:02:07 +0000 (-0800) Subject: LU-1897 test: replay-single test_70b dbench not found X-Git-Tag: 2.3.61~75 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1536807853b539e00d4c490778ad1e13da9e19ba;p=fs%2Flustre-release.git LU-1897 test: replay-single test_70b dbench not found dbench is exiting before test_70b completes is work. dbench is being used as a background load in this test. In one observed case test was taking a little under 90s but dbench was exiting at 62s. Duration was set at 90. Presently dbench starts for 60s then the system sleeps for 12s, then we start a new 60s timer in which we expect dbench to be running. There is a large window in which this test will fail. The main issue is the use of Duration for use as both the timer of the real test and the timer of the background load. I raised the real Duration and started the timer for the real test before starting dbench such that the real test should finish before dbench does or about the same time. Signed-off-by: Keith Mannthey Change-Id: Iba243fe3132a5fa677e5a7bcd09e491727ba092a Reviewed-on: http://review.whamcloud.com/4973 Reviewed-by: Bob Glossman Tested-by: Hudson Reviewed-by: Jian Yu Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 20f7b09..7750d01 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -1880,10 +1880,11 @@ test_70b () { zconf_mount_clients $clients $MOUNT local duration=300 - [ "$SLOW" = "no" ] && duration=60 + [ "$SLOW" = "no" ] && duration=120 # set duration to 900 because it takes some time to boot node [ "$FAILURE_MODE" = HARD ] && duration=900 + local start_ts=$(date +%s) local cmd="rundbench 1 -t $duration" local pid="" do_nodesv $clients "set -x; MISSING_DBENCH_OK=$MISSING_DBENCH_OK \ @@ -1895,12 +1896,11 @@ test_70b () { # give rundbench a chance to start, bug 24118 sleep 12 - local elapsed=0 + local elapsed=$(($(date +%s) - start_ts)) local num_failovers=0 - local start_ts=$(date +%s) while [ $elapsed -lt $duration ]; do if ! check_for_process $clients dbench; then - error_noexit "dbench not found on some of $clients!" + error_noexit "dbench not running on some of $clients!" killall_process $clients dbench break fi