From 03ad694dcbe8d981d644c9878326bd086d056af0 Mon Sep 17 00:00:00 2001 From: limeidan Date: Fri, 13 Jun 2025 11:48:44 +0800 Subject: [PATCH] runtime: update skips for TestGdbBacktrace We encountered a new type of "no such process" error on loong64, it's like this "Couldn't get NT_PRSTATUS registers: No such process.", I checked the source code of gdb, NT_PRSTATUS is not fixed, it may be another name, so I use regular expression here to match possible cases. Updates #50838 Fixes #74389 Change-Id: I3e3f7455b2dc6b8aa10c084f24f6a2a114790855 Reviewed-on: https://go-review.googlesource.com/c/go/+/684195 LUCI-TryBot-Result: Go LUCI Auto-Submit: Dmitri Shuralyov Reviewed-by: David Chase Reviewed-by: abner chenc Reviewed-by: Dmitri Shuralyov --- src/runtime/runtime-gdb_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go index 2286868567..19ad29c127 100644 --- a/src/runtime/runtime-gdb_test.go +++ b/src/runtime/runtime-gdb_test.go @@ -528,11 +528,12 @@ func TestGdbBacktrace(t *testing.T) { got, err := cmd.CombinedOutput() t.Logf("gdb output:\n%s", got) if err != nil { + noProcessRE := regexp.MustCompile(`Couldn't get [a-zA-Z_ -]* ?registers: No such process\.`) switch { case bytes.Contains(got, []byte("internal-error: wait returned unexpected status 0x0")): // GDB bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28551 testenv.SkipFlaky(t, 43068) - case bytes.Contains(got, []byte("Couldn't get registers: No such process.")), + case noProcessRE.Match(got), bytes.Contains(got, []byte("Unable to fetch general registers.: No such process.")), bytes.Contains(got, []byte("reading register pc (#64): No such process.")): // GDB bug: https://sourceware.org/bugzilla/show_bug.cgi?id=9086 -- 2.50.0