diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-23 17:27:08 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-23 17:27:08 +0200 |
| commit | aa19be8c624a6adc3ecbf11a6ee0506a5c7d34fe (patch) | |
| tree | 6abf6475155980c4c663d04c24ac8f15ca51a166 /integrationtests/cmd/ioworkload/scenario_link.go | |
| parent | 80d68b05199d288df8ccd7a073ac32ebfc90be62 (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.go | 24 |
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 } |
