summaryrefslogtreecommitdiff
path: root/integrationtests/cmd/ioworkload/scenario_rename.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-23 21:57:35 +0200
committerPaul Buetow <paul@buetow.org>2026-02-23 21:57:35 +0200
commitc58ef78b4a79a5cbc9531a74c6e3965ea4c00bc2 (patch)
tree29944a45cf7d00d781a232020b327203b1a72b75 /integrationtests/cmd/ioworkload/scenario_rename.go
parentaa19be8c624a6adc3ecbf11a6ee0506a5c7d34fe (diff)
Harden integration workloads against dropped event flakes
Diffstat (limited to 'integrationtests/cmd/ioworkload/scenario_rename.go')
-rw-r--r--integrationtests/cmd/ioworkload/scenario_rename.go22
1 files changed, 12 insertions, 10 deletions
diff --git a/integrationtests/cmd/ioworkload/scenario_rename.go b/integrationtests/cmd/ioworkload/scenario_rename.go
index 95b93e1..d2e76b1 100644
--- a/integrationtests/cmd/ioworkload/scenario_rename.go
+++ b/integrationtests/cmd/ioworkload/scenario_rename.go
@@ -180,16 +180,18 @@ func renameEnoent() error {
return fmt.Errorf("new path bytes: %w", err)
}
- _, _, errno := syscall.Syscall(
- syscall.SYS_RENAME,
- uintptr(unsafe.Pointer(oldBytes)),
- uintptr(unsafe.Pointer(newBytes)),
- 0,
- )
- runtime.KeepAlive(oldBytes)
- runtime.KeepAlive(newBytes)
- if errno == 0 {
- return fmt.Errorf("expected ENOENT, but rename succeeded")
+ for i := 0; i < 5; i++ {
+ _, _, errno := syscall.Syscall(
+ syscall.SYS_RENAME,
+ uintptr(unsafe.Pointer(oldBytes)),
+ uintptr(unsafe.Pointer(newBytes)),
+ 0,
+ )
+ runtime.KeepAlive(oldBytes)
+ runtime.KeepAlive(newBytes)
+ if errno == 0 {
+ return fmt.Errorf("expected ENOENT, but rename succeeded")
+ }
}
return nil
}