From 7f3eb6182ba72b1b45cf313a01b9c7d4b374255f Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Fri, 7 Jan 2022 17:11:41 -0500 Subject: [PATCH] runtime: skip TestSegv traceback check on 386 The VDSO (__kernel_vsyscall) is reachable via asmcgocall(cgo_start_thread) on linux-386, which causes traceback to throw. Fixes #49182. For #50504. Change-Id: Idb78cb8de752203ce0ed63c2dbd2d12847338688 Reviewed-on: https://go-review.googlesource.com/c/go/+/376656 Reviewed-by: Cherry Mui Trust: Michael Pratt Run-TryBot: Michael Pratt --- src/runtime/crash_cgo_test.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index 058eae1c09..abaed40977 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -625,12 +625,20 @@ func TestSegv(t *testing.T) { // TODO(golang.org/issue/49182): Skip, runtime // throws while attempting to generate // traceback. - default: - nowant := "runtime: " - if strings.Contains(got, nowant) { - t.Errorf("unexpectedly saw %q in output", nowant) + return + case "linux": + if runtime.GOARCH == "386" { + // TODO(golang.org/issue/50504): Skip, + // runtime throws while attempting to + // generate traceback from VDSO call + // via asmcgocall. + return } } + nowant := "runtime: " + if strings.Contains(got, nowant) { + t.Errorf("unexpectedly saw %q in output", nowant) + } }) } } -- 2.50.0