Whamcloud - gitweb
LU-8155 tests: Fix timing of sanity-hsm/16 71/20271/4
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Tue, 17 May 2016 15:46:22 +0000 (11:46 -0400)
committerAndreas Dilger <andreas.dilger@intel.com>
Mon, 30 May 2016 05:04:11 +0000 (05:04 +0000)
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 <nathaniel.l.clark@intel.com>
Change-Id: Iff8b4dec6d9d562b1560cc0101f251bf4b039508
Reviewed-on: http://review.whamcloud.com/20271
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/tests/sanity-hsm.sh

index 014bf41..bac941c 100755 (executable)
@@ -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"