Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: TestExecutableGOROOT fails if GOROOT_FINAL is set #20284

Closed
mwhudson opened this issue May 8, 2017 · 11 comments
Closed

cmd/go: TestExecutableGOROOT fails if GOROOT_FINAL is set #20284

mwhudson opened this issue May 8, 2017 · 11 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@mwhudson
Copy link
Contributor

mwhudson commented May 8, 2017

What version of Go are you using (go version)?

$ ../bin/go version
go version devel +88672de Mon May 8 19:52:30 2017 +0000 linux/amd64

What operating system and processor architecture are you using (go env)?

linux/amd64 but it doesn't really matter here.

What did you do?

$ GOROOT_FINAL=/foobar ./all.bash

What did you expect to see?

Tests passing.

What did you see instead?

--- FAIL: TestExecutableGOROOT (0.05s)
go_test.go:3974: copied go tool failed exit status 2: go: cannot find GOROOT directory: /foobar
FAIL
FAIL cmd/go 51.515s

I think this is the

{{{
// Missing GOROOT/pkg/tool, the go tool should fall back to
// its default path.
}}}

case from the test. The nature of the failure makes me wonder if it is really testing what it thinks it's failing though. cc @crawshaw

@mwhudson mwhudson added this to the Go1.9 milestone May 10, 2017
@gopherbot
Copy link

CL https://golang.org/cl/46428 mentions this issue.

@bradfitz bradfitz modified the milestones: Go1.10, Go1.9 Jun 26, 2017
@bradfitz bradfitz added NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. labels Jun 26, 2017
@bradfitz
Copy link
Contributor

Reopening for Go 1.10, since the test still fails when @broady runs cmd/release.

gopherbot pushed a commit that referenced this issue Jun 26, 2017
Updates #20284

Change-Id: I4d55d6adec4e8efb54285ca27bb4fa39c76582c3
Reviewed-on: https://go-review.googlesource.com/46719
Reviewed-by: Chris Broadfoot <cbro@golang.org>
@ptribble
Copy link

I'm seeing this (or something close) fail for 1.9beta2 (and 1.9beta1). This is on solaris_amd64 but that shouldn't make any difference.

GOROOT_BOOTSTRAP=/usr/versions/go-1.8 GOROOT_FINAL=/usr/versions/go-1.9 ./all.bash

results in

--- FAIL: TestExecutableGOROOT (0.09s)
--- FAIL: TestExecutableGOROOT/RelocatedExe (0.01s)
go_test.go:4047: /tmp/gotest187550508/new/bin/go env GOROOT: exit status 2, go: cannot find GOROOT directory: /usr/versions/go-1.9

@davecheney
Copy link
Contributor

davecheney commented Jun 27, 2017 via email

@ptribble
Copy link

Ah. That does appear to be the case.

So perhaps the installation instructions and/or release notes need to be updated?

@bradfitz bradfitz reopened this Jun 27, 2017
@gopherbot
Copy link

CL https://golang.org/cl/46719 mentions this issue.

@bradfitz
Copy link
Contributor

We need to disable that test for Go 1.9. Will send a CL.

@gopherbot
Copy link

CL https://golang.org/cl/46830 mentions this issue.

gopherbot pushed a commit that referenced this issue Jun 27, 2017
Test just doesn't work.

Updates #20284

Change-Id: I31c3f771e68dcdc471767594a1467e19fbf5fe88
Reviewed-on: https://go-review.googlesource.com/46830
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@google.com>
@rsc
Copy link
Contributor

rsc commented Jul 6, 2017

You do need to set GOROOT_FINAL in order to get the right default value for runtime.GOROOT.

@gopherbot
Copy link

Change https://golang.org/cl/82277 mentions this issue: cmd/go: re-enable TestExecutableGOROOT/RelocatedExe

@gopherbot
Copy link

Change https://golang.org/cl/86835 mentions this issue: cmd/link: set runtime.GOROOT default during link

@golang golang locked and limited conversation to collaborators Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

6 participants