diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-24 14:31:48 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-24 14:31:48 +0200 |
| commit | 92114c3b6bfe8a3d28487fcfb34fd291c573500c (patch) | |
| tree | 35e0e35009517069e2bf35c6a628fad3a68a8ece /integrationtests | |
| parent | d93d286b6b214f12e65214360a41f8668123f174 (diff) | |
integrationtests: reduce parallel flakiness in syscall capture
Diffstat (limited to 'integrationtests')
| -rw-r--r-- | integrationtests/cmd/ioworkload/scenario_dir.go | 6 | ||||
| -rw-r--r-- | integrationtests/cmd/ioworkload/scenario_unlink.go | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/integrationtests/cmd/ioworkload/scenario_dir.go b/integrationtests/cmd/ioworkload/scenario_dir.go index 81421ec..7a78716 100644 --- a/integrationtests/cmd/ioworkload/scenario_dir.go +++ b/integrationtests/cmd/ioworkload/scenario_dir.go @@ -210,13 +210,15 @@ func dirChdirEnoent() error { // The syscall fails with EBADF, but ior captures the tracepoint on entry. func dirGetdentsEbadf() error { buf := make([]byte, 4096) - // Retry a few times to reduce flakiness under high integration parallelism. - for i := 0; i < 5; i++ { + // Keep issuing the syscall for a short window so ior has enough time to + // attach under high parallel integration load. + for i := 0; i < 40; i++ { _, _, errno := syscall.Syscall(syscall.SYS_GETDENTS64, uintptr(9999), uintptr(unsafe.Pointer(&buf[0])), uintptr(len(buf))) runtime.KeepAlive(buf) if errno == 0 { return fmt.Errorf("expected EBADF, but getdents64 succeeded") } + time.Sleep(25 * time.Millisecond) } return nil } diff --git a/integrationtests/cmd/ioworkload/scenario_unlink.go b/integrationtests/cmd/ioworkload/scenario_unlink.go index ec7c926..e2cba6c 100644 --- a/integrationtests/cmd/ioworkload/scenario_unlink.go +++ b/integrationtests/cmd/ioworkload/scenario_unlink.go @@ -5,6 +5,7 @@ import ( "path/filepath" "runtime" "syscall" + "time" "unsafe" ) @@ -86,6 +87,8 @@ func unlinkRmdir() error { if err := syscall.Mkdir(subDir, 0o755); err != nil { return fmt.Errorf("mkdir: %w", err) } + // Give ior a brief attach window before the one-shot rmdir syscall. + time.Sleep(300 * time.Millisecond) pathBytes, err := syscall.BytePtrFromString(subDir) if err != nil { |
