mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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
This commit is contained in:
committed by
gVisor bot
parent
216abfb6df
commit
7a1de8583d
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user