Skip to content

cmd/go: adding -cover to "go test -n" can cause spurious failures #67952

Closed
@thanm

Description

@thanm

On tip, invoking "go test -n -cover ./..." on a collection of packages that include at least one package with code but no tests can result in a spurious errors. Example:

$ cd `go env GOROOT`
$ cd src/internal/coverage
$ go test -n -cover ./...
...
internal/coverage/uleb128: open $WORK/b112/covmeta.b07a5f2dff1231cae3a6bdd70c8cc7c19da16abf8ac59747d8e9859c03594d37: no such file or directory
$ echo $?
1
$

This obviously shouldn't be happening for a "-n" test run (works fine without -cover).

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions