mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Re-enable execveat test that was causing files in /bin to be deleted.
Test now no longer deletes files incorrectly, due to a fix in fs utils used by TempPath (github.com/google/gvisor/pull/1368). Fixes #1366 PiperOrigin-RevId: 284814605
This commit is contained in:
@@ -696,6 +696,15 @@ TEST(ExecveatTest, SymlinkNoFollowAndEmptyPath) {
|
||||
ArgEnvExitStatus(0, 0), absl::StrCat(path, "\n"));
|
||||
}
|
||||
|
||||
TEST(ExecveatTest, SymlinkNoFollowIgnoreSymlinkAncestor) {
|
||||
TempPath parent_link =
|
||||
ASSERT_NO_ERRNO_AND_VALUE(TempPath::CreateSymlinkTo("/tmp", "/bin"));
|
||||
std::string path_with_symlink = JoinPath(parent_link.path(), "echo");
|
||||
|
||||
CheckExecveat(AT_FDCWD, path_with_symlink, {path_with_symlink}, {},
|
||||
AT_SYMLINK_NOFOLLOW, ArgEnvExitStatus(0, 0), "");
|
||||
}
|
||||
|
||||
TEST(ExecveatTest, SymlinkNoFollowWithNormalFile) {
|
||||
const FileDescriptor dirfd =
|
||||
ASSERT_NO_ERRNO_AND_VALUE(Open("/bin", O_DIRECTORY));
|
||||
|
||||
Reference in New Issue
Block a user