summaryrefslogtreecommitdiff
path: root/internal/generate/codegen_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-29 22:02:06 +0300
committerPaul Buetow <paul@buetow.org>2026-05-29 22:02:06 +0300
commitf12c93dbf6ac839b25c1863aaa37d3d8be6d7a23 (patch)
tree0331a8667055d63165e59ca9fab75e2be1c5aeb2 /internal/generate/codegen_test.go
parent8e88f743dfcdd2b347b24dcbfab3a04fbe3c43f1 (diff)
ioprio_set/ioprio_get: classify as Process family
Audit of ioprio_set found a family inconsistency. ioprio_set(which, who, ioprio) and ioprio_get(which, who) query/set the I/O scheduling class and priority of a process, process group, or user. They are the direct I/O-priority analogues of getpriority/setpriority (the CPU nice value) and share the identical which/who selector signature, yet were falling through to FamilyMisc while getpriority/setpriority are FamilyProcess. Reclassify both ioprio syscalls to FamilyProcess for consistency with their priority siblings, update docs/syscall-tracing-plan.md, and regenerate the tracepoint/type artifacts (mage generate is idempotent). Argument capture is unchanged and confirmed correct: the args are all ints (which/who/ioprio), none named fd/path, so ClassifyFormat returns KindNone and the generator promotes the enter format to KindNull (null_event). In particular the 'who' argument (a pid/pgid/uid, never an fd) is not misclassified as KindFd. The exit is a ret_event (UNCLASSIFIED, int 0/-1). Add lock-in tests: - TestClassifyIoprioNullKind asserts KindNone/KindNull using the real kernel tracepoint fields, proving 'who' is not captured as an fd. - Family assertions for the ioprio pair alongside getpriority/setpriority so a stray reclassification of any of them trips the test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/generate/codegen_test.go')
0 files changed, 0 insertions, 0 deletions