summaryrefslogtreecommitdiff
path: root/integrationtests/cmd/ioworkload/scenario_iouring.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-23 21:57:35 +0200
committerPaul Buetow <paul@buetow.org>2026-02-23 21:57:35 +0200
commitc58ef78b4a79a5cbc9531a74c6e3965ea4c00bc2 (patch)
tree29944a45cf7d00d781a232020b327203b1a72b75 /integrationtests/cmd/ioworkload/scenario_iouring.go
parentaa19be8c624a6adc3ecbf11a6ee0506a5c7d34fe (diff)
Harden integration workloads against dropped event flakes
Diffstat (limited to 'integrationtests/cmd/ioworkload/scenario_iouring.go')
-rw-r--r--integrationtests/cmd/ioworkload/scenario_iouring.go46
1 files changed, 25 insertions, 21 deletions
diff --git a/integrationtests/cmd/ioworkload/scenario_iouring.go b/integrationtests/cmd/ioworkload/scenario_iouring.go
index b1aac4e..a16d59a 100644
--- a/integrationtests/cmd/ioworkload/scenario_iouring.go
+++ b/integrationtests/cmd/ioworkload/scenario_iouring.go
@@ -80,17 +80,19 @@ func iouringRegister() error {
// iouringEnterEbadf calls io_uring_enter on an invalid fd.
// The syscall fails with EBADF, but ior captures the enter_io_uring_enter tracepoint.
func iouringEnterEbadf() error {
- _, _, errno := syscall.Syscall6(
- sysIoUringEnter,
- 99999, // invalid fd
- 0, // to_submit
- 0, // min_complete
- 0, // flags
- 0, // sig
- 0, // sz
- )
- if errno == 0 {
- return fmt.Errorf("expected EBADF, but io_uring_enter succeeded")
+ for i := 0; i < 5; i++ {
+ _, _, errno := syscall.Syscall6(
+ sysIoUringEnter,
+ 99999, // invalid fd
+ 0, // to_submit
+ 0, // min_complete
+ 0, // flags
+ 0, // sig
+ 0, // sz
+ )
+ if errno == 0 {
+ return fmt.Errorf("expected EBADF, but io_uring_enter succeeded")
+ }
}
return nil
}
@@ -98,16 +100,18 @@ func iouringEnterEbadf() error {
// iouringRegisterEbadf calls io_uring_register on an invalid fd.
// The syscall fails with EBADF, but ior captures the enter_io_uring_register tracepoint.
func iouringRegisterEbadf() error {
- _, _, errno := syscall.Syscall6(
- sysIoUringRegister,
- 99999, // invalid fd
- ioringRegisterProbe,
- 0, // arg (NULL)
- 0, // nr_args
- 0, 0,
- )
- if errno == 0 {
- return fmt.Errorf("expected EBADF, but io_uring_register succeeded")
+ for i := 0; i < 5; i++ {
+ _, _, errno := syscall.Syscall6(
+ sysIoUringRegister,
+ 99999, // invalid fd
+ ioringRegisterProbe,
+ 0, // arg (NULL)
+ 0, // nr_args
+ 0, 0,
+ )
+ if errno == 0 {
+ return fmt.Errorf("expected EBADF, but io_uring_register succeeded")
+ }
}
return nil
}