summaryrefslogtreecommitdiff
path: root/integrationtests/mountfs_test.go
AgeCommit message (Collapse)Author
7 daystest: add mount_setattr coverage and assert vmsplice TRANSFER byte countPaul Buetow
mount_setattr(2) was the only new-mount-API sibling not exercised end-to-end (unlike move_mount/fsmount/fspick/open_tree), and vmsplice(2) had zero end-to-end assertion despite being TRANSFER_CLASSIFIED. uj0 (mount_setattr): add a best-effort RawSyscall6(SYS_MOUNT_SETATTR) call to mountfsManagement() aimed at the scenario mount point with AT_FDCWD and a MountAttr requesting MOUNT_ATTR_RDONLY. It needs CAP_SYS_ADMIN (Linux 5.12+) and the path is not a mount, so it returns EPERM/EINVAL, but its sys_enter_ tracepoint fires on kernel entry before any check -- the same best-effort pattern used for the other mount-API calls. Add mount_setattr to mountfsTraceArgs and assert enter_mount_setattr MinCount>=1 in TestMountFsManagementSyscalls. bl0 (vmsplice): add a deterministic retbytesVmsplice driver to the phase-A workload (mirroring the getdents64/readlinkat drivers): a spaced retry loop that gathers a fixed 18-byte user iovec into a fresh pipe via vmsplice and drains it each iteration. vmsplice is TRANSFER_CLASSIFIED, so the exit reports ctx->ret = bytes moved. Add vmsplice to retbytesTraceArgs and assert enter_vmsplice presence plus assertEventBytesAtLeast(payloadLen=18) and a positive duration in TestRetbytesPhaseA, locking in the TRANSFER byte attribution like its splice/tee siblings. Coverage hardening only; classification/tracing verified correct by inspection (mount_setattr=FamilyFS/KindPathname/UNCLASSIFIED, vmsplice=FamilyNetwork/KindFd/TRANSFER_CLASSIFIED). Verified: TEST_NAME=TestMountFsManagementSyscalls mage testWithName PASS (enter_mount_setattr captured); TEST_NAME=TestRetbytesPhaseA mage testWithName PASS (vmsplice bytes>=18 asserted). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7 daystest: add deterministic ioctl coverage and quotactl_fd in mountfsPaul Buetow
ioctl (FamilyFS, KindFd@arg0) previously only fired implicitly via the Go runtime/terminal. Add scenario_ioctl.go issuing a benign FIONREAD ioctl on an opened temp file (registered as ioctl-basic) and ioctl_test.go asserting enter_ioctl resolves to the temp file path, mirroring the fcntl suite. quotactl_fd (FamilyFS, KindFd@arg0) had no coverage while its sibling quotactl was tested in mountfs. Add a best-effort RawSyscall6 SYS_QUOTACTL_FD call on an fd opened on the mount point in scenario_mountfs.go, extend mountfsTraceArgs, and assert enter_quotactl_fd (MinCount>=1). The sys_enter tracepoint fires on kernel entry regardless of privilege/quota support. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01test(integration): cover fsconfig/fspick/open_tree in mount-API scenarioPaul Buetow
Extend the mountfs-management scenario with best-effort fsconfig (KindFd), fspick (KindPathname), and open_tree (KindOpen) calls to complete new-mount-API end-to-end coverage. fsconfig reuses the fscontext fd from fsopen (FSCONFIG_SET_STRING + FSCONFIG_CMD_CREATE), fspick targets "/" with FSPICK_NO_AUTOMOUNT, and open_tree clones the scenario mount point with OPEN_TREE_CLONE|OPEN_TREE_CLOEXEC. All returned fds are closed and all errno values are ignored, so ENOSYS/EPERM/EINVAL/EBADF are tolerated; the sys_enter_ tracepoints fire on kernel entry regardless, creating no mounts on the host. Assert enter_fsconfig/enter_fspick/enter_open_tree (MinCount>=1) in TestMountFsManagementSyscalls and add the three syscalls to the trace filter. Gating is unchanged (root-only via the shared harness). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31test(mountfs): exercise fsopen end-to-end in mount-API scenarioPaul Buetow
The mountfs-management integration scenario covered the new mount API syscalls fsmount/move_mount/mount/umount/pivot_root but not fsopen, the API's entry point and a direct eventfd-kind sibling of fsmount. Add a best-effort fsopen("tmpfs", FSOPEN_CLOEXEC) call (closing the returned context fd on success) and assert enter_fsopen is traced. fsopen's tracing is otherwise correct: args[1] flags captured, args[0] fsname (a filesystem TYPE, not a path) deliberately not treated as a pathname, returned fd registered as the 'fsopenfd:<flags>' descriptor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-27Stabilize integration test startupPaul Buetow
2026-05-20feat: add mount/fs management syscall tracing for c7Paul Buetow