test/dd: Wait 1s before checking the noatime flag
This test has been recently failing in a way where atime is not updated within the stat's %X resolution. Add simple sleep to mitigate that. Fixes issue: #2720. Signed-off-by: Michal Berger <michal.berger@intel.com> Change-Id: I106357175028849ba037c9ee78c1e22a772fdfa3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14675 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com> Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
3e5fc847c0
commit
87afc01e5a
@ -56,6 +56,11 @@ noatime() {
|
||||
atime_if=$(stat --printf="%X" "$test_file0")
|
||||
atime_of=$(stat --printf="%X" "$test_file1")
|
||||
|
||||
# Make sure atime has a chance to be updated - if all tests finish within
|
||||
# 1s (see %X) we may get a false negative at the last check. See:
|
||||
# https://github.com/spdk/spdk/issues/2720
|
||||
sleep 1
|
||||
|
||||
"${DD_APP[@]}" --if="$test_file0" --iflag=noatime --of="$test_file1"
|
||||
((atime_if == $(stat --printf="%X" "$test_file0")))
|
||||
((atime_of == $(stat --printf="%X" "$test_file1")))
|
||||
|
Loading…
Reference in New Issue
Block a user