diff options
| author | Cherry Mui <cherryyz@google.com> | 2024-05-24 13:18:50 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2024-05-24 20:26:02 +0000 |
| commit | 23778fcb276b020d41f7bc8a46fb482a40638017 (patch) | |
| tree | 77a99037c8e5c2eff21e873517d09559a8dbf103 /src/cmd | |
| parent | 54efef99b2b9432c2eb6cd63a287a13d43b9bb7b (diff) | |
| download | go-23778fcb276b020d41f7bc8a46fb482a40638017.tar.xz | |
cmd/link: print the seed in TestRandLayout
When the test fails, print the seed, to help debug.
Change-Id: I1530ce433f3c6b573fbba061452f57c7649cad77
Reviewed-on: https://go-review.googlesource.com/c/go/+/587925
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd')
| -rw-r--r-- | src/cmd/link/link_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/link/link_test.go b/src/cmd/link/link_test.go index ea377e77cc..5fed6619c7 100644 --- a/src/cmd/link/link_test.go +++ b/src/cmd/link/link_test.go @@ -1397,17 +1397,17 @@ func TestRandLayout(t *testing.T) { cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-ldflags=-randlayout="+seed, "-o", exe, src) out, err := cmd.CombinedOutput() if err != nil { - t.Fatalf("build failed: %v\n%s", err, out) + t.Fatalf("seed=%v: build failed: %v\n%s", seed, err, out) } cmd = testenv.Command(t, exe) err = cmd.Run() if err != nil { - t.Fatalf("executable failed to run: %v\n%s", err, out) + t.Fatalf("seed=%v: executable failed to run: %v\n%s", seed, err, out) } cmd = testenv.Command(t, testenv.GoToolPath(t), "tool", "nm", exe) out, err = cmd.CombinedOutput() if err != nil { - t.Fatalf("fail to run \"go tool nm\": %v\n%s", err, out) + t.Fatalf("seed=%v: fail to run \"go tool nm\": %v\n%s", seed, err, out) } syms[i] = string(out) } |
