diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-30 21:34:13 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-30 21:34:13 +0300 |
| commit | aeced89f46253e0b4813bbbd89362a0c4466f2d7 (patch) | |
| tree | c1fed9786903be04ffbe0e699b285fd40c063fa7 /internal/eventloop_process_test.go | |
| parent | f91ad2b5b4a17b6237c50a9501658310ab52362f (diff) | |
test(rmdir): lock in FS family, args[0] pathname capture, UNCLASSIFIED exit
Audit of the rmdir(2) syscall found the tracing implementation already
correct and fully consistent with its siblings: rmdir is in the FS family,
classified KindPathname with the pathname captured from args[0] (its generated
BPF C handler is byte-identical to unlink's), and its exit is a ret_event with
UNCLASSIFIED ret_type (rmdir returns int 0/-1, not a byte count). The docs and
drift tests, integration tests (unlink-rmdir success and unlink-rmdir-notempty
ENOTEMPTY failure), and retclassify coverage all already match.
To guard against future drift, add a dedicated rmdir lock-in:
- FormatRmdir tracepoint fixture (single const char * pathname at args[0],
mirroring the real sys_enter_rmdir format and unlink's shape).
- TestGenerateRmdirHandlerCapturesPathFromArgs0: asserts the generated handler
reads the path from args[0] (with a negative guard against args[1], since
rmdir has no dirfd) and that the exit stays UNCLASSIFIED.
- TestRmdirFamilyAndKindMatchSiblings: asserts rmdir shares FamilyFS and
KindPathname/pathname with unlink/unlinkat/mkdir.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/eventloop_process_test.go')
0 files changed, 0 insertions, 0 deletions
