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/mod_enabled failing on Plan 9 #27065

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

cmd/go: TestScript/mod_enabled failing on Plan 9 #27065

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

Comments

@0intro
Copy link
Member

0intro commented Aug 17, 2018

CL 129063 changed TestScript/mod_enabled. This test is failing on Plan 9.

    --- FAIL: TestScript/mod_enabled (0.78s)
        script_test.go:151: 
            # GO111MODULE=auto should only trigger outside GOPATH/src (0.318s)
            # GO111MODULE=on should trigger everywhere (0.255s)
            # GO111MODULE=off should trigger nowhere (0.097s)
            # GO111MODULE=auto should ignore and warn about /tmp/go.mod (0.040s)
            > env GO111MODULE=auto
            > cp $GOPATH/src/x/y/z/go.mod $WORK/tmp/go.mod
            > mkdir $WORK/tmp/mydir
            > cd $WORK/tmp/mydir
            $WORK/tmp/mydir
            > go env GOMOD
            [stdout]
            $WORK/tmp/go.mod
            > ! stdout .+
            FAIL: testdata/script/mod_enabled.txt:74: unexpected match for `.+` found in stdout: $WORK/tmp/go.mod

See https://build.golang.org/log/23e87570b42c4b5e8358eef55f19a2015e1d1f91

@rsc

@0intro 0intro added this to the Go1.11 milestone Aug 17, 2018
@0intro 0intro assigned rsc and 0intro Aug 17, 2018
@0intro
Copy link
Member Author

0intro commented Aug 17, 2018

The test is failing because search.InDir doesn't return ".".

This is happening because the os.TempDir function doesn't consider the TMPDIR environment variable on Plan 9, while it's the case on Unix.

@gopherbot
Copy link

Change https://golang.org/cl/129775 mentions this issue: os: handle TMPDIR in TempDir on Plan 9

@golang golang locked and limited conversation to collaborators Aug 17, 2019
@rsc rsc unassigned rsc and 0intro Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants