@@ -352,16 +352,24 @@ def __init__(self, regrtest):
|
352 | 352 | self.output = queue.Queue() |
353 | 353 | self.pending = MultiprocessIterator(self.regrtest.tests) |
354 | 354 | if self.ns.timeout is not None: |
355 | | -self.worker_timeout = self.ns.timeout * 1.5 |
| 355 | +# Rely on faulthandler to kill a worker process. This timouet is |
| 356 | +# when faulthandler fails to kill a worker process. Give a maximum |
| 357 | +# of 5 minutes to faulthandler to kill the worker. |
| 358 | +self.worker_timeout = min(self.ns.timeout * 1.5, |
| 359 | +self.ns.timeout + 5 * 60) |
356 | 360 | else: |
357 | 361 | self.worker_timeout = None |
358 | 362 | self.workers = None |
359 | 363 | |
360 | 364 | def start_workers(self): |
361 | 365 | self.workers = [TestWorkerProcess(index, self) |
362 | 366 | for index in range(1, self.ns.use_mp + 1)] |
363 | | -self.log("Run tests in parallel using %s child processes" |
364 | | -% len(self.workers)) |
| 367 | +msg = f"Run tests in parallel using {len(self.workers)} child processes" |
| 368 | +if self.ns.timeout: |
| 369 | +msg += (" (timeout: %s, worker timeout: %s)" |
| 370 | +% (format_duration(self.ns.timeout), |
| 371 | +format_duration(self.worker_timeout))) |
| 372 | +self.log(msg) |
365 | 373 | for worker in self.workers: |
366 | 374 | worker.start() |
367 | 375 | |
|