mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix return value for MMap Tests in OpenSource
Some systems return 128 + errno instead of just errno, which is the case here. PiperOrigin-RevId: 327247836
This commit is contained in:
committed by
gVisor bot
parent
6d0c5803d5
commit
da5c2ea6dc
@@ -43,6 +43,8 @@
|
||||
#include "test/util/temp_path.h"
|
||||
#include "test/util/test_util.h"
|
||||
|
||||
using ::testing::AnyOf;
|
||||
using ::testing::Eq;
|
||||
using ::testing::Gt;
|
||||
|
||||
namespace gvisor {
|
||||
@@ -296,7 +298,8 @@ TEST_F(MMapTest, MapDevZeroSegfaultAfterUnmap) {
|
||||
};
|
||||
|
||||
EXPECT_THAT(InForkedProcess(rest),
|
||||
IsPosixErrorOkAndHolds(W_EXITCODE(0, SIGSEGV)));
|
||||
IsPosixErrorOkAndHolds(AnyOf(Eq(W_EXITCODE(0, SIGSEGV)),
|
||||
Eq(W_EXITCODE(0, 128 + SIGSEGV)))));
|
||||
}
|
||||
|
||||
TEST_F(MMapTest, MapDevZeroUnaligned) {
|
||||
|
||||
Reference in New Issue
Block a user