summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/rseq.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/syscalls/linux/rseq.cc')
-rw-r--r--test/syscalls/linux/rseq.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/syscalls/linux/rseq.cc b/test/syscalls/linux/rseq.cc
index 4bfb1ff56..94f9154a0 100644
--- a/test/syscalls/linux/rseq.cc
+++ b/test/syscalls/linux/rseq.cc
@@ -24,6 +24,7 @@
#include "test/syscalls/linux/rseq/uapi.h"
#include "test/util/logging.h"
#include "test/util/multiprocess_util.h"
+#include "test/util/posix_error.h"
#include "test/util/test_util.h"
namespace gvisor {
@@ -31,6 +32,9 @@ namespace testing {
namespace {
+using ::testing::AnyOf;
+using ::testing::Eq;
+
// Syscall test for rseq (restartable sequences).
//
// We must be very careful about how these tests are written. Each thread may
@@ -98,7 +102,7 @@ void RunChildTest(std::string test_case, int want_status) {
int status = 0;
ASSERT_THAT(RetryEINTR(waitpid)(child_pid, &status, 0), SyscallSucceeds());
- ASSERT_EQ(status, want_status);
+ ASSERT_THAT(status, AnyOf(Eq(want_status), Eq(128 + want_status)));
}
// Test that rseq must be aligned.