Whamcloud - gitweb
LU-13138 tests: measure 'dd' time more accurately 27/38427/3
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 30 Apr 2020 06:36:21 +0000 (00:36 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 7 May 2020 05:46:41 +0000 (05:46 +0000)
commit43ebfad490a02613ada66c9ac79e80d1d9feaac5
tree49b05eba53807740076285a21484a975e0f8b5ef
parente56b6a340d9ddfb3ee5cf4bd2b947fd63bcb9947
LU-13138 tests: measure 'dd' time more accurately

The sanity test_101d can fail with 'readahead 5s > no-readahead 5s'
because the "do_and_time" function only measures runtime in whole
seconds.  Also, in some rare cases, the VM might be slow and cause
the runtime of the do_and_time() function to be slow, even if the
"dd" command finished quickly.

Instead of timing the duration of "dd" in seconds, parse the output
from "dd" directly, which provides fractional second precision.

Test-Parameters: trivial testlist=sanityn
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I5f1ec0374c6a9b9c175db77b2b972e3b433ebbe5
Reviewed-on: https://review.whamcloud.com/38427
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh
lustre/tests/test-framework.sh