From: Nathaniel Clark Date: Tue, 17 May 2016 15:46:22 +0000 (-0400) Subject: LU-8155 tests: Fix timing of sanity-hsm/16 X-Git-Tag: 2.8.54~35 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8a1b577014f29fece009f27ea6e139d53593cd76;p=fs%2Flustre-release.git LU-8155 tests: Fix timing of sanity-hsm/16 sanity-hsm/16 occationally fails due to a timing issue. The measured duration is 19s when the expected duration is 20s, this is most likely due to rounding of half seconds. Test-Parameters: trivial testlist=sanity-hsm Signed-off-by: Nathaniel Clark Change-Id: Iff8b4dec6d9d562b1560cc0101f251bf4b039508 Reviewed-on: http://review.whamcloud.com/20271 Reviewed-by: John L. Hammond Reviewed-by: Sebastien Buisson Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo --- diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 014bf41..bac941c 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -1704,7 +1704,8 @@ test_16() { $LFS hsm_archive $f wait_request_state $fid ARCHIVE SUCCEED local end=$(date +%s) - local duration=$((end - start)) + # Add 1 to account for rounding errors between start and end (LU-8155) + local duration=$((end - start + 1)) [[ $duration -ge $goal ]] || error "Transfer is too fast $duration < $goal"