https://github.com/python/cpython/commit/f576d31d1ca3f91a5e47ee5bb36582bf5cfa39a9 commit: f576d31d1ca3f91a5e47ee5bb36582bf5cfa39a9 branch: 3.11 author: Diego Russo <diego.ru...@arm.com> committer: pablogsal <pablog...@gmail.com> date: 2025-03-14T01:59:59Z summary:
[3.11] gh-106883: Make test_current_frames_exceptions_deadlock faster (#131182) files: M Lib/test/test_sys.py diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 28931039f3792e..3f65d5e62fc5d4 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -477,6 +477,7 @@ def g456(): @threading_helper.reap_threads @threading_helper.requires_working_threading() @support.requires_fork() + @support.requires_resource('cpu') def test_current_frames_exceptions_deadlock(self): """ Reproduce the bug raised in GH-106883 and GH-116969. @@ -515,19 +516,14 @@ def thread_function(num_objects): # The number of objects should be big enough to increase the # chances to call the GC. - NUM_OBJECTS = 1000 - NUM_THREADS = 10 - - # 40 seconds should be enough for the test to be executed: if it - # is more than 40 seconds it means that the process is in deadlock - # hence the test fails - TIMEOUT = 40 + NUM_OBJECTS = 100 + NUM_THREADS = 2 # Test the sys._current_frames and sys._current_exceptions calls pid = os.fork() if pid: # parent process try: - support.wait_process(pid, exitcode=0, timeout=TIMEOUT) + support.wait_process(pid, exitcode=0, timeout=support.SHORT_TIMEOUT) except KeyboardInterrupt: # When pressing CTRL-C kill the deadlocked process os.kill(pid, signal.SIGTERM) _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com