summaryrefslogtreecommitdiff
path: root/integrationtests/iouring_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-21 21:47:34 +0200
committerPaul Buetow <paul@buetow.org>2026-02-21 21:47:34 +0200
commit36f216c757eea7db82cf04aeae592956199b9f76 (patch)
tree57ad3f59c2a5f5f6a95643597f77a099c1bdb0df /integrationtests/iouring_test.go
parent08cb9dfe46f843114feb42cc9ffa599717ebcc32 (diff)
Add negative integration tests for io_uring syscalls (EBADF)
Add two new scenarios and tests: - iouring-enter-ebadf: io_uring_enter with invalid fd 99999 - iouring-register-ebadf: io_uring_register with invalid fd 99999 Both verify ior captures the tracepoint even when the syscall fails. Task: 348 Amp-Thread-ID: https://ampcode.com/threads/T-019c81bb-a460-7298-a25a-fa33502272b9 Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'integrationtests/iouring_test.go')
-rw-r--r--integrationtests/iouring_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/integrationtests/iouring_test.go b/integrationtests/iouring_test.go
index 20c156c..02d7a16 100644
--- a/integrationtests/iouring_test.go
+++ b/integrationtests/iouring_test.go
@@ -31,3 +31,23 @@ func TestIouringRegister(t *testing.T) {
},
})
}
+
+func TestIouringEnterEbadf(t *testing.T) {
+ runScenario(t, "iouring-enter-ebadf", []ExpectedEvent{
+ {
+ Tracepoint: "enter_io_uring_enter",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
+
+func TestIouringRegisterEbadf(t *testing.T) {
+ runScenario(t, "iouring-register-ebadf", []ExpectedEvent{
+ {
+ Tracepoint: "enter_io_uring_register",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}