File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 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"))
194194 // First assert the order
195195 REQUIRE (wakes_with_beacon == 0 );
196196 REQUIRE (wakes_with_beacon <= wakes_with_waits);
197- REQUIRE (wakes_with_waits <= wakes_with_spinloop);
198197
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+ }
202210 }
203211 }
204212 }
You can’t perform that action at this time.
0 commit comments