]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: update skips for TestGdbBacktrace
authorlimeidan <limeidan@loongson.cn>
Fri, 13 Jun 2025 03:48:44 +0000 (11:48 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 30 Jun 2025 16:00:54 +0000 (09:00 -0700)
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>
src/runtime/runtime-gdb_test.go

index 2286868567a322e735b3e9a380685a58fefdbf39..19ad29c12717d277bc0189fa54efc5048847a15c 100644 (file)
@@ -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