← 输入框|github.com|刷新
Skip to content

Do not rerun failed tests in regrtest on worker bug - #162780

Open
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:regrtest_worker_bug2
Open

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:regrtest_worker_bug2

Conversation

@vstinner

Copy link
Copy Markdown
Member

When a test fails with "worker bug", no longer reruns failed tests in verbose mode. Previously, re-running tests in verbose mode failed to run a test called "".

When a test fails with "worker bug", no longer reruns failed tests in
verbose mode. Previously, re-running tests in verbose mode failed to
run a test called "<regrtest worker>".
@vstinner

Copy link
Copy Markdown
Member Author

Example of worker bug on AMD64 FreeBSD14 3.x: https://buildbot.python.org/#/builders/1232/builds/9999

The bug:

Exception ignored in the internal traceback machinery:
object type name: OSError
object repr     : OSError(28, 'No space left on device')
lost sys.stderr
Warning -- regrtest worker thread failed: Traceback (most recent call last):
Warning --   File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/libregrtest/run_workers.py", line 424, in run
Warning --     mp_result = self._runtest(
Warning --         test_name,
Warning --         module_name if single_process_per_case else None)
Warning --   File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/libregrtest/run_workers.py", line 377, in _runtest
Warning --     retcode, tmp_files = self.run_tmp_files(worker_runtests,
Warning --                          ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
Warning --                                             stdout_file.fileno())
Warning --                                             ^^^^^^^^^^^^^^^^^^^^^
Warning --   File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/libregrtest/run_workers.py", line 308, in run_tmp_files
Warning --     tmp_dir = tempfile.mkdtemp(prefix="test_python_")
Warning --   File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/tempfile.py", line 440, in mkdtemp
Warning --     _os.mkdir(file, 0o700)
Warning --     ~~~~~~~~~^^^^^^^^^^^^^
Warning -- OSError: [Errno 28] No space left on device: '/tmp/test_python_wnh2v9le'
Kill <WorkerThread #1 running test=test.test_multiprocessing_spawn.test_manager pid=29329 time=25.9 sec> process group
Kill <WorkerThread #2 running test=test_operator pid=29532 time=1.1 sec> process group
Kill <WorkerThread #3 running test=test_regrtest pid=28905 time=1 min 30 sec> process group
Kill <WorkerThread #4 running test=test_math pid=28911 time=1 min 29 sec> process group
Kill <WorkerThread #6 running test=test.test_gdb.test_cfunction_full pid=29528 time=2.0 sec> process group
Kill <WorkerThread #7 running test=test_venv pid=29400 time=15.6 sec> process group
Kill <WorkerThread #8 running test=test_code pid=29530 time=1.7 sec> process group

== Tests result: FAILURE, WORKER BUG ==
(...)
474 tests omitted:
    test___all__ test__interpchannels test__interpreters test__locale
    test__opcode test_abc test_abstract_numbers test_android
    ...
    test_zstd

Then regrtest re-run failed tests in verbose mode, but it fails with ModuleNotFoundError: No module named 'test.<regrtest worker>'.

0:01:30 load avg: 7.30 Re-running 3 failed tests in verbose mode in subprocesses
...
0:01:31 load avg: 7.30 mem:   86.7 MiB [2/3/1] <regrtest worker> failed (uncaught exception)
Re-running <regrtest worker> in verbose mode
test <regrtest worker> crashed -- Traceback (most recent call last):
  ...
ModuleNotFoundError: No module named 'test.<regrtest worker>'

Problem: in the final == Tests result: FAILURE, WORKER BUG then FAILURE ==, the 474 tests omitted are no longer listed. Instead, it says "73 tests OK."

This change should avoid these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant