summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/chown.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/syscalls/linux/chown.cc')
-rw-r--r--test/syscalls/linux/chown.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/syscalls/linux/chown.cc b/test/syscalls/linux/chown.cc
index 7a28b674d..82223f997 100644
--- a/test/syscalls/linux/chown.cc
+++ b/test/syscalls/linux/chown.cc
@@ -90,6 +90,7 @@ TEST_P(ChownParamTest, ChownFilePermissionDenied) {
SKIP_IF(!ASSERT_NO_ERRNO_AND_VALUE(HaveCapability(CAP_SETUID)));
const auto file = ASSERT_NO_ERRNO_AND_VALUE(TempPath::CreateFileMode(0777));
+ EXPECT_THAT(chmod(GetAbsoluteTestTmpdir().c_str(), 0777), SyscallSucceeds());
// Drop privileges and change IDs only in child thread, or else this parent
// thread won't be able to open some log files after the test ends.
@@ -119,6 +120,7 @@ TEST_P(ChownParamTest, ChownFileSucceedsAsRoot) {
SKIP_IF(!ASSERT_NO_ERRNO_AND_VALUE(HaveCapability((CAP_SETUID))));
const std::string filename = NewTempAbsPath();
+ EXPECT_THAT(chmod(GetAbsoluteTestTmpdir().c_str(), 0777), SyscallSucceeds());
absl::Notification fileCreated, fileChowned;
// Change UID only in child thread, or else this parent thread won't be able