From 74f84d302a01f49312440ff0c5e411ce4367cbce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Tue, 7 May 2019 01:18:37 +0000 Subject: [PATCH] Add workaround to improve test-suite reliability Not all of our injectors handle injection into processes that haven't finished initializing, so for now delay a little before attaching. --- tests/test_rpc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_rpc.py b/tests/test_rpc.py index fa6b1d0..e1286f9 100644 --- a/tests/test_rpc.py +++ b/tests/test_rpc.py @@ -20,6 +20,8 @@ class TestRpc(unittest.TestCase): def setUp(cls): system = platform.system() cls.target = subprocess.Popen([target_program], stdin=subprocess.PIPE) + # TODO: improve injectors to handle injection into a process that hasn't yet finished initializing + time.sleep(0.05) cls.session = frida.attach(cls.target.pid) @classmethod