diff options
| author | Ralf Jung <post@ralfj.de> | 2025-01-26 19:58:43 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-26 19:58:43 +0000 |
| commit | 05a2dcdbd0b11477aaa4d7879ad2c9f36cf93e08 (patch) | |
| tree | b8eb364a24f496ebd56cc6ada2625fff0ac2dcbf | |
| parent | 584bb0db4226e32472597c9d95802503396e6b78 (diff) | |
| parent | 37030ac2793e53fc25ab4443f4bd494775bab56e (diff) | |
| download | rust-05a2dcdbd0b11477aaa4d7879ad2c9f36cf93e08.tar.gz rust-05a2dcdbd0b11477aaa4d7879ad2c9f36cf93e08.zip | |
Merge pull request #4154 from RalfJung/linux-futex
make linux-futex test less flaky
| -rw-r--r-- | src/tools/miri/tests/pass-dep/concurrency/linux-futex.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/miri/tests/pass-dep/concurrency/linux-futex.rs b/src/tools/miri/tests/pass-dep/concurrency/linux-futex.rs index 3adeb89ecec..0ca13b5039d 100644 --- a/src/tools/miri/tests/pass-dep/concurrency/linux-futex.rs +++ b/src/tools/miri/tests/pass-dep/concurrency/linux-futex.rs @@ -235,7 +235,7 @@ fn concurrent_wait_wake() { static mut DATA: i32 = 0; static WOKEN: AtomicI32 = AtomicI32::new(0); - let rounds = 50; + let rounds = 64; for _ in 0..rounds { unsafe { DATA = 0 }; // Reset // Suppose the main thread is holding a lock implemented using futex... @@ -267,8 +267,7 @@ fn concurrent_wait_wake() { } }); // Increase the chance that the other thread actually goes to sleep. - // (5 yields in a loop seem to make that happen around 40% of the time.) - for _ in 0..5 { + for _ in 0..6 { thread::yield_now(); } |
