Skip to content

test_eintr: test_flock() fails with: 0.19043820584192872 not greater than or equal to 0.2 #109592

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

Closed
vstinner opened this issue Sep 20, 2023 · 1 comment
Labels
tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

vstinner commented Sep 20, 2023

Failure on AMD64 RHEL8 3.x buildbot:

FAIL: test_flock (__main__.FNTLEINTRTest.test_flock)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64/build/Lib/test/_test_eintr.py", line 526, in test_flock
    self._lock(fcntl.flock, "flock")
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64/build/Lib/test/_test_eintr.py", line 515, in _lock
    self.assertGreaterEqual(dt, self.sleep_time)
AssertionError: 0.19043820584192872 not greater than or equal to 0.2

build: https://buildbot.python.org/all/#/builders/185/builds/5045

dt is measured with time.monotonic(). test.pythoninfo says:

time.get_clock_info(monotonic): namespace(implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, adjustable=False, resolution=1e-09)

sleep_time = 0.2 constant is used to call time.sleep(0.2) in a child process which is created after start_time = time.monotonic().

Linked PRs

@vstinner
Copy link
Member Author

time.sleep() is implemented with clock_nanosleep() on this buildbot. configure says:

checking for clock_nanosleep... yes

@vstinner vstinner added the tests Tests in the Lib/test dir label Sep 20, 2023
vstinner added a commit to vstinner/cpython that referenced this issue Sep 29, 2023
vstinner added a commit to vstinner/cpython that referenced this issue Sep 29, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 29, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 29, 2023
vstinner added a commit that referenced this issue Sep 29, 2023
…H-110102) (#110107)

gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102)
(cherry picked from commit 9c73a9a)

Co-authored-by: Victor Stinner <[email protected]>
Yhg1s pushed a commit that referenced this issue Oct 2, 2023
…H-110102) (#110106)

gh-109592: test_eintr tolerates 20 ms when comparing timings (GH-110102)
(cherry picked from commit 9c73a9a)

Co-authored-by: Victor Stinner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

1 participant