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: -x output with test -cover contains wrong path for some files under cwd #23982

Closed
motemen opened this issue Feb 21, 2018 · 1 comment
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@motemen
Copy link
Contributor

motemen commented Feb 21, 2018

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

go version devel +16c5d30c84 2018-02-21 02:07:46 +0000 darwin/amd64

Does this issue reproduce with the latest release?

Yes (with the latest release go version go1.10 darwin/amd64)

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/motemen/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/motemen/dev/go:/Users/motemen/dev"
GORACE=""
GOROOT="/Users/motemen/dev/src/github.com/golang/go"
GOTMPDIR=""
GOTOOLDIR="/Users/motemen/dev/src/github.com/golang/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/zf/x09xcy657yxdlzdwvn627ht00000gn/T/go-build400924322=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

go test -cover -x log

What did you expect to see?

WORK=/var/folders/zf/x09xcy657yxdlzdwvn627ht00000gn/T/go-build383668462
mkdir -p $WORK/b001/
mkdir -p $WORK/b046/
cd $WORK/b046/
/Users/motemen/dev/src/github.com/golang/go/pkg/tool/darwin_amd64/cover -mode set -var GoCover_0_383336666631383465376234 -o ./log.cover.go /Users/motemen/dev/src/github.com/golang/go/src/log/log.go
[snip]

What did you see instead?

WORK=/var/folders/zf/x09xcy657yxdlzdwvn627ht00000gn/T/go-build383668462
mkdir -p $WORK/b001/
mkdir -p $WORK/b046/
cd $WORK/b046/
/Users/motemen/dev/src/github.com/golang/go/pkg/tool/darwin_amd64/cover -mode set -var GoCover_0_383336666631383465376234 -o .log.cover.go /Users/motemen/dev/src/github.com/golang/go/src/log/log.go
[snip]

The cover -mode set line contains .log.cover.go, which should be ./log.cover.go.

@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 21, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone Feb 21, 2018
@gopherbot
Copy link

Change https://golang.org/cl/95755 mentions this issue: cmd/go: fix formatting of file paths under cwd

@golang golang locked and limited conversation to collaborators Feb 26, 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.
Projects
None yet
Development

No branches or pull requests

3 participants