diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-31 10:36:10 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-31 10:36:10 +0300 |
| commit | 6d0d7814c052f5540746456c8e3c47cc1657bf61 (patch) | |
| tree | afa58c4fe1cd434befa1056e93bf9623ef26992d /cmd/ioworkload/scenarios.go | |
| parent | 783c551f8e7f293b723e44386e50c4739075e2d4 (diff) | |
test(retbytes): assert read byte counts for pread64/preadv/preadv2
The retbytes integration coverage exercised read/write/sendto/etc but the
positional read p-variants only had presence assertions (pread64) or no
coverage at all (preadv/preadv2), so their READ_CLASSIFIED byte accounting
was validated only by unit tests, not end-to-end.
Add a positive byte-count assertion to TestReadwritePread and new
readwrite-preadv / readwrite-preadv2 workload scenarios plus integration
tests that read a known payload and assert the attributed byte count,
mirroring the existing pwrite64 assertion. preadv2 lacks a Go
syscall.SYS_PREADV2 constant, so its number is provided per-GOARCH
(amd64=327, arm64=286) following the securitySyscallNumbers pattern.
Addresses the read side of b20.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'cmd/ioworkload/scenarios.go')
| -rw-r--r-- | cmd/ioworkload/scenarios.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/ioworkload/scenarios.go b/cmd/ioworkload/scenarios.go index 821c8b2..08ac7a3 100644 --- a/cmd/ioworkload/scenarios.go +++ b/cmd/ioworkload/scenarios.go @@ -18,6 +18,8 @@ var scenarios = map[string]func() error{ "open-pid-filter": openPidFilter, "readwrite-basic": readwriteBasic, "readwrite-pread": readwritePread, + "readwrite-preadv": readwritePreadv, + "readwrite-preadv2": readwritePreadv2, "readwrite-pwrite": readwritePwrite, "readwrite-readv": readwriteReadv, "readwrite-writev": readwriteWritev, |
