Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 05a2dcd

Browse files
Merge pull request #4154 from RalfJung/linux-futex
make linux-futex test less flaky
2 parents 584bb0d + 37030ac commit 05a2dcd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/tools/miri/tests/pass-dep/concurrency/linux-futex.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ fn concurrent_wait_wake() {
235235
static mut DATA: i32 = 0;
236236
static WOKEN: AtomicI32 = AtomicI32::new(0);
237237

238-
let rounds = 50;
238+
let rounds = 64;
239239
for _ in 0..rounds {
240240
unsafe { DATA = 0 }; // Reset
241241
// Suppose the main thread is holding a lock implemented using futex...
@@ -267,8 +267,7 @@ fn concurrent_wait_wake() {
267267
}
268268
});
269269
// Increase the chance that the other thread actually goes to sleep.
270-
// (5 yields in a loop seem to make that happen around 40% of the time.)
271-
for _ in 0..5 {
270+
for _ in 0..6 {
272271
thread::yield_now();
273272
}
274273

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /