From 8a1b577014f29fece009f27ea6e139d53593cd76 Mon Sep 17 00:00:00 2001 From: Nathaniel Clark Date: Tue, 17 May 2016 11:46:22 -0400 Subject: [PATCH] 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 --- lustre/tests/sanity-hsm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- 1.8.3.1