summaryrefslogtreecommitdiff
path: root/integrationtests/rename_test.go
AgeCommit message (Collapse)Author
7 daysfeat(parquet): export rename/link oldname + assert oldname capture end-to-endPaul Buetow
rename-family (rename/renameat/renameat2) and link-family (link/linkat/ symlink/symlinkat) capture BOTH paths in BPF (name_event.oldname at args[1] for the AT-variants, after a dirfd, plus newname), but only newname reached any persisted output. event.Pair.FileName() resolves to oldnameNewnameFile.Name() == Newname, so the parquet `file` column, CSV, and flamegraph Path all carried newname; the captured oldname survived only in the TUI stream String() repr ("old:... ->new:..."). The oldname capture (and its args[1] index for the AT-variants) was therefore never validated end-to-end, and a wrong-oldname-index regression would surface in no persisted output or test. Surface oldname as one additive, backward-compatible column, mirroring the dedicated optional-column convention (address_space_bytes, requested_sleep_ns, epoll_*): - old_file (String): source/old path for rename/link syscalls; empty for every other syscall. The existing `file` column keeps its semantics (newname for rename/link). Data flows name_event.oldname -> event.Pair.Oldname (populated in handleNameExit alongside the existing File) -> streamrow.Row.OldName -> parquet.Record.OldFile. Docs (docs/parquet-querying.md) and the Magefile parquetValidate column list updated in lockstep. The new TestRenameRenameatOldnameInParquet integration test exercises the renameat AT-variant (oldname at args[1] after the olddfd dirfd) and asserts the parquet old_file column carries renameat-old.txt while file carries renameat-new.txt, and that old_file stays empty for non-rename/ link rows -- locking in the args[1] oldname capture end-to-end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-02-23Fix integration trace expectations and fd/open event handlingPaul Buetow
2026-02-21Add negative integration tests for rename syscalls (task 348)Paul Buetow
- rename-enoent: rename nonexistent file via SYS_RENAME (ENOENT) - rename-noreplace: renameat2 with RENAME_NOREPLACE on existing target (EEXIST) Both verify ior captures tracepoints on entry even when syscall fails. Amp-Thread-ID: https://ampcode.com/threads/T-019c819e-cdae-7777-9be6-992ca8a7b96b Co-authored-by: Amp <amp@ampcode.com>
2026-02-21Fix integration test expectations to test actual syscall outcomes (task 349)Paul Buetow
- rename_test.go: Fix PathContains to use destination names (newname.txt, renameat-new.txt, renameat2-new.txt) since name_events use Newname as the path in ior output, not the source name - open_test.go: Change expected tracepoint from enter_openat to enter_creat - scenarios.go: Use raw SYS_CREAT instead of Go's syscall.Creat which wraps openat on amd64, so the creat tracepoint is actually exercised - Created task 350 for close_range path resolution bug found during review Amp-Thread-ID: https://ampcode.com/threads/T-019c8178-1c1f-7509-9ac9-bd48b970945b Co-authored-by: Amp <amp@ampcode.com>
2026-02-21more on integration testsPaul Buetow