mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Omit sandbox from chown test.
This test fails because it must include additional UIDs. Omit the bazel sandbox to ensure that it can function correctly. PiperOrigin-RevId: 343927190
This commit is contained in:
committed by
gVisor bot
parent
5d5af88110
commit
b6c00520d3
@@ -432,6 +432,9 @@ cc_binary(
|
||||
testonly = 1,
|
||||
srcs = ["chown.cc"],
|
||||
linkstatic = 1,
|
||||
# We require additional UIDs for this test, so don't include the bazel
|
||||
# sandbox as standard.
|
||||
tags = ["no-sandbox"],
|
||||
deps = [
|
||||
"//test/util:capability_util",
|
||||
"//test/util:file_descriptor",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user