Skip to content

Commit

Permalink
fix(tests): remove named pipe if it exists (#4171)
Browse files Browse the repository at this point in the history
  • Loading branch information
geyslan authored Jul 3, 2024
1 parent 499c05b commit 96ebc05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration/capture_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ func readWritevCaptureTest(t *testing.T, captureDir string, workingDir string) e

func readWritePipe(t *testing.T, captureDir string, workingDir string) error {
namedPipe := fmt.Sprintf("%s/pipe_test", workingDir)
err := syscall.Mkfifo(namedPipe, 0666)
err := os.Remove(namedPipe)
if err != nil && !os.IsNotExist(err) {
return err
}
err = syscall.Mkfifo(namedPipe, 0666)
if err != nil {
return err
}
Expand Down

0 comments on commit 96ebc05

Please sign in to comment.