Enable access, chroot, chown, and sync tests for FUSE.

PiperOrigin-RevId: 510699649
This commit is contained in:
Lucas Manning
2023-02-18 13:19:42 -08:00
committed by gVisor bot
parent ff32cb8b25
commit 0650bd1a5c
3 changed files with 10 additions and 3 deletions
-3
View File
@@ -144,9 +144,6 @@ func (fd *fileDescription) Sync(ctx context.Context) error {
inode := fd.inode()
inode.attrMu.Lock()
defer inode.attrMu.Unlock()
if inode.filemode().IsDir() {
return linuxerr.EPERM
}
conn := inode.fs.conn
// no need to proceed if FUSE server doesn't implement Open.
if conn.noOpen {
+8
View File
@@ -22,6 +22,7 @@ syscall_test(
)
syscall_test(
add_fusefs = True,
add_overlay = True,
test = "//test/syscalls/linux:access_test",
)
@@ -79,17 +80,20 @@ syscall_test(
syscall_test(
size = "medium",
add_fusefs = True,
add_overlay = True,
test = "//test/syscalls/linux:chown_test",
use_tmpfs = True, # chown tests require gofer to be running as root.
)
syscall_test(
add_fusefs = True,
add_overlay = True,
test = "//test/syscalls/linux:chroot_test",
)
syscall_test(
add_fusefs = True,
add_overlay = True,
test = "//test/syscalls/linux:pivot_root_test",
use_tmpfs = True,
@@ -143,6 +147,7 @@ syscall_test(
)
syscall_test(
add_fusefs = True,
add_overlay = True,
test = "//test/syscalls/linux:dup_test",
)
@@ -224,6 +229,7 @@ syscall_test(
)
syscall_test(
add_fusefs = True,
add_overlay = True,
test = "//test/syscalls/linux:fsync_test",
)
@@ -973,11 +979,13 @@ syscall_test(
)
syscall_test(
add_fusefs = True,
add_overlay = True,
test = "//test/syscalls/linux:sync_test",
)
syscall_test(
add_fusefs = True,
add_overlay = True,
test = "//test/syscalls/linux:sync_file_range_test",
)
+2
View File
@@ -310,6 +310,8 @@ TEST(ChrootTest, ProcMemSelfFdsNoEscapeProcOpen) {
// expose the full file path via /proc/self/maps and instead honor the chroot.
TEST(ChrootTest, ProcMemSelfMapsNoEscapeProcOpen) {
SKIP_IF(!ASSERT_NO_ERRNO_AND_VALUE(HaveCapability(CAP_SYS_CHROOT)));
// TODO(b/264306751): Remove once FUSE implements mmap.
SKIP_IF(getenv("GVISOR_FUSE_TEST"));
// Get a FD to /proc before we enter the chroot.
const FileDescriptor proc =