From a3d44fa6ed116c3c71ea9c837e63b27f9ff089ac Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:00:32 -0600 Subject: [PATCH] aurora-sep: send Ctrl-C again in the survey stop test test_ctrl_c_stops_the_load sent one SIGINT and then waited 30 s. Under load bash sometimes drops that signal. The survey then runs to the end and exits 0, and the test fails with "0 != 130" (CI run 42771530679 on PR 191, passed on re-run of the same head). Send SIGINT again every 2 s, up to 4 times, like a user who presses Ctrl-C again. The 130 exit code and stderr checks stay as they were. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> --- tools/aurora-sep/tests/test_m3_max.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/aurora-sep/tests/test_m3_max.py b/tools/aurora-sep/tests/test_m3_max.py index 7dc7cd998279f2..c242c71a9e20ea 100644 --- a/tools/aurora-sep/tests/test_m3_max.py +++ b/tools/aurora-sep/tests/test_m3_max.py @@ -1169,8 +1169,17 @@ def test_ctrl_c_stops_the_load(self): self.max_mac("j514c", backlight=True) p = self.popen("M3_SURVEY_PHASE_S=10\n") self.wait_for(lambda: len(self.loads()) >= 16, "the load") - os.killpg(p.pid, signal.SIGINT) - out, err = p.communicate(timeout=30) + # Under load bash sometimes drops one SIGINT and the survey runs to the end (exit 0). A user + # presses Ctrl-C again, so send it again. + for _ in range(4): + os.killpg(p.pid, signal.SIGINT) + try: + out, err = p.communicate(timeout=2) + break + except subprocess.TimeoutExpired: + pass + else: + out, err = p.communicate(timeout=30) self.assertEqual(p.returncode, 130, err) self.assertIn("interrupted: the load is stopped", err) self.assertEqual(list(self.out.iterdir()), [])