Increase gdbremote_testcase timeouts when running under ASAN.

llvm-svn: 374906
This commit is contained in:
Adrian Prantl 2019-10-15 15:46:17 +00:00
parent 263eb36869
commit b459be1025
1 changed files with 12 additions and 5 deletions

View File

@ -31,7 +31,9 @@ class GdbRemoteTestCaseBase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
_TIMEOUT_SECONDS = 120
_TIMEOUT_SECONDS = 120 * (1 if ('ASAN_OPTIONS' in os.environ) else 10)
_READ_TIMEOUT = 5 * (1 if ('ASAN_OPTIONS' in os.environ) else 10)
_WAIT_TIMEOUT = 3 * (1 if ('ASAN_OPTIONS' in os.environ) else 10)
_GDBREMOTE_KILL_PACKET = "$k#6b"
@ -201,7 +203,7 @@ class GdbRemoteTestCaseBase(TestBase):
return (named_pipe_path, named_pipe, named_pipe_fd)
def get_stub_port_from_named_socket(self, read_timeout_seconds=5):
def get_stub_port_from_named_socket(self, read_timeout_seconds):
# Wait for something to read with a max timeout.
(ready_readers, _, _) = select.select(
[self.named_pipe_fd], [], [], read_timeout_seconds)
@ -405,7 +407,7 @@ class GdbRemoteTestCaseBase(TestBase):
# If we're receiving the stub's listening port from the named pipe, do
# that here.
if self.named_pipe:
self.port = self.get_stub_port_from_named_socket()
self.port = self.get_stub_port_from_named_socket(self._READ_TIMEOUT)
return server
@ -621,7 +623,10 @@ class GdbRemoteTestCaseBase(TestBase):
written_byte_count:]
self.assertEqual(len(request_bytes_remaining), 0)
def do_handshake(self, stub_socket, timeout_seconds=5):
def do_handshake(self, stub_socket, timeout_seconds=None):
if not timeout_seconds:
timeout_seconds = self._WAIT_TIMEOUT
# Write the ack.
self.expect_socket_send(stub_socket, "+", timeout_seconds)
@ -879,7 +884,9 @@ class GdbRemoteTestCaseBase(TestBase):
thread_ids.extend(new_thread_infos)
return thread_ids
def wait_for_thread_count(self, thread_count, timeout_seconds=3):
def wait_for_thread_count(self, thread_count, timeout_seconds=None):
if not timeout_seconds:
timeout_seconds = self._WAIT_TIMEOUT
start_time = time.time()
timeout_time = start_time + timeout_seconds