-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e2e::directories::dep_on_current_directory
spontaneous failure
#133
Comments
That does look like a race, hmm. The test runner runs the e2e tests in parallel threads, but they each spawn a separate n2 process so there should be no buffering-related issues. But the threads do each create their own temp dir. Those appear to use a thread-local random number generator... is it possible each thread has the same seed? I would expect more races in that case. |
Oh wait, looking at the test, more likely it just didn't notice the directory changed. I will fix it. |
I am sorta not sure what is going on here, because if the test usually passes that means we do see directory modifications. It looks like stat has high resolution on Linux: |
e2e::directories::dep_on_current_directory
failuree2e::directories::dep_on_current_directory
spontaneous failure
Was looking due to #133 but I do not see the issue.
Was looking due to #133 but I do not see the issue.
I mean flushing the file contents to disk after TestSpace::write, but it seems to be using std::fs::write under the hood, so probably that's not the case. |
Got this spontaneous failure, cannot reproduce:
The bytes are, correspondingly,
b"build.ninja\nfoo\nout\n"
and
b"build.ninja\nfoo\nfoo2\nout\n"
The code in question:
n2/tests/e2e/directories.rs
Lines 3 to 21 in bea43cd
Maybe a race condition between tests or a buffer did not get flushed?
The text was updated successfully, but these errors were encountered: