aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime/crash_unix_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-02-11 14:53:56 -0800
committerIan Lance Taylor <iant@golang.org>2022-02-11 15:01:19 -0800
commit8dc2499aa62f768c6395c9754b8cabc1ce25c494 (patch)
tree43d7fd2bbfd7ad8c9625a718a5e8718889351994 /libgo/go/runtime/crash_unix_test.go
parent9a56779dbc4e2d9c15be8d31e36f2f59be7331a8 (diff)
downloadgcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.zip
gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.gz
gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.bz2
libgo: update to Go1.18beta2
gotools/ * Makefile.am (go_cmd_cgo_files): Add ast_go118.go (check-go-tool): Copy golang.org/x/tools directories. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
Diffstat (limited to 'libgo/go/runtime/crash_unix_test.go')
-rw-r--r--libgo/go/runtime/crash_unix_test.go18
1 files changed, 8 insertions, 10 deletions
diff --git a/libgo/go/runtime/crash_unix_test.go b/libgo/go/runtime/crash_unix_test.go
index 9dac167..b7ca811 100644
--- a/libgo/go/runtime/crash_unix_test.go
+++ b/libgo/go/runtime/crash_unix_test.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
package runtime_test
@@ -14,7 +13,7 @@ import (
"os"
"os/exec"
"runtime"
- "strings"
+ "runtime/debug"
"sync"
"syscall"
"testing"
@@ -22,16 +21,12 @@ import (
"unsafe"
)
-// sigquit is the signal to send to kill a hanging testdata program.
-// Send SIGQUIT to get a stack trace.
-var sigquit = syscall.SIGQUIT
-
func init() {
if runtime.Sigisblocked(int(syscall.SIGQUIT)) {
// We can't use SIGQUIT to kill subprocesses because
// it's blocked. Use SIGKILL instead. See issue
// #19196 for an example of when this happens.
- sigquit = syscall.SIGKILL
+ testenv.Sigquit = syscall.SIGKILL
}
}
@@ -212,6 +207,11 @@ func TestPanicSystemstack(t *testing.T) {
func init() {
if len(os.Args) >= 2 && os.Args[1] == "testPanicSystemstackInternal" {
+ // Complete any in-flight GCs and disable future ones. We're going to
+ // block goroutines on runtime locks, which aren't ever preemptible for the
+ // GC to scan them.
+ runtime.GC()
+ debug.SetGCPercent(-1)
// Get two threads running on the system stack with
// something recognizable in the stack trace.
runtime.GOMAXPROCS(2)
@@ -245,9 +245,7 @@ func TestSignalExitStatus(t *testing.T) {
func TestSignalIgnoreSIGTRAP(t *testing.T) {
if runtime.GOOS == "openbsd" {
- if bn := testenv.Builder(); strings.HasSuffix(bn, "-62") || strings.HasSuffix(bn, "-64") {
- testenv.SkipFlaky(t, 17496)
- }
+ testenv.SkipFlaky(t, 49725)
}
output := runTestProg(t, "testprognet", "SignalIgnoreSIGTRAP")