diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-10-21 17:19:42 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-10-21 17:19:42 +0000 |
commit | 3c090d7304df9e7698f6fc671aac211c638bd4c7 (patch) | |
tree | 50ba3594eabf426e743be1dc9cb684ea64b9ef96 | |
parent | cdcd5cbf775b5966347b0b1602c933d5faa1a295 (diff) |
Unify timeouts in gdbserver tests and ensure they are larger if ASAN is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@375431 91177308-0d34-0410-b5e6-96231b3b80d8
5 files changed, 10 insertions, 8 deletions
diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py index 5a3ae9268..70cc25520 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py @@ -53,7 +53,7 @@ class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase): self.add_process_info_collection_packets() # Run the stream - context = self.expect_gdbremote_sequence(timeout_seconds=8) + context = self.expect_gdbremote_sequence(timeout_seconds=self._DEFAULT_TIMEOUT) self.assertIsNotNone(context) # Gather process info response diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py index 1d3a63d27..0944ba5d0 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py @@ -52,7 +52,7 @@ class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase): self.assertIsNotNone(context) # Wait until all threads have started. - threads = self.wait_for_thread_count(thread_count, timeout_seconds=3) + threads = self.wait_for_thread_count(thread_count, timeout_seconds=self._WAIT_TIMEOUT) self.assertIsNotNone(threads) # On Windows, there could be more threads spawned. For example, DebugBreakProcess will diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py b/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py index a3abe203a..1b30718f7 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py @@ -639,7 +639,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.run_process_then_stop(run_seconds=1) # Wait at most x seconds for 3 threads to be present. - threads = self.wait_for_thread_count(3, timeout_seconds=5) + threads = self.wait_for_thread_count(3, timeout_seconds=self._WAIT_TIMEOUT) self.assertEqual(len(threads), 3) # verify we can $H to each thead, and $qC matches the thread we set. @@ -735,7 +735,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod 2: "thread_id"}}], True) - context = self.expect_gdbremote_sequence(timeout_seconds=10) + context = self.expect_gdbremote_sequence(timeout_seconds=self._DEFAULT_TIMEOUT) self.assertIsNotNone(context) signo = context.get("signo") self.assertEqual(int(signo, 16), segfault_signo) @@ -771,7 +771,8 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod True) # Run the sequence. - context = self.expect_gdbremote_sequence(timeout_seconds=10) + context = self.expect_gdbremote_sequence( + timeout_seconds=self._DEFAULT_TIMEOUT) self.assertIsNotNone(context) # Ensure the stop signal is the signal we delivered. @@ -1485,7 +1486,7 @@ class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod self.assertIsNotNone(context) # Wait for 3 threads to be present. - threads = self.wait_for_thread_count(3, timeout_seconds=5) + threads = self.wait_for_thread_count(3, timeout_seconds=self._WAIT_TIMEOUT) self.assertEqual(len(threads), 3) expected_reg_values = [] diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py b/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py index 18efbf9d6..664b6001d 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py @@ -14,7 +14,7 @@ class TestStubReverseConnect(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) - _DEFAULT_TIMEOUT = 20 + _DEFAULT_TIMEOUT = 20 * (10 if ('ASAN_OPTIONS' in os.environ) else 1) def setUp(self): # Set up the test. diff --git a/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py index 670d770f8..ac611bcca 100644 --- a/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py +++ b/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py @@ -32,8 +32,9 @@ class GdbRemoteTestCaseBase(TestBase): NO_DEBUG_INFO_TESTCASE = True _TIMEOUT_SECONDS = 120 * (10 if ('ASAN_OPTIONS' in os.environ) else 1) + _DEFAULT_TIMEOUT = 10 * (10 if ('ASAN_OPTIONS' in os.environ) else 1) _READ_TIMEOUT = 5 * (10 if ('ASAN_OPTIONS' in os.environ) else 1) - _WAIT_TIMEOUT = 3 * (10 if ('ASAN_OPTIONS' in os.environ) else 1) + _WAIT_TIMEOUT = 5 * (10 if ('ASAN_OPTIONS' in os.environ) else 1) _GDBREMOTE_KILL_PACKET = "$k#6b" |