forked from OSchip/llvm-project
Unify timeouts in gdbserver tests and ensure they are larger if ASAN is enabled.
llvm-svn: 375431
This commit is contained in:
parent
ae99712559
commit
5827a82a58
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue