diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-21 21:47:34 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-21 21:47:34 +0200 |
| commit | 36f216c757eea7db82cf04aeae592956199b9f76 (patch) | |
| tree | 57ad3f59c2a5f5f6a95643597f77a099c1bdb0df /integrationtests/iouring_test.go | |
| parent | 08cb9dfe46f843114feb42cc9ffa599717ebcc32 (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.go | 20 |
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, + }, + }) +} |
