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: script_test.go:156: FAIL: testdata/script/mod_install_versioned.txt:10: stdout v2: unexpected success #67989

Open
fx-moon opened this issue Jun 14, 2024 · 3 comments
Labels
GoCommand cmd/go help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@fx-moon
Copy link

fx-moon commented Jun 14, 2024

Go version

go version go1.22.2 darwin/amd64

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/***/Library/Caches/go-build'
GOENV='/Users/***/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/***/go/pkg/mod'
GOOS='darwin'
GOPATH='/Users/***/go'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.22.2'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/z7/n0tv2cg9297f48jkh47lmf840000gq/T/go-build912150125=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

cd src
./all.bash

What did you see happen?

vcs-test.golang.org rerouted to http://127.0.0.1:53553
https://vcs-test.golang.org rerouted to https://127.0.0.1:53554
go test proxy running at GOPROXY=http://127.0.0.1:53555/mod
--- FAIL: TestScript (3.58s)
--- FAIL: TestScript/mod_install_versioned (0.92s)
script_test.go:132: 2024-06-13T09:56:38Z
script_test.go:134: $WORK=/var/folders/z7/n0tv2cg9297f48jkh47lmf840000gq/T/cmd-go-test-2433300649/tmpdir1468200491/mod_install_versioned731445043
script_test.go:156:
> env GO111MODULE=on
> go get rsc.io/fortune
[stderr]
go: downloading rsc.io/fortune v1.0.0
go: downloading rsc.io/quote v1.5.2
go: downloading rsc.io/sampler v1.3.0
go: downloading golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
go: added golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
go: added rsc.io/fortune v1.0.0
go: added rsc.io/quote v1.5.2
go: added rsc.io/sampler v1.3.0
> go list -f '{{.Target}}' rsc.io/fortune
[stdout]
/var/folders/z7/n0tv2cg9297f48jkh47lmf840000gq/T/cmd-go-test-2433300649/tmpdir1468200491/mod_install_versioned731445043/gopath/bin/fortune
> ! stdout fortune@v1
> stdout 'fortune(.exe)?$'
matched: /var/folders/z7/n0tv2cg9297f48jkh47lmf840000gq/T/cmd-go-test-2433300649/tmpdir1468200491/mod_install_versioned731445043/gopath/bin/fortune
> go get rsc.io/fortune/v2
[stderr]
go: downloading rsc.io/fortune/v2 v2.0.0
go: added rsc.io/fortune/v2 v2.0.0
> go list -f '{{.Target}}' rsc.io/fortune/v2
[stdout]
/var/folders/z7/n0tv2cg9297f48jkh47lmf840000gq/T/cmd-go-test-2433300649/tmpdir1468200491/mod_install_versioned731445043/gopath/bin/fortune
> ! stdout v2
matched: /var/folders/z7/n0tv2cg9297f48jkh47lmf840000gq/T/cmd-go-test-2433300649/tmpdir1468200491/mod_install_versioned731445043/gopath/bin/fortune
script_test.go:156: FAIL: testdata/script/mod_install_versioned.txt:10: stdout v2: unexpected success
FAIL
FAIL cmd/go 490.379s

What did you expect to see?

ok
seems my path contains a "v2" in -ffile-prefix-map and script matched in ! stdout v2

@dr2chase
Copy link
Contributor

So not exactly a bug, but TestScript could tidy up its environment a little better?

@joedian joedian added GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jun 25, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/621315 mentions this issue: cmd/go/testdata/script: restrict test to check only exe name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants