]> Cypherpunks repositories - gostls13.git/commit
runtime: use SIGKILL if SIGQUIT is blocked; skip tests that need SIGQUIT
authorAustin Clements <austin@google.com>
Thu, 20 Jul 2017 15:12:37 +0000 (11:12 -0400)
committerAustin Clements <austin@google.com>
Thu, 20 Jul 2017 18:09:18 +0000 (18:09 +0000)
commit37b7880d157111a796eda7f59ca73af7621489b8
tree13bbca6e220caa9fee15a332696abce102dffb77
parent28f650a2f7718b4fa7f55e06a0f75a85df90c517
runtime: use SIGKILL if SIGQUIT is blocked; skip tests that need SIGQUIT

The runtime tests may be invoked from a parent that has SIGQUIT
blocked. For example, Java invokes subprocesses this way. In this
situation, TestCrashDumpsAllThreads and TestPanicSystemstack will fail
because they depend on SIGQUIT to get tracebacks, and any subprocess
test that times out will fail to kill the subprocess.

Fix this by detecting if SIGQUIT is blocked and, if so, skipping tests
that depend on it and using SIGKILL to kill timed-out subprocesses.

Based on a fix by Carl Henrik Lunde in
https://golang.org/issue/19196#issuecomment-316145733

Fixes #19196.

Change-Id: Ia20bf15b96086487d0ef6b75239dcc260c21714c
Reviewed-on: https://go-review.googlesource.com/50330
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/crash_unix_test.go
src/runtime/export_unix_test.go [new file with mode: 0644]