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

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


None yet
3 participants
Copy link

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)
            # GOPATH with p1 in d1, p2 in d2 (0.000s)
            # build & install p1 (0.030s)
            > go install -i p1
            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	cmd/go	317.866s


@0intro 0intro added the OS-Plan9 label Jul 17, 2018

@0intro 0intro added this to the Go1.11 milestone Jul 17, 2018

@0intro 0intro self-assigned this Jul 17, 2018


This comment has been minimized.

Copy link
Member Author

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)

This comment has been minimized.

Copy link

commented Jul 17, 2018

Change mentions this issue: cmd/go: fix TestScript on Plan 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.