summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-12-04 15:03:26 -0800
committergVisor bot <gvisor-bot@google.com>2020-12-04 15:11:55 -0800
commit7a1de8583d7c16fb5436cd1bfcf6e9c9fb62a820 (patch)
treeb1e682e7ffe3708c6e398ae9aa8d17cfacdde260 /test
parent216abfb6dfa437166627cf7e2d2a66ae95aad07e (diff)
Remove invalid test case.
The next test case is perfectly valid, which creates a test directory with appropriate permissions and ensures that you can't create a file. This test case assumes that the root directory has certain permissions. In this case, we may have EROFS instead of a permission error, but it's perfectly plausible that no error occurs at all. The test is not valid. PiperOrigin-RevId: 345764412
Diffstat (limited to 'test')
-rw-r--r--test/syscalls/linux/open_create.cc8
1 files changed, 0 insertions, 8 deletions
diff --git a/test/syscalls/linux/open_create.cc b/test/syscalls/linux/open_create.cc
index 78c36f98f..9d63782fb 100644
--- a/test/syscalls/linux/open_create.cc
+++ b/test/syscalls/linux/open_create.cc
@@ -112,14 +112,6 @@ TEST(CreateTest, CreatFileWithOTruncAndReadOnly) {
ASSERT_THAT(close(dirfd), SyscallSucceeds());
}
-TEST(CreateTest, CreateFailsOnUnpermittedDir) {
- // Make sure we don't have CAP_DAC_OVERRIDE, since that allows the user to
- // always override directory permissions.
- ASSERT_NO_ERRNO(SetCapability(CAP_DAC_OVERRIDE, false));
- ASSERT_THAT(open("/foo", O_CREAT | O_RDWR, 0644),
- SyscallFailsWithErrno(EACCES));
-}
-
TEST(CreateTest, CreateFailsOnDirWithoutWritePerms) {
// Make sure we don't have CAP_DAC_OVERRIDE, since that allows the user to
// always override directory permissions.