From c58ef78b4a79a5cbc9531a74c6e3965ea4c00bc2 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 23 Feb 2026 21:57:35 +0200 Subject: Harden integration workloads against dropped event flakes --- .../cmd/ioworkload/scenario_iouring.go | 46 ++++++++++++---------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'integrationtests/cmd/ioworkload/scenario_iouring.go') 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 } -- cgit v1.2.3