aboutsummaryrefslogtreecommitdiff
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 18:56:48 +0000
commit034ed8089d057349032fb56a3c827ab51789c712 (patch)
treeb95abfad5e6d158070a023156ad7febad7cb2e8c
parent6be4a5eb4898c7b5e7557dda061cc09ba310698b (diff)
downloadgo-034ed8089d057349032fb56a3c827ab51789c712.tar.gz
go-034ed8089d057349032fb56a3c827ab51789c712.zip
[release-branch.go1.13] 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 #39561. Change-Id: I395cb1f076e59dd3a3feb53e1dcdce5101e9a0f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/237617 Reviewed-by: David Chase <drchase@google.com>
-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 73a0afb82c..d3aaa48055 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) {
skipReasons := "" // Many possible skip reasons, list all that apply
if testing.Short() {
@@ -108,7 +108,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 {