From cefc364b3130df3a13a736a2e15b9d831720e00b Mon Sep 17 00:00:00 2001 From: Mangesh Raut Date: Tue, 27 Oct 2026 10:29:05 +0000 Subject: [PATCH] fix(tests): restore SIGINT handler in keyboard-interrupt fill child Background non-interactive shells inherit SIGINT as SIG_IGN, so the re-armed interrupt from a fill never becomes KeyboardInterrupt. Fixes #3213 --- cuda_core/tests/test_driver_table.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cuda_core/tests/test_driver_table.py b/cuda_core/tests/test_driver_table.py index 3a0f073d5a0..8366b458f8e 100644 --- a/cuda_core/tests/test_driver_table.py +++ b/cuda_core/tests/test_driver_table.py @@ -169,9 +169,14 @@ def test_missing_table_entry_names_the_mismatch(tmp_path): _INTERRUPTED_CHILD = textwrap.dedent(""" + import signal import warnings import cuda.bindings._internal.nvrtc as loader + # Non-interactive background shells inherit SIGINT as SIG_IGN; restore the + # default handler so a re-armed interrupt becomes KeyboardInterrupt. + signal.signal(signal.SIGINT, signal.default_int_handler) + real_inspect = loader._inspect_function_pointers def interrupting_inspect():