File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -194,11 +194,19 @@ TEST_CASE("WorkBeacon" * doctest::test_suite("workbeacon"))
194
194
// First assert the order
195
195
REQUIRE (wakes_with_beacon == 0 );
196
196
REQUIRE (wakes_with_beacon <= wakes_with_waits);
197
- REQUIRE (wakes_with_waits <= wakes_with_spinloop);
198
197
199
- // Then try to be a little more precise, allowing head-room for
200
- // different build configs and cosmic rays
201
- REQUIRE (wakes_with_waits * 10 < wakes_with_spinloop);
198
+ // In occasional runs on some build configurations, we see 0 wakes
199
+ // when using the spinloop. This is surprising, but not impossible. In
200
+ // this instance we obviously don't see any improvement in the waiting
201
+ // scheme, so skip the following assertions
202
+ if (wakes_with_spinloop > 0 )
203
+ {
204
+ REQUIRE (wakes_with_waits < wakes_with_spinloop);
205
+
206
+ // Then try to be a little more precise, allowing head-room for
207
+ // different build configs and cosmic rays
208
+ REQUIRE (wakes_with_waits * 10 < wakes_with_spinloop);
209
+ }
202
210
}
203
211
}
204
212
}
You can’t perform that action at this time.
0 commit comments