summaryrefslogtreecommitdiff
path: root/integrationtests/cmd/ioworkload/scenario_stat.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-13 12:26:44 +0200
committerPaul Buetow <paul@buetow.org>2026-03-13 12:26:44 +0200
commit0d4354bab36c95cd4e8125d2d7b5b66de4ae5d11 (patch)
tree0989e1c43610588501eea80589678546a9b30fe1 /integrationtests/cmd/ioworkload/scenario_stat.go
parent14c15ff8387f5829a2afde5a0792d2e254a452aa (diff)
test: stabilize integration error-path workloads
Diffstat (limited to 'integrationtests/cmd/ioworkload/scenario_stat.go')
-rw-r--r--integrationtests/cmd/ioworkload/scenario_stat.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/integrationtests/cmd/ioworkload/scenario_stat.go b/integrationtests/cmd/ioworkload/scenario_stat.go
index 154d8b8..5d242c7 100644
--- a/integrationtests/cmd/ioworkload/scenario_stat.go
+++ b/integrationtests/cmd/ioworkload/scenario_stat.go
@@ -5,6 +5,7 @@ import (
"path/filepath"
"runtime"
"syscall"
+ "time"
"unsafe"
)
@@ -13,6 +14,7 @@ const (
rOK = 0x4 // R_OK
statxBasicMask = 0x07ff // STATX_BASIC_STATS
atFDCwd = -100 // AT_FDCWD
+ statRetryDelay = 20 * time.Millisecond
)
// statBasic creates a file and stats it via raw SYS_STAT (newstat).
@@ -270,12 +272,15 @@ func statAccessEnoent() error {
// tracepoint because it is recorded on syscall entry.
func statFstatEbadf() error {
var stat syscall.Stat_t
- for i := 0; i < 5; i++ {
+ for i := 0; i < 20; i++ {
_, _, errno := syscall.Syscall(syscall.SYS_FSTAT, 99999, uintptr(unsafe.Pointer(&stat)), 0)
runtime.KeepAlive(&stat)
if errno == 0 {
return fmt.Errorf("expected EBADF, but fstat succeeded")
}
+ if i < 19 {
+ time.Sleep(statRetryDelay)
+ }
}
return nil
}