Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

lib-python/3/test/test_signal.py::unmodified

== PyPy 3.11.15 (a0a2919ebcf6, Jul 09 2026, 03:58:26) [PyPy 8.0.0-alpha0 with MSC v.1941 64 bit (AMD64)]
== Windows-10-10.0.19045-SP0 little-endian
== Python build: release with_assert
== cwd: D:\SystemTemp\pytest\test_python_worker_4608æ
== CPU count: 2
== encodings: locale=ascii FS=utf-8
== resources (3): curses,gui,network

Using random seed: 2154359903
0:00:00 Run 1 test sequentially
0:00:00 [1/1] test_signal
test_enums (test.test_signal.GenericTests.test_enums) ... ok
test_functions_module_attr (test.test_signal.GenericTests.test_functions_module_attr) ... ok
test_itimer_exc (test.test_signal.ItimerTest.test_itimer_exc) ... skipped 'Not valid on Windows'
test_itimer_prof (test.test_signal.ItimerTest.test_itimer_prof) ... skipped 'Not valid on Windows'
test_itimer_real (test.test_signal.ItimerTest.test_itimer_real) ... skipped 'Not valid on Windows'
test_itimer_virtual (test.test_signal.ItimerTest.test_itimer_virtual) ... skipped 'Not valid on Windows'
test_setitimer_tiny (test.test_signal.ItimerTest.test_setitimer_tiny) ... skipped 'Not valid on Windows'
test_pthread_kill (test.test_signal.PendingSignalsTests.test_pthread_kill) ... skipped 'need signal.pthread_kill()'
test_pthread_kill_main_thread (test.test_signal.PendingSignalsTests.test_pthread_kill_main_thread) ... skipped 'need signal.pthread_kill()'
test_pthread_sigmask (test.test_signal.PendingSignalsTests.test_pthread_sigmask) ... skipped 'need signal.pthread_sigmask()'
test_pthread_sigmask_arguments (test.test_signal.PendingSignalsTests.test_pthread_sigmask_arguments) ... skipped 'need signal.pthread_sigmask()'
test_pthread_sigmask_valid_signals (test.test_signal.PendingSignalsTests.test_pthread_sigmask_valid_signals) ... skipped 'need signal.pthread_sigmask()'
test_sigpending (test.test_signal.PendingSignalsTests.test_sigpending) ... skipped 'need signal.pthread_sigmask()'
test_sigpending_empty (test.test_signal.PendingSignalsTests.test_sigpending_empty) ... skipped 'need signal.sigpending()'
test_sigtimedwait (test.test_signal.PendingSignalsTests.test_sigtimedwait) ... skipped 'need signal.sigtimedwait()'
test_sigtimedwait_negative_timeout (test.test_signal.PendingSignalsTests.test_sigtimedwait_negative_timeout) ... skipped 'need signal.sigtimedwait()'
test_sigtimedwait_poll (test.test_signal.PendingSignalsTests.test_sigtimedwait_poll) ... skipped 'need signal.sigtimedwait()'
test_sigtimedwait_timeout (test.test_signal.PendingSignalsTests.test_sigtimedwait_timeout) ... skipped 'need signal.sigtimedwait()'
test_sigwait (test.test_signal.PendingSignalsTests.test_sigwait) ... skipped 'need signal.sigwait()'
test_sigwait_thread (test.test_signal.PendingSignalsTests.test_sigwait_thread) ... skipped 'need signal.sigwait()'
test_sigwaitinfo (test.test_signal.PendingSignalsTests.test_sigwaitinfo) ... skipped 'need signal.sigwaitinfo()'
test_pidfd_send_signal (test.test_signal.PidfdSignalTest.test_pidfd_send_signal) ... skipped 'pidfd support not built in'
test_getsignal (test.test_signal.PosixTests.test_getsignal) ... skipped 'Not valid on Windows'
test_interprocess_signal (test.test_signal.PosixTests.test_interprocess_signal) ... skipped 'Not valid on Windows'
test_keyboard_interrupt_exit_code (test.test_signal.PosixTests.test_keyboard_interrupt_exit_code)
KeyboardInterrupt triggers exit via SIGINT. ... skipped 'Not valid on Windows'
test_no_repr_is_called_on_signal_handler (test.test_signal.PosixTests.test_no_repr_is_called_on_signal_handler) ... skipped 'Not valid on Windows'
test_out_of_range_signal_number_raises_error (test.test_signal.PosixTests.test_out_of_range_signal_number_raises_error) ... skipped 'Not valid on Windows'
test_setting_signal_handler_to_none_raises_error (test.test_signal.PosixTests.test_setting_signal_handler_to_none_raises_error) ... skipped 'Not valid on Windows'
test_strsignal (test.test_signal.PosixTests.test_strsignal) ... skipped 'Not valid on Windows'
test_valid_signals (test.test_signal.PosixTests.test_valid_signals) ... skipped 'Not valid on Windows'
test__thread_interrupt_main (test.test_signal.RaiseSignalTest.test__thread_interrupt_main) ... skipped 'implementation detail specific to cpython'
test_handler (test.test_signal.RaiseSignalTest.test_handler) ... ok
test_invalid_argument (test.test_signal.RaiseSignalTest.test_invalid_argument) ... ERROR
test_sigint (test.test_signal.RaiseSignalTest.test_sigint) ... ok
test_siginterrupt_off (test.test_signal.SiginterruptTest.test_siginterrupt_off) ... skipped 'Not valid on Windows'
test_siginterrupt_on (test.test_signal.SiginterruptTest.test_siginterrupt_on) ... skipped 'Not valid on Windows'
test_without_siginterrupt (test.test_signal.SiginterruptTest.test_without_siginterrupt) ... skipped 'Not valid on Windows'
test_stress_delivery_dependent (test.test_signal.StressTest.test_stress_delivery_dependent)
This test uses dependent signal handlers. ... skipped 'test needs setitimer()'
test_stress_delivery_simultaneous (test.test_signal.StressTest.test_stress_delivery_simultaneous)
This test uses simultaneous signal handlers. ... skipped 'test needs setitimer()'
test_stress_modifying_handlers (test.test_signal.StressTest.test_stress_modifying_handlers) ... skipped 'test needs SIGUSR1'
test_invalid_call (test.test_signal.WakeupFDTests.test_invalid_call) ... ok
test_invalid_fd (test.test_signal.WakeupFDTests.test_invalid_fd) ... FAIL
test_invalid_socket (test.test_signal.WakeupFDTests.test_invalid_socket) ... FAIL
test_set_wakeup_fd_blocking (test.test_signal.WakeupFDTests.test_set_wakeup_fd_blocking) ... skipped 'tests specific to POSIX'
test_set_wakeup_fd_result (test.test_signal.WakeupFDTests.test_set_wakeup_fd_result) ... ok
test_set_wakeup_fd_socket_result (test.test_signal.WakeupFDTests.test_set_wakeup_fd_socket_result) ... ok
test_pending (test.test_signal.WakeupSignalTests.test_pending) ... skipped 'Not valid on Windows'
test_signum (test.test_signal.WakeupSignalTests.test_signum) ... skipped 'Not valid on Windows'
test_wakeup_fd_during (test.test_signal.WakeupSignalTests.test_wakeup_fd_during) ... skipped 'Not valid on Windows'
test_wakeup_fd_early (test.test_signal.WakeupSignalTests.test_wakeup_fd_early) ... skipped 'Not valid on Windows'
test_wakeup_write_error (test.test_signal.WakeupSignalTests.test_wakeup_write_error) ... skipped 'Not valid on Windows'
test_send_error (test.test_signal.WakeupSocketSignalTests.test_send_error) ... FAIL
test_socket (test.test_signal.WakeupSocketSignalTests.test_socket) ... ok
test_warn_on_full_buffer (test.test_signal.WakeupSocketSignalTests.test_warn_on_full_buffer) ... FAIL
test_issue9324 (test.test_signal.WindowsSignalTests.test_issue9324) ... ok
test_keyboard_interrupt_exit_code (test.test_signal.WindowsSignalTests.test_keyboard_interrupt_exit_code)
KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT. ... FAIL
test_valid_signals (test.test_signal.WindowsSignalTests.test_valid_signals) ... ok

