diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-09 22:12:09 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-09 22:12:09 +0300 |
| commit | bab929022f4f4bba77439c63d130c833595758b6 (patch) | |
| tree | a36b8a45e32aab2e79ecd5bd6a5704c2f94ce141 /integrationtests/ioctl_test.go | |
| parent | 3cd5e655ee1768b4118815d1ea887acdd57eb498 (diff) | |
test: add deterministic ioctl coverage and quotactl_fd in mountfs
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>
Diffstat (limited to 'integrationtests/ioctl_test.go')
| -rw-r--r-- | integrationtests/ioctl_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/integrationtests/ioctl_test.go b/integrationtests/ioctl_test.go new file mode 100644 index 0000000..9dbebf7 --- /dev/null +++ b/integrationtests/ioctl_test.go @@ -0,0 +1,17 @@ +package integrationtests + +import "testing" + +// TestIoctlBasic asserts that the ioctl-basic scenario deterministically fires +// the enter_ioctl tracepoint. ioctl is KindFd (fd@arg0); the fd resolves to the +// scenario's temp file, so we assert the path as well. Mirrors fcntl_test.go. +func TestIoctlBasic(t *testing.T) { + runScenario(t, "ioctl-basic", []ExpectedEvent{ + { + PathContains: "ioctlfile.txt", + Tracepoint: "enter_ioctl", + Comm: "ioworkload", + MinCount: 1, + }, + }) +} |
