aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/debug_test.go
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2020-06-11 22:02:27 -0400
committerDmitri Shuralyov <dmitshur@golang.org>2020-06-12 16:44:36 +0000
commitcc3b303a6f255a7c488ca54449e11e2f3b632ed4 (patch)
treec1ef58368abf16e3ea98ef18b1172e1d3edef33c /src/cmd/compile/internal/ssa/debug_test.go
parent509ee7064207cc9c8ac81bc76f182a5fbb877e9b (diff)
downloadgo-cc3b303a6f255a7c488ca54449e11e2f3b632ed4.tar.gz
go-cc3b303a6f255a7c488ca54449e11e2f3b632ed4.zip
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. Fixes #39309. Change-Id: I395cb1f076e59dd3a3feb53e1dcdce5101e9a0f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/237603 Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/debug_test.go')
-rw-r--r--src/cmd/compile/internal/ssa/debug_test.go20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/cmd/compile/internal/ssa/debug_test.go b/src/cmd/compile/internal/ssa/debug_test.go
index d68cb1ccc0..3346312542 100644
--- a/src/cmd/compile/internal/ssa/debug_test.go
+++ b/src/cmd/compile/internal/ssa/debug_test.go
@@ -49,11 +49,11 @@ var gogcflags = os.Getenv("GO_GCFLAGS")
// optimizedLibs usually means "not running in a noopt test builder".
var optimizedLibs = (!strings.Contains(gogcflags, "-N") && !strings.Contains(gogcflags, "-l"))
-// TestNexting go-builds a file, then uses a debugger (default gdb, optionally delve)
+// TestNexting go-builds a file, then uses a debugger (default delve, optionally gdb)
// to next through the generated executable, recording each line landed at, and
// then compares those lines with reference file(s).
// Flag -u updates the reference file(s).
-// Flag -d changes the debugger to delve (and uses delve-specific reference files)
+// Flag -g changes the debugger to gdb (and uses gdb-specific reference files)
// Flag -v is ever-so-slightly verbose.
// Flag -n is for dry-run, and prints the shell and first debug commands.
//
@@ -83,9 +83,9 @@ var optimizedLibs = (!strings.Contains(gogcflags, "-N") && !strings.Contains(gog
// to indicate normalization of Strings, (hex) addresses, and numbers.
// "O" is an explicit indication that we expect it to be optimized out.
// For example:
-/*
- if len(os.Args) > 1 { //gdb-dbg=(hist/A,cannedInput/A) //dlv-dbg=(hist/A,cannedInput/A)
-*/
+//
+// if len(os.Args) > 1 { //gdb-dbg=(hist/A,cannedInput/A) //dlv-dbg=(hist/A,cannedInput/A)
+//
// TODO: not implemented for Delve yet, but this is the plan
//
// After a compiler change that causes a difference in the debug behavior, check
@@ -93,7 +93,7 @@ var optimizedLibs = (!strings.Contains(gogcflags, "-N") && !strings.Contains(gog
// go test debug_test.go -args -u
// (for Delve)
// go test debug_test.go -args -u -d
-
+//
func TestNexting(t *testing.T) {
testenv.SkipFlaky(t, 37404)
@@ -110,7 +110,13 @@ func TestNexting(t *testing.T) {
// Various architectures tend to differ slightly sometimes, and keeping them
// all in sync is a pain for people who don't have them all at hand,
// so limit testing to amd64 (for now)
- skipReasons += "not run when testing gdb (-g) unless forced (-f) or linux-amd64"
+ skipReasons += "not run when testing gdb (-g) unless forced (-f) or linux-amd64; "
+ }
+
+ if !*useGdb && !*force && testenv.Builder() == "linux-386-longtest" {
+ // The latest version of Delve does support linux/386. However, the version currently
+ // installed in the linux-386-longtest builder does not. See golang.org/issue/39309.
+ skipReasons += "not run when testing delve on linux-386-longtest builder unless forced (-f); "
}
if *useGdb {