mkfifo creates a FIFO in a temp dir; opening it for read OR write would block forever with no peer, which is exactly what the guards must prevent.
(t *testing.T)
| 20 | // mkfifo creates a FIFO in a temp dir; opening it for read OR write would |
| 21 | // block forever with no peer, which is exactly what the guards must prevent. |
| 22 | func mkfifo(t *testing.T) string { |
| 23 | t.Helper() |
| 24 | path := filepath.Join(t.TempDir(), "pipe") |
| 25 | if err := syscall.Mkfifo(path, 0o600); err != nil { |
| 26 | t.Skipf("mkfifo unavailable: %v", err) |
| 27 | } |
| 28 | return path |
| 29 | } |
| 30 | |
| 31 | // TestReadFileRefusesNonRegular: read_file on a FIFO would block forever in |
| 32 | // open(2) waiting for a writer, leaking the tool goroutine past Ctrl+C (which |
no outgoing calls
no test coverage detected