summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/libregrtest')
-rw-r--r--Lib/test/libregrtest/run_workers.py4
-rw-r--r--Lib/test/libregrtest/utils.py29
2 files changed, 2 insertions, 31 deletions
diff --git a/Lib/test/libregrtest/run_workers.py b/Lib/test/libregrtest/run_workers.py
index a71050e..387ddf9 100644
--- a/Lib/test/libregrtest/run_workers.py
+++ b/Lib/test/libregrtest/run_workers.py
@@ -22,7 +22,7 @@ from .runtests import RunTests, WorkerRunTests, JsonFile, JsonFileType
from .single import PROGRESS_MIN_TIME
from .utils import (
StrPath, TestName,
- format_duration, print_warning, count, plural, get_signal_name)
+ format_duration, print_warning, count, plural)
from .worker import create_worker_process, USE_PROCESS_GROUP
if MS_WINDOWS:
@@ -366,7 +366,7 @@ class WorkerThread(threading.Thread):
err_msg=None,
state=State.TIMEOUT)
if retcode != 0:
- name = get_signal_name(retcode)
+ name = support.get_signal_name(retcode)
if name:
retcode = f"{retcode} ({name})"
raise WorkerError(self.test_name, f"Exit code {retcode}", stdout,
diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py
index 0167742..0197e50 100644
--- a/Lib/test/libregrtest/utils.py
+++ b/Lib/test/libregrtest/utils.py
@@ -685,35 +685,6 @@ def cleanup_temp_dir(tmp_dir: StrPath):
print("Remove file: %s" % name)
os_helper.unlink(name)
-WINDOWS_STATUS = {
- 0xC0000005: "STATUS_ACCESS_VIOLATION",
- 0xC00000FD: "STATUS_STACK_OVERFLOW",
- 0xC000013A: "STATUS_CONTROL_C_EXIT",
-}
-
-def get_signal_name(exitcode):
- if exitcode < 0:
- signum = -exitcode
- try:
- return signal.Signals(signum).name
- except ValueError:
- pass
-
- # Shell exit code (ex: WASI build)
- if 128 < exitcode < 256:
- signum = exitcode - 128
- try:
- return signal.Signals(signum).name
- except ValueError:
- pass
-
- try:
- return WINDOWS_STATUS[exitcode]
- except KeyError:
- pass
-
- return None
-
ILLEGAL_XML_CHARS_RE = re.compile(
'['