Skip to content

Is overwriting_files_and_lone_directories_works flaky? #1789

Answered by Byron
EliahKagan asked this question in Q&A
Discussion options

You must be logged in to vote

I believe to remember that the non-determinism comes from the probe itself. Initially it was racy, and I think I did combat this by putting it behind a lock and shared memory within a single test binary. This may mean that when multiple test binaries are run in parallel, they'd still step on each other's feet.

But… a quick check reveals that this should now be permanently fixed, assuming the random number generator is automatically seeded differently among different binaries. A trait I'd expect but didn't verify.

let rand = fastrand::usize(..);
let link_path = root.join(format!("__file_link{rand}"));
if c…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Byron
Comment options

@EliahKagan
Comment options

@Byron
Comment options

@EliahKagan
Comment options

@EliahKagan
Comment options

Answer selected by EliahKagan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants