diff options
| author | thepudds <thepudds1460@gmail.com> | 2025-07-18 18:25:08 -0400 |
|---|---|---|
| committer | t hepudds <thepudds1460@gmail.com> | 2025-07-19 05:33:40 -0700 |
| commit | e32255fcc0861727243fca4e94766c0a322954fb (patch) | |
| tree | 72e82735310dd0b25ef6b0b5bcf852f0e7c911ae /src | |
| parent | 0451816430486a25966dd76aa92735ac0588b8e5 (diff) | |
| download | go-e32255fcc0861727243fca4e94766c0a322954fb.tar.xz | |
cmd/compile/internal/ssa: restrict architectures for TestDebugLines_74576
CL 687815 recently added TestDebugLines_74576.
The pre-existing debug_lines_test.go file generally restricts the
tested architectures and contains multiple warnings that the
testing approach is useful but fragile, such as:
"These files must all be short because this is super-fragile."
Despite that, initially I wanted to see what happened on the
different architectures on the trybots in case it might show something
surprising, and I let TestDebugLines_74576 run on all architectures.
That seemed to initially work, but the test is now failing on a
linux/risc64 builder (#74669), so it is likely more prudent to be
more conservative and restrict the platforms like many of the
other pre-existing tests, which is what this CL now does.
Fixes #74669
Change-Id: I9e5a7d3ee901f58253cf72e03c2239df338479e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/688856
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/compile/internal/ssa/debug_lines_test.go | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/src/cmd/compile/internal/ssa/debug_lines_test.go b/src/cmd/compile/internal/ssa/debug_lines_test.go index 5ca844403e..79dbd91c2f 100644 --- a/src/cmd/compile/internal/ssa/debug_lines_test.go +++ b/src/cmd/compile/internal/ssa/debug_lines_test.go @@ -116,20 +116,30 @@ func TestDebugLines_53456(t *testing.T) { } func TestDebugLines_74576(t *testing.T) { - tests := []struct { - file string - wantStmts []int - }{ - {"i74576a.go", []int{12, 13, 13, 14}}, - {"i74576b.go", []int{12, 13, 13, 14}}, - {"i74576c.go", []int{12, 13, 13, 14}}, - } - t.Parallel() - for _, test := range tests { - t.Run(test.file, func(t *testing.T) { - t.Parallel() - testDebugLines(t, "-N -l", test.file, "main", test.wantStmts, false) - }) + unixOnly(t) + + switch testGoArch() { + default: + // Failed on linux/riscv64 (issue 74669), but conservatively + // skip many architectures like several other tests here. + t.Skip("skipped for many architectures") + + case "arm64", "amd64", "loong64": + tests := []struct { + file string + wantStmts []int + }{ + {"i74576a.go", []int{12, 13, 13, 14}}, + {"i74576b.go", []int{12, 13, 13, 14}}, + {"i74576c.go", []int{12, 13, 13, 14}}, + } + t.Parallel() + for _, test := range tests { + t.Run(test.file, func(t *testing.T) { + t.Parallel() + testDebugLines(t, "-N -l", test.file, "main", test.wantStmts, false) + }) + } } } |
