Skip to content

Commit 73f86d2

Browse files
committed
[release-branch.go1.14] cmd/compile/internal/ssa: skip TestNexting with old Delve on linux/386
Support for linux/386 was added to Delve in version 1.4.1, but the version of Delve currently installed on the linux-386-longtest builder is 1.2.0. That isn't new enough, which causes the test to fail. Skip it on that builder until it can be made to work. The only reason it used to pass on the linux-386-longtest builder before is because that builder was misconfigured to run tests for linux/amd64. This was resolved in CL 234520. Also improve internal documentation and the text of skip reasons. For #39309. Fixes #39562. Change-Id: I395cb1f076e59dd3a3feb53e1dcdce5101e9a0f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/237619 Reviewed-by: David Chase <[email protected]>
1 parent 83b181c commit 73f86d2

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/cmd/compile/internal/ssa/debug_test.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ var gogcflags = os.Getenv("GO_GCFLAGS")
4949
// optimizedLibs usually means "not running in a noopt test builder".
5050
var optimizedLibs = (!strings.Contains(gogcflags, "-N") && !strings.Contains(gogcflags, "-l"))
5151

52-
// TestNexting go-builds a file, then uses a debugger (default gdb, optionally delve)
52+
// TestNexting go-builds a file, then uses a debugger (default delve, optionally gdb)
5353
// to next through the generated executable, recording each line landed at, and
5454
// then compares those lines with reference file(s).
5555
// Flag -u updates the reference file(s).
56-
// Flag -d changes the debugger to delve (and uses delve-specific reference files)
56+
// Flag -g changes the debugger to gdb (and uses gdb-specific reference files)
5757
// Flag -v is ever-so-slightly verbose.
5858
// Flag -n is for dry-run, and prints the shell and first debug commands.
5959
//
@@ -83,17 +83,17 @@ var optimizedLibs = (!strings.Contains(gogcflags, "-N") && !strings.Contains(gog
8383
// to indicate normalization of Strings, (hex) addresses, and numbers.
8484
// "O" is an explicit indication that we expect it to be optimized out.
8585
// For example:
86-
/*
87-
if len(os.Args) > 1 { //gdb-dbg=(hist/A,cannedInput/A) //dlv-dbg=(hist/A,cannedInput/A)
88-
*/
86+
//
87+
// if len(os.Args) > 1 { //gdb-dbg=(hist/A,cannedInput/A) //dlv-dbg=(hist/A,cannedInput/A)
88+
//
8989
// TODO: not implemented for Delve yet, but this is the plan
9090
//
9191
// After a compiler change that causes a difference in the debug behavior, check
9292
// to see if it is sensible or not, and if it is, update the reference files with
9393
// go test debug_test.go -args -u
9494
// (for Delve)
9595
// go test debug_test.go -args -u -d
96-
96+
//
9797
func TestNexting(t *testing.T) {
9898
skipReasons := "" // Many possible skip reasons, list all that apply
9999
if testing.Short() {
@@ -108,7 +108,13 @@ func TestNexting(t *testing.T) {
108108
// Various architectures tend to differ slightly sometimes, and keeping them
109109
// all in sync is a pain for people who don't have them all at hand,
110110
// so limit testing to amd64 (for now)
111-
skipReasons += "not run when testing gdb (-g) unless forced (-f) or linux-amd64"
111+
skipReasons += "not run when testing gdb (-g) unless forced (-f) or linux-amd64; "
112+
}
113+
114+
if !*useGdb && !*force && testenv.Builder() == "linux-386-longtest" {
115+
// The latest version of Delve does support linux/386. However, the version currently
116+
// installed in the linux-386-longtest builder does not. See golang.org/issue/39309.
117+
skipReasons += "not run when testing delve on linux-386-longtest builder unless forced (-f); "
112118
}
113119

114120
if *useGdb {

0 commit comments

Comments
 (0)