diff options
author | Rahat Mahmood <rahat@google.com> | 2018-12-17 14:11:10 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-12-17 14:12:24 -0800 |
commit | e9c4f69f36308b370579c954badc7ad90146d6e7 (patch) | |
tree | 20769d90c880149fdad1525c43c94946da6fd4ae /test/syscalls/linux | |
parent | faabaad5a20c174a85b307b3a1ede85185e38b92 (diff) |
Enable recently-fixed test case for shm_test.
PiperOrigin-RevId: 225887356
Change-Id: Iee000dcfc9e0168c2566edf41c66108be9b68cd6
Diffstat (limited to 'test/syscalls/linux')
-rw-r--r-- | test/syscalls/linux/shm.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/syscalls/linux/shm.cc b/test/syscalls/linux/shm.cc index 9d6d636d5..2c0f9b04a 100644 --- a/test/syscalls/linux/shm.cc +++ b/test/syscalls/linux/shm.cc @@ -427,6 +427,13 @@ TEST(ShmTest, RequestingDuplicateCreationFails) { PosixErrorIs(EEXIST, _)); } +TEST(ShmTest, NonExistentSegmentsAreNotFound) { + const TempPath keyfile = ASSERT_NO_ERRNO_AND_VALUE(TempPath::CreateFile()); + const key_t key = ftok(keyfile.path().c_str(), 1); + // Do not request creation. + EXPECT_THAT(Shmget(key, kAllocSize, 0777), PosixErrorIs(ENOENT, _)); +} + TEST(ShmTest, SegmentsSizeFixedOnCreation) { const TempPath keyfile = ASSERT_NO_ERRNO_AND_VALUE(TempPath::CreateFile()); const key_t key = ftok(keyfile.path().c_str(), 1); |