diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-29 22:56:49 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-29 22:56:49 +0300 |
| commit | 3cd431e7aac28fa7bacc37a7e751a9082287251d (patch) | |
| tree | 390e929878878a34a98de35e1a3d485e0c721f50 /internal/statsengine/engine_reset_test.go | |
| parent | 9789578fe1363ec2f183cffb48f22bd6b656fd1a (diff) | |
test(mknod): lock in mknod/mknodat path-arg classification
Audit of mknod(2) found the tracing implementation already correct:
sys_enter_mknod captures the real pathname from args[0] (no dirfd),
while the sibling sys_enter_mknodat captures it from args[1] (after
dirfd). Both are FamilyFS path_events; both exits are ret_event
UNCLASSIFIED (int 0/-1). No code or doc changes were needed.
Add lock-in tests guarding this behavior against regressions:
- TestGenerateMknodMknodatHandlers asserts the generated BPF C reads
the path from args[0] for mknod and args[1] for mknodat.
- FormatMknodat/FormatExitMknodat testdata mirroring the real
tracepoint layout (dfd pushes filename to args[1]).
- mknodat rows added to the classify kind (KindPathname) and family
(FamilyFS) test tables, matching the existing mknod coverage.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/statsengine/engine_reset_test.go')
0 files changed, 0 insertions, 0 deletions
