summaryrefslogtreecommitdiff
path: root/integrationtests/cmd/ioworkload
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-24 21:52:33 +0200
committerPaul Buetow <paul@buetow.org>2026-02-24 21:52:33 +0200
commitcf65e3f93e0565dda8f124b21b2c44b3a3ecaff5 (patch)
tree09197d5afa42d7308d32d62c35dfe2fd5b9cde13 /integrationtests/cmd/ioworkload
parent84d523fd02cba38cfe90118975f345b989beaae1 (diff)
stability: remove unlink attach sleep and tighten svg/tui helpers
Diffstat (limited to 'integrationtests/cmd/ioworkload')
-rw-r--r--integrationtests/cmd/ioworkload/scenario_unlink.go31
1 files changed, 16 insertions, 15 deletions
diff --git a/integrationtests/cmd/ioworkload/scenario_unlink.go b/integrationtests/cmd/ioworkload/scenario_unlink.go
index e2cba6c..ea73b10 100644
--- a/integrationtests/cmd/ioworkload/scenario_unlink.go
+++ b/integrationtests/cmd/ioworkload/scenario_unlink.go
@@ -5,7 +5,6 @@ import (
"path/filepath"
"runtime"
"syscall"
- "time"
"unsafe"
)
@@ -83,21 +82,23 @@ func unlinkRmdir() error {
}
defer cleanup()
- subDir := filepath.Join(dir, "rmdir-me")
- 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)
+ // Retry with fresh paths to avoid a single one-shot syscall that can race
+ // tracepoint attach during parallel integration test startup.
+ for i := 0; i < 5; i++ {
+ subDir := filepath.Join(dir, fmt.Sprintf("rmdir-me-%d", i))
+ if err := syscall.Mkdir(subDir, 0o755); err != nil {
+ return fmt.Errorf("mkdir: %w", err)
+ }
- pathBytes, err := syscall.BytePtrFromString(subDir)
- if err != nil {
- return fmt.Errorf("path bytes: %w", err)
- }
- _, _, errno := syscall.Syscall(syscall.SYS_RMDIR, uintptr(unsafe.Pointer(pathBytes)), 0, 0)
- runtime.KeepAlive(pathBytes)
- if errno != 0 {
- return fmt.Errorf("rmdir: %w", errno)
+ pathBytes, err := syscall.BytePtrFromString(subDir)
+ if err != nil {
+ return fmt.Errorf("path bytes: %w", err)
+ }
+ _, _, errno := syscall.Syscall(syscall.SYS_RMDIR, uintptr(unsafe.Pointer(pathBytes)), 0, 0)
+ runtime.KeepAlive(pathBytes)
+ if errno != 0 {
+ return fmt.Errorf("rmdir: %w", errno)
+ }
}
return nil
}