| Issue |
203696
|
| Summary |
llvm-lit max-failures has a race condition
|
| Labels |
|
| Assignees |
|
| Reporter |
RosieBaish
|
The --max-failures flag for llvm-lit has a race condition, even with -j1.
If you set max-failures=1, and then have 2 rapid test failures early in the run, both can be reported as failures before the code to count how many tests have failed has run.
As far as I can tell, the tests start running asyncronously as soon as they're added to the pool on line 122 of lit/lit/run.py
But the check for the number of failures doesn't happen until line 156.
It would be expected that there could be a race condition if you were running tests in multiple threads, but with -j1 you would expect there not to be.
I'm unsure what the correct fix is here.
A full removal of the race condition would require a lot more locking which would slow down test execution.
Perhaps having a (duplicated) check in the display code to track the max number of failures would work?
Or have a special case for -j1 which runs everything syncronously.
It's also unclear how vital this is to fix, although if we're going to have a max-failures flag it probably ought to work
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs