<div dir="ltr">Hi,<div><br></div><div>We've given this an eyeball, and reckon there's interference between the lit "shtest-format" and "shtest-xunit-output" tests -- the following two run commands:</div><div><br></div><div>    # RUN: not %{lit} -j 1 -v %{inputs}/shtest-format > %t.out<br></div><div>    # RUN: not %{lit} -j 1 -v %{inputs}/shtest-format --xunit-xml-output %t.xml<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">appear in the tests respectively, using the utils/lit/tests/Inputs/shtest-format directory as the target test suite. For external-shell tests in that suite however, lit produces a '.script.bat' file in the build directory to be run by the external shell:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">    $ pwd</div><div class="gmail_extra">    /cygdrive/d/build/utils/lit/tests/Inputs/shtest-format/external_shell/Output</div><div class="gmail_extra"><br></div><div class="gmail_extra">    $ ls<br></div><div class="gmail_extra">    fail.txt.script.bat  fail_with_bad_encoding.txt.script.bat  pass.txt.script.bat</div><div class="gmail_extra"><br></div><div class="gmail_extra">Two concurrent lit invocations running on the same test suite will both write to those files, creating racy filesystem behaviour and likely the errors that have been seen. I've found at least one shtest-xunit-output test run with a "Permission denied" error when writing to the script file (on Windows). The race is still present for non-windows systems but presumably much rarer.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I'm not very familiar with lit, and presumably making the external-shell scripts temporarily named files would fix this, but there may be other assumptions lit makes about a test suite not being operated on concurrently.</div><div class="gmail_extra"><br></div><div class="gmail_extra">--</div><div class="gmail_extra">Thanks,</div><div class="gmail_extra">Jeremy</div><div class="gmail_extra"><br></div></div></div>