gh-109276: regrtest: add WORKER_FAILED state (#110148)

Rename WORKER_ERROR to WORKER_BUG. Add WORKER_FAILED state: it does
not stop the manager, whereas WORKER_BUG does.

Change also TestResults.display_result() order: display failed tests
at the end, the important important information.

WorkerThread now tries to get the signal name for negative exit code.
This commit is contained in:
Victor Stinner 2023-09-30 22:48:26 +02:00 committed by GitHub
parent c62b49ecc8
commit 2c234196ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 83 additions and 28 deletions

View file

@ -14,6 +14,7 @@ import platform
import random
import re
import shlex
import signal
import subprocess
import sys
import sysconfig
@ -2066,6 +2067,15 @@ class TestUtils(unittest.TestCase):
self.assertIsNone(normalize('setUpModule (test.test_x)', is_error=True))
self.assertIsNone(normalize('tearDownModule (test.test_module)', is_error=True))
def test_get_signal_name(self):
for exitcode, expected in (
(-int(signal.SIGINT), 'SIGINT'),
(-int(signal.SIGSEGV), 'SIGSEGV'),
(3221225477, "STATUS_ACCESS_VIOLATION"),
(0xC00000FD, "STATUS_STACK_OVERFLOW"),
):
self.assertEqual(utils.get_signal_name(exitcode), expected, exitcode)
if __name__ == '__main__':
unittest.main()