From aaac3f4851392e70baf72684f95b0bb1e6b02491 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 18 Jun 2025 17:26:21 +0200 Subject: [PATCH 1/2] gh-126112: Fix test_os.TimerfdTests: use 10 ms resolution Use 10 ms for CLOCK_RES instead of 100 ms to tolerate slow buildbots. --- Lib/test/test_os.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 88b5b0e6e358bb..e9e1502c23bea8 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -4291,13 +4291,8 @@ def test_eventfd_select(self): @unittest.skipIf(sys.platform == "android", "gh-124873: Test is flaky on Android") @support.requires_linux_version(2, 6, 30) class TimerfdTests(unittest.TestCase): - # 1 ms accuracy is reliably achievable on every platform except Android - # emulators, where we allow 10 ms (gh-108277). - if sys.platform == "android" and platform.android_ver().is_emulator: - CLOCK_RES_PLACES = 2 - else: - CLOCK_RES_PLACES = 3 - + # gh-126112: Use 10 ms to tolerate slow buildbots + CLOCK_RES_PLACES = 2 # 10 ms CLOCK_RES = 10 ** -CLOCK_RES_PLACES CLOCK_RES_NS = 10 ** (9 - CLOCK_RES_PLACES) From 26bf66bfc8fb9dce33b00dabc6194dc0c1e1f697 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 18 Jun 2025 17:36:42 +0200 Subject: [PATCH 2/2] Remove unused 'platform' import --- Lib/test/test_os.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index e9e1502c23bea8..8f56b4559f46c6 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -13,7 +13,6 @@ import locale import os import pickle -import platform import select import selectors import shutil