Skip to content

Commit 0d4e979

Browse files
committed
fix(tests): remove named pipe if it exists
1 parent dba1a42 commit 0d4e979

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/integration/capture_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ func readWritevCaptureTest(t *testing.T, captureDir string, workingDir string) e
246246

247247
func readWritePipe(t *testing.T, captureDir string, workingDir string) error {
248248
namedPipe := fmt.Sprintf("%s/pipe_test", workingDir)
249-
err := syscall.Mkfifo(namedPipe, 0666)
249+
err := os.Remove(namedPipe)
250+
if err != nil && !os.IsNotExist(err) {
251+
return err
252+
}
253+
err = syscall.Mkfifo(namedPipe, 0666)
250254
if err != nil {
251255
return err
252256
}

0 commit comments

Comments
 (0)