summaryrefslogtreecommitdiff
path: root/integrationtests
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-31 10:00:22 +0300
committerPaul Buetow <paul@buetow.org>2026-05-31 10:00:22 +0300
commitc6573c61435a23194087558378be3efc1a47fdc4 (patch)
treec88e83dc0a0b29223236ee2042f13bfbb27d1106 /integrationtests
parente8948e9f52235cbbbd8af098bc624bc20e173e6c (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'integrationtests')
-rw-r--r--integrationtests/aio_test.go20
1 files changed, 20 insertions, 0 deletions
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)
+}