test: reset a signal handler before closing a signal channel
goroutine 5 [running]: os/signal.process(0x10e21c0, 0xc00050c280) third_party/go/gc/src/os/signal/signal.go:227 +0x164 os/signal.loop() third_party/go/gc/src/os/signal/signal_unix.go:23 +0x3e created by os/signal.init.0 third_party/go/gc/src/os/signal/signal_unix.go:29 +0x41 PiperOrigin-RevId: 264518530
This commit is contained in:
parent
8b7e7a04d6
commit
7609da6cb9
|
@ -280,6 +280,7 @@ func runTestCaseRunsc(testBin string, tc gtest.TestCase, t *testing.T) {
|
||||||
if err = cmd.Run(); err != nil {
|
if err = cmd.Run(); err != nil {
|
||||||
t.Errorf("test %q exited with status %v, want 0", tc.FullName(), err)
|
t.Errorf("test %q exited with status %v, want 0", tc.FullName(), err)
|
||||||
}
|
}
|
||||||
|
signal.Stop(sig)
|
||||||
close(sig)
|
close(sig)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue