summaryrefslogtreecommitdiff
path: root/integrationtests/cmd/ioworkload/scenario_link.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-23 17:27:08 +0200
committerPaul Buetow <paul@buetow.org>2026-02-23 17:27:08 +0200
commitaa19be8c624a6adc3ecbf11a6ee0506a5c7d34fe (patch)
tree6abf6475155980c4c663d04c24ac8f15ca51a166 /integrationtests/cmd/ioworkload/scenario_link.go
parent80d68b05199d288df8ccd7a073ac32ebfc90be62 (diff)
Run integration tests in parallel by default and stabilize flaky scenarios
Diffstat (limited to 'integrationtests/cmd/ioworkload/scenario_link.go')
-rw-r--r--integrationtests/cmd/ioworkload/scenario_link.go24
1 files changed, 15 insertions, 9 deletions
diff --git a/integrationtests/cmd/ioworkload/scenario_link.go b/integrationtests/cmd/ioworkload/scenario_link.go
index bb16984..beb49a0 100644
--- a/integrationtests/cmd/ioworkload/scenario_link.go
+++ b/integrationtests/cmd/ioworkload/scenario_link.go
@@ -5,6 +5,7 @@ import (
"path/filepath"
"runtime"
"syscall"
+ "time"
"unsafe"
)
@@ -212,17 +213,22 @@ func linkEnoent() error {
return fmt.Errorf("dst path bytes: %w", err)
}
- _, _, errno := syscall.Syscall(
- syscall.SYS_LINK,
- uintptr(unsafe.Pointer(srcBytes)),
- uintptr(unsafe.Pointer(dstBytes)),
- 0,
- )
+ // Issue the same failing syscall a few times to make capture robust even
+ // under heavy parallel integration load.
+ for i := 0; i < 3; i++ {
+ _, _, errno := syscall.Syscall(
+ syscall.SYS_LINK,
+ uintptr(unsafe.Pointer(srcBytes)),
+ uintptr(unsafe.Pointer(dstBytes)),
+ 0,
+ )
+ if errno == 0 {
+ return fmt.Errorf("expected ENOENT, but link succeeded")
+ }
+ time.Sleep(20 * time.Millisecond)
+ }
runtime.KeepAlive(srcBytes)
runtime.KeepAlive(dstBytes)
- if errno == 0 {
- return fmt.Errorf("expected ENOENT, but link succeeded")
- }
return nil
}