From 430309f13a89cb48bbff0d51768c88e8022b127b Mon Sep 17 00:00:00 2001 From: Todd Fiala Date: Mon, 18 Apr 2016 16:09:21 +0000 Subject: fix a race is the LLDB test suite results collection The race boiled down to this: If a test worker queue is able to run the test inferior and clean up before the dosep.py listener socket is spun up, and the worker queue is the last one (as would be the case when there's only one test rerunning in the rerun queue), then the test suite will exit the main loop before having a chance to process any test events coming from the test inferior or the worker queue job control. I found this race to be far more likely on fast hardware. Our Linux CI is one such example. While it will show up primarily during meta test events generated by a worker thread when a test inferior times out or exits with an exceptional exit (e.g. seg fault), it only requires that the OS takes longer to hook up the listener socket than it takes for the final test inferior and worker thread to shut down. See: http://reviews.llvm.org/D19214 reviewed by: Pavel Labath llvm-svn: 266624 --- .../lldbsuite/test/issue_verification/TestRerunTimeout.py.park | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunTimeout.py.park') diff --git a/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunTimeout.py.park b/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunTimeout.py.park index 1cf5373ac49..a8f5542ae2f 100644 --- a/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunTimeout.py.park +++ b/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunTimeout.py.park @@ -3,19 +3,21 @@ from __future__ import print_function import time -import lldbsuite.test.lldbtest as lldbtest +import lldbsuite.test.decorators as decorators import rerun_base class RerunTimeoutTestCase(rerun_base.RerunBaseTestCase): - @lldbtest.no_debug_info_test + @decorators.no_debug_info_test def test_timeout_rerun_succeeds(self): - """Tests that timeout logic kicks in and is picked up.""" + """Tests that the timeout logic kicks in and that this timeout is picked up.""" if not self.should_generate_issue(): # We pass this time. return + # We time out this time. while True: + # noinspection PyBroadException try: time.sleep(1) except: -- cgit v1.2.3