1
0
mirror of https://github.com/golang/go synced 2024-11-22 23:50:03 -07:00

os/signal: make test logs reflect reality

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14470043
This commit is contained in:
Joel Sing 2013-10-07 09:04:20 -07:00 committed by Ian Lance Taylor
parent e67b0e6885
commit 932428a1ed

View File

@ -36,8 +36,8 @@ func TestSignal(t *testing.T) {
Notify(c, syscall.SIGHUP)
defer Stop(c)
t.Logf("sighup...")
// Send this process a SIGHUP
t.Logf("sighup...")
syscall.Kill(syscall.Getpid(), syscall.SIGHUP)
waitSig(t, c, syscall.SIGHUP)
@ -45,18 +45,18 @@ func TestSignal(t *testing.T) {
c1 := make(chan os.Signal, 1)
Notify(c1)
t.Logf("sigwinch...")
// Send this process a SIGWINCH
t.Logf("sigwinch...")
syscall.Kill(syscall.Getpid(), syscall.SIGWINCH)
waitSig(t, c1, syscall.SIGWINCH)
// Send two more SIGHUPs, to make sure that
// they get delivered on c1 and that not reading
// from c does not block everything.
t.Logf("sigwinch...")
t.Logf("sighup...")
syscall.Kill(syscall.Getpid(), syscall.SIGHUP)
waitSig(t, c1, syscall.SIGHUP)
t.Logf("sigwinch...")
t.Logf("sighup...")
syscall.Kill(syscall.Getpid(), syscall.SIGHUP)
waitSig(t, c1, syscall.SIGHUP)