Skip to content

gh-110697: Use CLOCK_RES in test_os.TimerfdTests #111529

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

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Oct 30, 2023

More TimerfdTests tests tolerate a difference of 1 ms in measured elapsed time.

More TimerfdTests tests tolerate a difference of 1 ms in measured
elapsed time.
@vstinner
Copy link
Member Author

Example of recent test failure:

FAIL: test_timerfd_poll (test.test_os.TimerfdTests.test_timerfd_poll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_os.py", line 4139, in test_timerfd_poll
    self.check_timerfd_poll(False)
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_os.py", line 4135, in check_timerfd_poll
    self.assertGreater(dt, total_time / sec_to_nsec)
AssertionError: 0.4996331359999999 not greater than 0.5

The difference is only around 0.3 ms.

@vstinner vstinner enabled auto-merge (squash) October 30, 2023 22:22
@vstinner vstinner disabled auto-merge October 30, 2023 22:22
@vstinner vstinner enabled auto-merge (squash) October 30, 2023 22:22
@vstinner vstinner changed the title gh-110697: Use CLOCK_RES_NS in test_os.TimerfdTests gh-110697: Use CLOCK_RES in test_os.TimerfdTests Oct 30, 2023
@vstinner vstinner merged commit 7b153d1 into python:main Oct 30, 2023
@vstinner vstinner deleted the timerfs_clock_res branch October 30, 2023 22:48
FullteaR pushed a commit to FullteaR/cpython that referenced this pull request Nov 3, 2023
More TimerfdTests tests tolerate a difference of 1 ms in measured
elapsed time.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
More TimerfdTests tests tolerate a difference of 1 ms in measured
elapsed time.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
More TimerfdTests tests tolerate a difference of 1 ms in measured
elapsed time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant