summaryrefslogtreecommitdiff
path: root/cmd/ioworkload/scenarios.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-31 10:27:26 +0300
committerPaul Buetow <paul@buetow.org>2026-05-31 10:27:26 +0300
commit783c551f8e7f293b723e44386e50c4739075e2d4 (patch)
tree4e8f752123893483e1813b359e062fec426ea40f /cmd/ioworkload/scenarios.go
parent7e58a0df8b994e4a3a53aec88dc05fe7f1b079bf (diff)
test(openat2): add end-to-end integration coverage for openat2
openat2(2) is the one open-family syscall with a structurally distinct argument layout: flags/mode live inside the open_how struct (args[2]), not as a plain int, and args[3] is the struct size. The tracer correctly reads the path from args[1] and omits flags (ev->flags = -1) rather than misreading the struct ptr/size, and registers the returned fd->path mapping via the shared handleOpenExit path. This was verified by inspection but had no integration scenario, unlike open/openat/creat/ open_by_handle_at. Add an open-openat2 ioworkload scenario issuing the raw openat2 syscall (Go has no wrapper and routes Open through openat) and a TestOpenOpenat2 integration test asserting the enter_openat2 tracepoint captures the path. Verified passing as root. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'cmd/ioworkload/scenarios.go')
-rw-r--r--cmd/ioworkload/scenarios.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/ioworkload/scenarios.go b/cmd/ioworkload/scenarios.go
index 7f42106..821c8b2 100644
--- a/cmd/ioworkload/scenarios.go
+++ b/cmd/ioworkload/scenarios.go
@@ -9,6 +9,7 @@ import (
var scenarios = map[string]func() error{
"crash": crash,
"open-basic": openBasic,
+ "open-openat2": openOpenat2,
"open-creat": openCreat,
"open-by-handle-at": openByHandleAt,
"open-duration-gap": openDurationGap,