======================================================================
ERROR: test_invalid_argument (test.test_signal.RaiseSignalTest.test_invalid_argument)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_signal.py", line 1426, in test_invalid_argument
    signal.raise_signal(SIGHUP)
           ^^^^^^^^^^^^
OSError: [Errno 0] No error

======================================================================
FAIL: test_invalid_fd (test.test_signal.WakeupFDTests.test_invalid_fd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_signal.py", line 242, in test_invalid_fd
    self.assertRaises((ValueError, OSError),
         ^^^^^^^^^^^^
AssertionError: (<class 'ValueError'>, <class 'OSError'>) not raised by set_wakeup_fd

======================================================================
FAIL: test_invalid_socket (test.test_signal.WakeupFDTests.test_invalid_socket)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_signal.py", line 250, in test_invalid_socket
    self.assertRaises((ValueError, OSError),
         ^^^^^^^^^^^^
AssertionError: (<class 'ValueError'>, <class 'OSError'>) not raised by set_wakeup_fd

======================================================================
FAIL: test_send_error (test.test_signal.WakeupSocketSignalTests.test_send_error)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_signal.py", line 578, in test_send_error
    assert_python_ok('-c', code)
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\support\script_helper.py", line 166, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\support\script_helper.py", line 151, in _assert_python
    res.fail(cmd_line)
        ^^^^
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\support\script_helper.py", line 76, in fail
    raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy3.11-c.exe', '-X', 'faulthandler', '-I', '-c', "if 1:\n        import errno\n        import signal\n        import socket\n        import sys\n        import time\n        import _testcapi\n        from test.support import captured_stderr\n\n        signum = signal.SIGINT\n\n        def handler(signum, frame):\n            pass\n\n        signal.signal(signum, handler)\n\n        read, write = socket.socketpair()\n        read.setblocking(False)\n        write.setblocking(False)\n\n        signal.set_wakeup_fd(write.fileno())\n\n        # Close sockets: send() will fail\n        read.close()\n        write.close()\n\n        with captured_stderr() as err:\n            signal.raise_signal(signum)\n\n        err = err.getvalue()\n        if ('Exception ignored when trying to send to the signal wakeup fd'\n            not in err):\n            raise AssertionError(err)\n        "]

stdout:
---

---

stderr:
---
Traceback (most recent call last):

  File "<string>", line 33, in <module>

AssertionError
---

======================================================================
FAIL: test_warn_on_full_buffer (test.test_signal.WakeupSocketSignalTests.test_warn_on_full_buffer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_signal.py", line 691, in test_warn_on_full_buffer
    assert_python_ok('-c', code)
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\support\script_helper.py", line 166, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\support\script_helper.py", line 151, in _assert_python
    res.fail(cmd_line)
        ^^^^
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\support\script_helper.py", line 76, in fail
    raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy3.11-c.exe', '-X', 'faulthandler', '-I', '-c', 'if 1:\n        import errno\n        import signal\n        import socket\n        import sys\n        import time\n        import _testcapi\n        from test.support import captured_stderr\n\n        signum = signal.SIGINT\n\n        # This handler will be called, but we intentionally won\'t read from\n        # the wakeup fd.\n        def handler(signum, frame):\n            pass\n\n        signal.signal(signum, handler)\n\n        read, write = socket.socketpair()\n\n        # Fill the socketpair buffer\n        if sys.platform == \'win32\':\n            # bpo-34130: On Windows, sometimes non-blocking send fails to fill\n            # the full socketpair buffer, so use a timeout of 50 ms instead.\n            write.settimeout(0.050)\n        else:\n            write.setblocking(False)\n\n        written = 0\n        if sys.platform == "vxworks":\n            CHUNK_SIZES = (1,)\n        else:\n            # Start with large chunk size to reduce the\n            # number of send needed to fill the buffer.\n            CHUNK_SIZES = (2 ** 16, 2 ** 8, 1)\n        for chunk_size in CHUNK_SIZES:\n            chunk = b"x" * chunk_size\n            try:\n                while True:\n                    write.send(chunk)\n                    written += chunk_size\n            except (BlockingIOError, TimeoutError):\n                pass\n\n        print(f"%s bytes written into the socketpair" % written, flush=True)\n\n        write.setblocking(False)\n        try:\n            write.send(b"x")\n        except BlockingIOError:\n            # The socketpair buffer seems full\n            pass\n        else:\n            raise AssertionError("%s bytes failed to fill the socketpair "\n                                 "buffer" % written)\n\n        # By default, we get a warning when a signal arrives\n        msg = (\'Exception ignored when trying to send \'\n               \'to the signal wakeup fd\')\n        signal.set_wakeup_fd(write.fileno())\n\n        with captured_stderr() as err:\n            signal.raise_signal(signum)\n\n        err = err.getvalue()\n        if msg not in err:\n            raise AssertionError("first set_wakeup_fd() test failed, "\n                                 "stderr: %r" % err)\n\n        # And also if warn_on_full_buffer=True\n        signal.set_wakeup_fd(write.fileno(), warn_on_full_buffer=True)\n\n        with captured_stderr() as err:\n            signal.raise_signal(signum)\n\n        err = err.getvalue()\n        if msg not in err:\n            raise AssertionError("set_wakeup_fd(warn_on_full_buffer=True) "\n                                 "test failed, stderr: %r" % err)\n\n        # But not if warn_on_full_buffer=False\n        signal.set_wakeup_fd(write.fileno(), warn_on_full_buffer=False)\n\n        with captured_stderr() as err:\n            signal.raise_signal(signum)\n\n        err = err.getvalue()\n        if err != "":\n            raise AssertionError("set_wakeup_fd(warn_on_full_buffer=False) "\n                                 "test failed, stderr: %r" % err)\n\n        # And then check the default again, to make sure warn_on_full_buffer\n        # settings don\'t leak across calls.\n        signal.set_wakeup_fd(write.fileno())\n\n        with captured_stderr() as err:\n            signal.raise_signal(signum)\n\n        err = err.getvalue()\n        if msg not in err:\n            raise AssertionError("second set_wakeup_fd() test failed, "\n                                 "stderr: %r" % err)\n\n        ']

stdout:
---
2818048 bytes written into the socketpair
---

stderr:
---
Traceback (most recent call last):

  File "<string>", line 67, in <module>

AssertionError: first set_wakeup_fd() test failed, stderr: ''
---

======================================================================
FAIL: test_keyboard_interrupt_exit_code (test.test_signal.WindowsSignalTests.test_keyboard_interrupt_exit_code)
KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_signal.py", line 226, in test_keyboard_interrupt_exit_code
    self.assertEqual(process.returncode, STATUS_CONTROL_C_EXIT)
         ^^^^^^^^^^^
AssertionError: 3 != 3221225786

----------------------------------------------------------------------
Ran 57 tests in 0.747s

FAILED (failures=5, errors=1, skipped=41)
test_signal failed (1 error, 5 failures)

== Tests result: FAILURE ==

1 test failed:
    test_signal

Total duration: 1.2 sec
Total tests: run=57 failures=5 skipped=41
Total test files: run=1/1 failed=1
Result: FAILURE
test test_signal failed
builder: pypy-c-jit-win-x86-64 build #2431+
test: lib-python/3/test/test_signal.py::unmodified