diff options
Diffstat (limited to 'src/os/exec/exec_test.go')
-rw-r--r-- | src/os/exec/exec_test.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go index 34337450a0..bd20dd4955 100644 --- a/src/os/exec/exec_test.go +++ b/src/os/exec/exec_test.go @@ -262,9 +262,13 @@ func TestStdinCloseRace(t *testing.T) { t.Fatalf("Start: %v", err) } go func() { - if err := cmd.Process.Kill(); err != nil { - t.Errorf("Kill: %v", err) - } + // We don't check the error return of Kill. It is + // possible that the process has already exited, in + // which case Kill will return an error "process + // already finished". The purpose of this test is to + // see whether the race detector reports an error; it + // doesn't matter whether this Kill succeeds or not. + cmd.Process.Kill() }() go func() { // Send the wrong string, so that the child fails even |