Issue |
133914
|
Summary |
[LIT] Tests take entire timeout duration after failing when exception is thrown in internal shell
|
Labels |
|
Assignees |
|
Reporter |
ayylol
|
When using the internal lit shell, if a test throws an exception and a timeout is set the test will take the entire duration of the timeout before finishing. This can happen for example if we try to execute a non-existent file. The tests hang here, at the `pool.join()` call. https://github.com/llvm/llvm-project/blob/19970535f92c0f2dcda01b7fc60f95945166e424/llvm/utils/lit/lit/run.py#L87-L93
This is related to this:
https://stackoverflow.com/questions/15314189/python-multiprocessing-pool-hangs-at-join
## To Reproduce
1. Add a test that will try to execute a non-existent file:
```
; llvm-project/llvm/test/hang.ll
; RUN: non-existent
```
2. Change the test suite's configuration to use the internal shell. (Remove the `not` from this line)
https://github.com/llvm/llvm-project/blob/c1efd8b663b7db3c717fae8a1991dcc4b8304c8f/llvm/test/lit.cfg.py#L21
3. Run the test with a time out set:
```
llvm-lit llvm/test/hang.ll -a --timeout=10
```
The test should fail immediately, but the execution of lit will not conclude until the full timeout elapses.
If instead we use the external shell, or not set a timeout then the execution of lit will conclude immediately after the test fails.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs