| Age | Commit message (Collapse) | Author |
|
- 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>
|
|
- Remove tautological temp dir tests that self-cleaned in script
- Add TestCleanupLeakedWorkloadTempDirCaughtByAssertion that creates
a dir without cleanup and verifies detection catches it
- Inline snapshotWorkloadTempDirs into listWorkloadTempDirs
- Add comment explaining assertNoNewWorkloadTempDirs cleanup behavior
- Add non-empty check in OutputDir test to prevent vacuous pass
- Fix .collapsed -> .collapsed.zst suffix consistency
Amp-Thread-ID: https://ampcode.com/threads/T-019c8172-052c-74fe-8d8d-34a0529d082c
Co-authored-by: Amp <amp@ampcode.com>
|
|
Add cleanup_test.go with 6 tests verifying:
- OutputDir contains only expected file types (.ior.zst, .collapsed.zst, .svg, bpf symlink)
- No ioworkload temp dirs leak on success or failure paths
- OutputDir only has bpf symlink after ior failure (no stale output)
- No artifacts leak outside the OutputDir
- Leak detection mechanism works (negative test)
Task: 343
Amp-Thread-ID: https://ampcode.com/threads/T-019c8172-052c-74fe-8d8d-34a0529d082c
Co-authored-by: Amp <amp@ampcode.com>
|
|
- TestLoadTestResultMultipleRecordsSamePath now checks all fields per record
- Fixed unchecked error return from zstd Write
- Added TestLoadTestResultCorruptZstd for non-zstd file content
Amp-Thread-ID: https://ampcode.com/threads/T-019c816d-5634-7387-8065-f67e38257019
Co-authored-by: Amp <amp@ampcode.com>
|
|
Tests cover:
- All IterRecord fields (Path, TraceID, Comm, Pid, Tid, Flags, Cnt)
- Multiple records with same path but different tracepoints
- Empty .ior.zst file
- Nonexistent file (error path)
- Invalid/corrupt data (error path)
Task 343: Verify parse.go correctly deserializes .ior.zst files
Amp-Thread-ID: https://ampcode.com/threads/T-019c816d-5634-7387-8065-f67e38257019
Co-authored-by: Amp <amp@ampcode.com>
|
|
- Add waitBoth unit tests: ior exit error, ior timeout, both timeout,
both succeed — using real processes (true/false/sleep)
- Add TestIorCrashReportsError: full harness test with fake ior binary
that exits with error, verifying error mentions 'ior' and workload PID
is returned
- Add TestIorStartFailureCleansUpWorkload: verifies workload process is
killed when ior binary doesn't exist, checking with signal 0
- Refactor waitBoth to accept grace duration parameter for testability
(production code passes iorShutdownGrace, tests use 500ms)
- Fix pipe drain in startWorkload: drain remaining stdout after reading
PID so cmd.Wait() doesn't block on pending I/O
- Add writeScript helper to helpers_test.go for creating fake binaries
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c8162-c1cf-7612-b8f5-84c61e3d2021
|
|
Add crash scenario to ioworkload that exits non-zero, and a test
verifying the harness returns a clear error mentioning 'workload',
reports a valid PID, and returns no records.
Amp-Thread-ID: https://ampcode.com/threads/T-019c815e-6fb6-714a-a4db-37522416ea9a
Co-authored-by: Amp <amp@ampcode.com>
|
|
improve assertions
- Symlink ior.bpf.o into output dir so ior finds it when run from temp dir
- Increase iorShutdownGrace from 3s to 30s for BPF tracepoint unloading
- Skip records with empty comm in AssertNoUnexpectedComm (BPF race condition)
- Add diagnostic logging (up to 5 samples) in both AssertNoUnexpectedComm
and AssertNoUnexpectedPID for easier debugging of test failures
Amp-Thread-ID: https://ampcode.com/threads/T-019c814e-d6b6-72fb-aaf0-c49f5b3fd04e
Co-authored-by: Amp <amp@ampcode.com>
|
|
Implement iouring_test.go with tests for io_uring_setup, io_uring_enter,
and io_uring_register tracepoints. Add corresponding workload scenarios
using raw syscalls (425, 426, 427) since Go stdlib doesn't wrap io_uring
on amd64.
- iouring-setup: creates io_uring instance via io_uring_setup(2)
- iouring-enter: creates ring, calls io_uring_enter(2) with zero ops
- iouring-register: creates ring, calls io_uring_register(2) with PROBE
Task #343
Amp-Thread-ID: https://ampcode.com/threads/T-019c8149-2aa6-75fb-88f3-dd6bd3a2b654
Co-authored-by: Amp <amp@ampcode.com>
|
|
- truncate-basic: tests SYS_TRUNCATE (path-based) via syscall.Truncate
- truncate-ftruncate: tests SYS_FTRUNCATE (fd-based) via syscall.Ftruncate
- Both syscall wrappers use direct SYS_* calls on amd64 (no *at wrapping)
Task #343
Amp-Thread-ID: https://ampcode.com/threads/T-019c8145-7437-7218-95ff-4cb451e18655
Co-authored-by: Amp <amp@ampcode.com>
|
|
sync_file_range
- Add syncFdatasync, syncSync, syncSyncFileRange scenario functions
- Register sync-fdatasync, sync-sync, sync-sync-file-range in scenarios map
- Add sync_test.go with tests for all 4 sync-related syscalls
- sync is a null_event (no path); others are fd_events
- All use direct SYS_* syscalls on amd64 (no wrapper delegation)
Task: #343
Amp-Thread-ID: https://ampcode.com/threads/T-019c813f-e020-7558-86ce-be6fdbd96f98
Co-authored-by: Amp <amp@ampcode.com>
|
|
|
|
- INTEGRATIONTESTS-PLAN.md: full design for e2e integration tests
- integrationtests/cmd/ioworkload: standalone binary with 13 I/O scenarios
- integrationtests/expectations.go: ExpectedEvent type and assertion helpers
- integrationtests/parse.go: .ior.zst parser producing TestResult
- Export IterRecord and LoadFromFile in flamegraph package
- Fix TraceId -> TraceID, StringByName returns error instead of panic
Amp-Thread-ID: https://ampcode.com/threads/T-019c8031-c106-757a-95a0-7a5457163ce7
Co-authored-by: Amp <amp@ampcode.com>
|