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: TestScript failing on Plan 9 #26421

Closed
0intro opened this issue Jul 17, 2018 · 2 comments
Closed

cmd/go: TestScript failing on Plan 9 #26421

0intro opened this issue Jul 17, 2018 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9 Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@0intro
Copy link
Member

0intro commented Jul 17, 2018

CL 123577 added TestScript. This test is failing on Plan 9.

--- FAIL: TestScript (0.00s)
    --- FAIL: TestScript/install_rebuild_gopath (0.07s)
        script_test.go:131: 
            # GOPATH with p1 in d1, p2 in d2 (0.000s)
            # build & install p1 (0.030s)
            > go install -i p1
            [stderr]
            can't load package: package p1: cannot find package "p1" in any of:
            	/tmp/workdir/go/src/p1 (from $GOROOT)
            	$WORK/d1:$WORK/d2/src/p1 (from $GOPATH)
            [exit status: 'testgo 4407: 1']
            FAIL: testdata/script/install_rebuild_gopath.txt:6: unexpected command failure
            
FAIL
FAIL	cmd/go	317.866s

See https://build.golang.org/log/d434139fc99a3a97f9442d44e0aafd811553036b

@0intro 0intro added this to the Go1.11 milestone Jul 17, 2018
@0intro 0intro self-assigned this Jul 17, 2018
@0intro
Copy link
Member Author

0intro commented Jul 17, 2018

This issue is happening because the os.PathListSeparator used by filepath.SplitList, which is called by the go tool to split the GOPATH, uses the \000 separator instead of the : separator expected by the install_rebuild_gopath test.

Consequently, the GOPATH is invalid and the "p1" package cannot be found.

This is what happens when running go install manually with the invalid GOPATH:

cpu% WORK=/tmp/cmd-go-test-832313417/script-install_rebuild_gopath
cpu% GOPATH=$WORK/d1:$WORK/d2
cpu% go install -i p1
can't load package: package p1: cannot find package "p1" in any of:
	/usr/go/src/p1 (from $GOROOT)
	/tmp/cmd-go-test-832313417/script-install_rebuild_gopath/d1:/tmp/cmd-go-test-832313417/script-install_rebuild_gopath/d2/src/p1 (from $GOPATH)

@gopherbot
Copy link

Change https://golang.org/cl/124435 mentions this issue: cmd/go: fix TestScript on Plan 9

@FiloSottile FiloSottile added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. labels Jul 19, 2018
@golang golang locked and limited conversation to collaborators Jul 19, 2019
@rsc rsc unassigned 0intro Jun 23, 2022
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. OS-Plan9 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

3 participants