summaryrefslogtreecommitdiff
path: root/integrationtests
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-01 23:23:33 +0300
committerPaul Buetow <paul@buetow.org>2026-06-01 23:23:33 +0300
commit3af826ec72c7a520f0993c0fa8842d347eba7fed (patch)
tree7562d01329c29e98cc45abaa0e32748e55824ea0 /integrationtests
parentbd544509846fb7e1882aa466d24aea937c2b2804 (diff)
test(integration): cover fsconfig/fspick/open_tree in mount-API scenario
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>
Diffstat (limited to 'integrationtests')
-rw-r--r--integrationtests/mountfs_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/integrationtests/mountfs_test.go b/integrationtests/mountfs_test.go
index 673e9c1..d50706f 100644
--- a/integrationtests/mountfs_test.go
+++ b/integrationtests/mountfs_test.go
@@ -4,7 +4,7 @@ import "testing"
var mountfsTraceArgs = []string{
"-trace-syscalls",
- "mount,umount,move_mount,fsopen,fsmount,pivot_root,quotactl,statmount,listmount,listns,swapon,swapoff",
+ "mount,umount,move_mount,fsopen,fsconfig,fspick,open_tree,fsmount,pivot_root,quotactl,statmount,listmount,listns,swapon,swapoff",
}
func TestMountFsManagementSyscalls(t *testing.T) {
@@ -13,6 +13,13 @@ func TestMountFsManagementSyscalls(t *testing.T) {
{Tracepoint: "enter_umount", MinCount: 1},
{Tracepoint: "enter_move_mount", MinCount: 1},
{Tracepoint: "enter_fsopen", MinCount: 1},
+ // fsconfig (KindFd), fspick (KindPathname), and open_tree (KindOpen) are
+ // best-effort new-mount-API calls in the scenario. Their sys_enter_
+ // tracepoints fire on kernel entry regardless of permission/validity, so
+ // MinCount>=1 holds even when the syscalls themselves return an error.
+ {Tracepoint: "enter_fsconfig", MinCount: 1},
+ {Tracepoint: "enter_fspick", MinCount: 1},
+ {Tracepoint: "enter_open_tree", MinCount: 1},
{Tracepoint: "enter_fsmount", MinCount: 1},
{Tracepoint: "enter_pivot_root", MinCount: 1},
{Tracepoint: "enter_quotactl", MinCount: 1},