aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlimeidan <limeidan@loongson.cn>2025-06-13 11:48:44 +0800
committerGopher Robot <gobot@golang.org>2025-06-30 09:00:54 -0700
commit03ad694dcbe8d981d644c9878326bd086d056af0 (patch)
tree54406924d849f3149265b50c574ff6e2e842df59
parent9d1cd0b8816654ac36f2122b52dd8335aae86b26 (diff)
downloadgo-03ad694dcbe8d981d644c9878326bd086d056af0.tar.xz
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
-rw-r--r--src/runtime/runtime-gdb_test.go3
1 files changed, 2 insertions, 1 deletions
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