From b001ffb864ce5486c6edbe98202d3e0687313ce2 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sun, 8 Jul 2018 01:05:18 +0200 Subject: [PATCH] runtime: fix TestAbort on Plan 9 Since CL 122515, TestAbort is failing on Plan 9 because there is no SIGTRAP signal on Plan 9, but a note containing the "sys: breakpoint" string. This change fixes the TestAbort test by handling the Plan 9 case. Fixes #26265. Change-Id: I2fae00130bcee1cf946d8cc9d147a77f951be390 Reviewed-on: https://go-review.googlesource.com/122464 Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot Reviewed-by: Austin Clements --- src/runtime/crash_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index 7eb20f24ea..f1229f154b 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -650,7 +650,10 @@ func TestAbort(t *testing.T) { } // Check that it's a breakpoint traceback. want := "SIGTRAP" - if runtime.GOOS == "windows" { + switch runtime.GOOS { + case "plan9": + want = "sys: breakpoint" + case "windows": want = "Exception 0x80000003" } if !strings.Contains(output, want) { -- 2.50.0