-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_thread_time fails on NetBSD: time difference exceeds expected threshold #123978
Comments
I have run the test many times, I get results between 0.10 and 0.30.
|
I suggest to skip test_thread_time() on NetBSD with a refererence to this issue. |
From the discussion on #123979, it seems that CLOCK_THREAD_CPUTIME_ID does not work as intended on NetBSD. The following example: import time
names = ['time', 'monotonic', 'process_time', 'thread_time']
funcs = [getattr(time, name) for name in names]
times = [f() for f in funcs]
time.sleep(10)
for name, f, t in zip(names, funcs, times):
print(name, f() - t) produces the following output:
It is expected And this issue is known to the NetBSD developers: https://gnats.netbsd.org/57512. We should either skip thread_time related tests on NetBSD and leave it to the users to deal with this issue, or remove the broken There was similar issue on Solaris and Illumos (see #79636, https://www.illumos.org/issues/14126). Even if CLOCK_THREAD_CPUTIME_ID was provided in headers, |
It puzzled me why
There is also an error in conditions for the |
Bug report
Bug description:
OS:
NetBSD 10.0 amd64
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Linked PRs
The text was updated successfully, but these errors were encountered: