summaryrefslogtreecommitdiff
path: root/integrationtests/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'integrationtests/cmd')
-rw-r--r--integrationtests/cmd/ioworkload/scenario_dir.go6
-rw-r--r--integrationtests/cmd/ioworkload/scenario_unlink.go3
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 {