From 9e2e0215faf8f8c2c100dea00d18cff7dc0ecd7e Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Fri, 4 Dec 2026 17:43:20 -0500 Subject: [PATCH] Give each fixture run in a test its own spawner socket --- tools/tests/test_native_hook_handoff.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/tests/test_native_hook_handoff.py b/tools/tests/test_native_hook_handoff.py index 17f733845d..490b592d19 100644 --- a/tools/tests/test_native_hook_handoff.py +++ b/tools/tests/test_native_hook_handoff.py @@ -1587,6 +1587,9 @@ class NativeHookHandoffTest(unittest.TestCase): def run_parent(self, *argv, handoff="target", hook=True, reports=True, pressure=None, as_shell=False, terminal=False, delay=0, extra_env=None, parent_name=None): name = "dd-handoff-test-%d-%s-%s-%d" % (os.getpid(), self.id().rsplit(".", 1)[-1], handoff, hook) + self.runs = getattr(self, "runs", 0) + 1 # subtests run the fixture again under the same test id + if self.runs > 1: + name += "-%d" % self.runs spawner = FakeSpawner(name, self.prefix or [], self.root, reports, delay) spawner.start() self.addCleanup(spawner.sock.close) @@ -1920,7 +1923,7 @@ class NativeHookHandoffTest(unittest.TestCase): self.assertEqual(1, len(requests), out.stderr) self.assertEqual(["wine", "/opt/wine/bin/wine", command_line, "7"], requests[0]["argv"]) - def test_a_windows_program_from_outside_c_windows_is_not_handed_off(self): + def test_a_game_under_wine_is_not_handed_off(self): # a game: Android would sample its memory as an app process's own for command_line in ("LikeADragonPirates.exe", "S:\\steamapps\\common\\Game\\startup.exe", ".\\crashreport\\crashpad_handler.exe", "C:\\windowsapps\\game.exe"): @@ -1929,7 +1932,7 @@ class NativeHookHandoffTest(unittest.TestCase): self.assertEqual([], requests, out.stderr) self.assertEqual("1", result.get("same"), out.stdout) - def test_near_the_limit_a_windows_program_from_outside_c_windows_is_not_handed_off(self): + def test_near_the_limit_a_game_under_wine_is_not_handed_off(self): result, requests, out = self.run_wine("LikeADragonPirates.exe", pressure=0, as_shell=True) self.assertEqual([], requests, out.stderr)