diff options
author | наб <[email protected]> | 2022-01-22 00:37:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-21 15:37:46 -0800 |
commit | 17b2ae0b24d487fdda2ef1098ec26fa7f79a61f6 (patch) | |
tree | 006d2d52e81f9b45892842ec13b34333df8e3fc3 /tests | |
parent | 063daa8350d4a78f96d1ee6550910363fd3756fb (diff) |
Fix test-runner on FreeBSD
CLOCK_MONOTONIC_RAW is only a thing on Linux and macOS. I'm not
actually sure why the previous hardcoding of a constant didn't
error out, but when we removed it, it sure does now.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Co-authored-by: Rich Ercolani <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes #12995
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test-runner/bin/test-runner.py.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-runner/bin/test-runner.py.in b/tests/test-runner/bin/test-runner.py.in index 304494083..3c0b82a31 100755 --- a/tests/test-runner/bin/test-runner.py.in +++ b/tests/test-runner/bin/test-runner.py.in @@ -32,7 +32,7 @@ from select import select from subprocess import PIPE from subprocess import Popen from threading import Timer -from time import time, CLOCK_MONOTONIC_RAW +from time import time, CLOCK_MONOTONIC BASEDIR = '/var/tmp/test_results' TESTDIR = '/usr/share/zfs/' @@ -59,7 +59,7 @@ clock_gettime.argtypes = [ctypes.c_int, ctypes.POINTER(timespec)] def monotonic_time(): t = timespec() - if clock_gettime(CLOCK_MONOTONIC_RAW, ctypes.pointer(t)) != 0: + if clock_gettime(CLOCK_MONOTONIC, ctypes.pointer(t)) != 0: errno_ = ctypes.get_errno() raise OSError(errno_, os.strerror(errno_)) return t.tv_sec + t.tv_nsec * 1e-9 |