Created attachment 12540
Example output from lit under Windows
OS: Windows 8.1
Python: Python 3.4
It seems that when running with the default --use-threads under Windows 8 with multiple threads tests can randomly fail. Which looks like a race condition.
What it looks like is happening is that commands in the test are being executed on files before those files are closed.
Steps to reproduce
Here is a randomly generated test suite that uses lit and which appears on Windows to randomly fail (the number of tests and which tests fail is not consistent) when using --use-threads and thread count is greater than 1.
The output shown above (truncated) from the fc tool (the Windows version of the diff tool) seems to suggest that the temporary file created by the first command in the tests (%t) is empty when fc was executed which suggests to me that the temporary file isn't closed properly before executing the next command.
It appears if I use the --use-processes flag instead then these random test failures do not occur. Attached is an example of the output seen when executing under Windows.
failing-lit-tests.txt
(4281 bytes, text/plain)Created attachment 12540 Example output from lit under Windows
OS: Windows 8.1 Python: Python 3.4
It seems that when running with the default
--use-threads
under Windows 8 with multiple threads tests can randomly fail. Which looks like a race condition.What it looks like is happening is that commands in the test are being executed on files before those files are closed.
Steps to reproduce
Here is a randomly generated test suite that uses lit and which appears on Windows to randomly fail (the number of tests and which tests fail is not consistent) when using --use-threads and thread count is greater than 1.
The tests have the following format
RUN: python %s > %t
RUN: %diff %s.expect %t
%s.expect
is a text file containing the expected output of running the first command.When I run I randomly see messages like this...
The output shown above (truncated) from the
fc
tool (the Windows version of the diff tool) seems to suggest that the temporary file created by the first command in the tests (%t) is empty whenfc
was executed which suggests to me that the temporary file isn't closed properly before executing the next command.It appears if I use the
--use-processes
flag instead then these random test failures do not occur. Attached is an example of the output seen when executing under Windows.