summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2021-07-23 12:04:49 -0700
committergVisor bot <gvisor-bot@google.com>2021-07-23 12:07:57 -0700
commitea0d9a8f48f13bd15f9450848bd515a337750192 (patch)
tree38760954413a69c17e8dfa7a00be3ed07bf367e6 /test/syscalls
parentc3c5c55d134dcc22480984e3882072b936bae899 (diff)
buildkite: deflake itimer test
The self-admittedly arbitrary threshold of 20% of alarms being sent to the main thread was being breached. I saw a run of of ~20-23% [1]. We should allow for a little more breathing room. 1 - https://buildkite.com/gvisor/pipeline/builds/7400 PiperOrigin-RevId: 386503482
Diffstat (limited to 'test/syscalls')
-rw-r--r--test/syscalls/linux/itimer.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/syscalls/linux/itimer.cc b/test/syscalls/linux/itimer.cc
index ac113e6da..9fb04eae6 100644
--- a/test/syscalls/linux/itimer.cc
+++ b/test/syscalls/linux/itimer.cc
@@ -197,9 +197,9 @@ int TestSIGALRMToMainThread() {
// (but don't guarantee it), so we expect to see most samples on the main
// thread.
//
- // The number of SIGALRMs delivered to a worker should not exceed 20%
+ // The number of SIGALRMs delivered to a worker should not exceed 40%
// of the number of total signals expected (this is somewhat arbitrary).
- const int worker_threshold = result.expected_total / 5;
+ const int worker_threshold = result.expected_total / 5 * 2;
//
// Linux only guarantees timers will never expire before the requested time.
@@ -230,7 +230,8 @@ TEST(ItimerTest, DeliversSIGALRMToMainThread) {
// Not required anymore.
kill.Release();
- EXPECT_TRUE(WIFEXITED(status) && WEXITSTATUS(status) == 0) << status;
+ EXPECT_EQ(WIFEXITED(status) && WEXITSTATUS(status), 0)
+ << WIFEXITED(status) << " " << WEXITSTATUS(status);
}
// Signals are delivered to threads fairly.