You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. go test -coverprofile=c.out os
2. go tool cover -func=c.out | grep sigpipe
What is the expected output?
os/file_posix.go: sigpipe 0.0%
...
total: (statements) 65.6% (393/599)
What do you see instead?
os/file_posix.go: sigpipe 0.0%
...
total: (statements) 65.5% (393/600)
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
GNU/Linux
Which version are you using? (run 'go version')
go version go1.2 linux/amd64
Please provide any additional information below.
I came across this while comparing the output of go tool cover and gocov, finding a
discrepancy in totals. I modified funcOutput in go.tools/cmd/cover/func.go to also print
the raw function coverage counts as well as percentages; in this way, I confirmed that
sigpipe had 0/1 lines covered, and was contributing to the total.
The text was updated successfully, but these errors were encountered:
rsc
changed the title
x/tools/cmd/cover: spurious 0/1 coverage entry for forward-declared functions
cmd/cover: spurious 0/1 coverage entry for forward-declared functions
Nov 10, 2017
The text was updated successfully, but these errors were encountered: