-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
flaky tests: state_application, unicode_normalization #3353
Comments
The second one is perhaps a race condition between writing the file, and the FS metadata being visible. ext4? We'll probably need to add a small delay, or force a flush to disk. |
File system developer hat on, a file system must make metadata changes visible immediately after the IO returned, even if it's not flushed to disk, or that's a bug in the FS. I'm not aware of such bugs recently so I'd be surprised we ran into one... But that is a valuable hint; if unused is based on file timestamp there are some filesystems with a second granularitywhere it could be easy to imagine that a timestamp didn't change during the duration of the test... Unfortunately I just tried on one (after fiddling a bit, ext3 works with utf8 and has second granularity), and I can't reproduce with that either; I've checked with strace that the timestamp returned by stat() doesn't change during the duration of the test and the test still passes
Is there another timestamp in the media.db ? |
|
@abdnh if this interests you, would you mind looking into this when you have a chance? |
Hello,
We run tests as part of the nixos build and it would appear some tests are flaky:
I could reproduce the
state_application
one, running it in a tight loop (grabbing the exact test command fromcargo test -vv
to avoid the cargo overhead) reproduces within 10-60s on my laptop (~1/250 - 1/2000 runs)That can be worked around by masking the elapsed_time explicitly but it's not great, looking at the code
self.set_elapsed_secs_equal
might interfere with the test if it runs right at a second boundary?Unfortunately I couldn't reproduce the second one through sheer running it in a loop, either other tests interfere with some global state? or it could be an environment problem, I'm not sure.
I also had a quick look and ぱぱ.jpg apparently shouldn't have been unused but I haven't gone far enough to figure what makes things unused and why it would be the case here...
The text was updated successfully, but these errors were encountered: