From eed0c6ee44c3ac9d6d7b393ab8b1077cf84b7271 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Tue, 17 Nov 2026 03:57:09 -0600 Subject: [PATCH] aurora-sep: send Ctrl-C again in the survey stop test (cherry picked from commit 796e02859d18ce3ac6c787d97fdbff221dc2e76c) --- 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 7dc7cd998279f..c242c71a9e20e 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()), [])