summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/shm.cc
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2020-08-18 16:02:52 -0700
committerRahat Mahmood <46939889+mrahatm@users.noreply.github.com>2020-08-19 11:38:34 -0700
commite38e559d23ddc92cf9f94ad4207e2ea48bf4c8df (patch)
tree3966f19fa9b928aa727ba7e6cc9bd922a4ff082c /test/syscalls/linux/shm.cc
parent3e6d607ee45b817d146c6a5b791a64608c1e9d0c (diff)
Fix return value in shm_test for opensource
Some machines return 128 + signal for failures. Accept that as a valid result. PiperOrigin-RevId: 327326113
Diffstat (limited to 'test/syscalls/linux/shm.cc')
-rw-r--r--test/syscalls/linux/shm.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/syscalls/linux/shm.cc b/test/syscalls/linux/shm.cc
index c7fdbb924..d6e8b3e59 100644
--- a/test/syscalls/linux/shm.cc
+++ b/test/syscalls/linux/shm.cc
@@ -29,6 +29,8 @@ namespace testing {
namespace {
using ::testing::_;
+using ::testing::AnyOf;
+using ::testing::Eq;
const uint64_t kAllocSize = kPageSize * 128ULL;
@@ -394,7 +396,8 @@ TEST(ShmDeathTest, SegmentNotAccessibleAfterDetach) {
};
EXPECT_THAT(InForkedProcess(rest),
- IsPosixErrorOkAndHolds(W_EXITCODE(0, SIGSEGV)));
+ IsPosixErrorOkAndHolds(AnyOf(Eq(W_EXITCODE(0, SIGSEGV)),
+ Eq(W_EXITCODE(0, 128 + SIGSEGV)))));
}
TEST(ShmTest, RequestingSegmentSmallerThanSHMMINFails) {