mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-16 13:20:41 +00:00

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
25 lines
717 B
Plaintext
25 lines
717 B
Plaintext
"""Tests that a timeout is detected by the testbot."""
|
|
from __future__ import print_function
|
|
|
|
import time
|
|
|
|
import lldbsuite.test.decorators as decorators
|
|
import rerun_base
|
|
|
|
|
|
class RerunTimeoutTestCase(rerun_base.RerunBaseTestCase):
|
|
@decorators.no_debug_info_test
|
|
def test_timeout_rerun_succeeds(self):
|
|
"""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:
|
|
print("ignoring exception during sleep")
|