From c6573c61435a23194087558378be3efc1a47fdc4 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 31 May 2026 10:00:22 +0300 Subject: test(aio): add io_submit end-to-end integration coverage Audit of io_submit tracing (task 0v) confirmed the tracer is correct by inspection: KindNull (sys_enter_io_ prefix rule) so ctx_id/nr/iocbpp are opaque and no fd/path is captured; FamilyAIO; return is UNCLASSIFIED (the return is a count of iocbs submitted, not a byte count, so it must not inflate READ/WRITE/TRANSFER totals). Enter/exit are paired and timed. No implementation discrepancy and no docs drift. Add a genuine end-to-end test: new aio-submit ioworkload scenario sets up an AIO context and submits one real IOCB_CMD_PWRITE iocb against a temp file via raw syscalls, then tears the context down. TestAioSubmit asserts the enter_io_submit tracepoint fires for the AIO family workload. Co-Authored-By: Claude Opus 4.8 --- integrationtests/aio_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'integrationtests') diff --git a/integrationtests/aio_test.go b/integrationtests/aio_test.go index e41e854..b38e20b 100644 --- a/integrationtests/aio_test.go +++ b/integrationtests/aio_test.go @@ -31,3 +31,23 @@ func TestAioSetupEinval(t *testing.T) { }, }, aioTraceArgs) } + +// aioSubmitTraceArgs additionally traces io_submit so the submit scenario can +// assert on its enter tracepoint. io_submit is KindNull (FamilyAIO): the enter +// event captures no fd/path (ctx_id is an AIO context handle, not an fd, and +// iocbpp is an opaque userspace pointer) and the exit event carries the raw +// return value (a count of iocbs submitted, classified UNCLASSIFIED). +var aioSubmitTraceArgs = []string{"-trace-syscalls", "io_setup,io_submit,io_destroy,close"} + +// TestAioSubmit exercises io_submit(2) end-to-end: the workload sets up an AIO +// context and submits one real iocb (a positional write). ior must record the +// enter_io_submit tracepoint for the AIO family workload. +func TestAioSubmit(t *testing.T) { + runScenarioResultWithIorArgs(t, "aio-submit", []ExpectedEvent{ + { + Tracepoint: "enter_io_submit", + Comm: "ioworkload", + MinCount: 1, + }, + }, aioSubmitTraceArgs) +} -- cgit v1.2.3