-
Notifications
You must be signed in to change notification settings - Fork 18.1k
cmd/go: fix coverage overlay #73824
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
base: master
Are you sure you want to change the base?
cmd/go: fix coverage overlay #73824
Conversation
This PR (HEAD: b27071c) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/675435. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/675435. |
Message from Lokesh Kumar: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/675435. |
This PR (HEAD: 090372e) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/675435. Important tips:
|
This PR (HEAD: 7717182) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/675435. Important tips:
|
cmd/go: fix coverage with -overlay and -coverpkg
The issue occurred when using both -overlay and -coverpkg flags together.
The coverage tool was being called with original file paths instead of
the overlaid file paths, causing incorrect coverage instrumentation.
The fix modifies the cover method in cmd/go/internal/work/exec.go to:
actual file paths from the overlay filesystem
Test has been added to verify this behavior. The test:
Fixes #73802