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_open.go | |
| parent | 80d68b05199d288df8ccd7a073ac32ebfc90be62 (diff) | |
Run integration tests in parallel by default and stabilize flaky scenarios
Diffstat (limited to 'integrationtests/cmd/ioworkload/scenario_open.go')
| -rw-r--r-- | integrationtests/cmd/ioworkload/scenario_open.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/integrationtests/cmd/ioworkload/scenario_open.go b/integrationtests/cmd/ioworkload/scenario_open.go index d86e53b..7a1f15a 100644 --- a/integrationtests/cmd/ioworkload/scenario_open.go +++ b/integrationtests/cmd/ioworkload/scenario_open.go @@ -228,8 +228,9 @@ func openByHandleAtSyscall(mountFD int, handle []byte, flags int) (int, error) { return int(fd), nil } -// openDurationGap creates two openat syscalls separated by a deliberate sleep. -// Integration tests use this to assert durationToPrev captures inter-syscall gaps. +// openDurationGap performs two openat syscalls for the same path and flags, +// separated by a deliberate sleep. Integration tests use this to assert that +// durationToPrev captures inter-syscall gaps for the same event key. func openDurationGap() error { dir, cleanup, err := makeTempDir("open-duration-gap") if err != nil { @@ -237,8 +238,9 @@ func openDurationGap() error { } defer cleanup() - first := filepath.Join(dir, "gap-first.txt") - fd1, err := syscall.Open(first, syscall.O_RDWR|syscall.O_CREAT, 0o644) + path := filepath.Join(dir, "gap-shared.txt") + + fd1, err := syscall.Open(path, syscall.O_RDWR|syscall.O_CREAT, 0o644) if err != nil { return fmt.Errorf("open first: %w", err) } @@ -248,8 +250,7 @@ func openDurationGap() error { time.Sleep(800 * time.Millisecond) - second := filepath.Join(dir, "gap-second.txt") - fd2, err := syscall.Open(second, syscall.O_RDWR|syscall.O_CREAT, 0o644) + fd2, err := syscall.Open(path, syscall.O_RDWR|syscall.O_CREAT, 0o644) if err != nil { return fmt.Errorf("open second: %w", err) } |
