-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/cover: Some code are missed by Go coverage profile #59563
Comments
CC @thanm |
Thanks for the report. I will take a look. |
OK, I think I see what's going on here. I will send a fix shortly. What's happening here is a side effect of As a workaround, I recommend picking out just the packages that you are actually interested in and passing those to -coverpkg; doing that won't expose you to this particular problem. |
Change https://go.dev/cl/484535 mentions this issue: |
I see, thanks a lot. |
Change https://go.dev/cl/492175 mentions this issue: |
Fix up the coverage testpoint TestIssue59563TruncatedCoverPkgAll to avoid spurious failures due to racy behavior. Specifically, we are only interested in verifying coverage for the larger function of the two in the test package (the smaller one is only there to trigger additional function registrations while the test is finalizing the cov data). Updates #59867. Updates #59563. Change-Id: Ibfbbcbf68e0ad7a4d9606cbcfc69d140375c7b87 Reviewed-on: https://go-review.googlesource.com/c/go/+/492175 Run-TryBot: Than McIntosh <thanm@google.com> Auto-Submit: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Change https://go.dev/cl/492981 mentions this issue: |
This patch contains a small set of changes with fixes for some issues that surfaced during the code review for CL 484535. Due to an error on my part, these never got included in the final version that was checked in (I rebased, mailed the rebase, but then never mailed the final patch set with the changes). This patch sends the remaining bits and pieces. Updates #59563. Change-Id: I87dc05a83f8e44c8bfe7203bc2b035defc817af9 Reviewed-on: https://go-review.googlesource.com/c/go/+/492981 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. Also, go1.19.8 works fine.
What operating system and processor architecture are you using (
go env
)?darwin, amd64
What did you do?
Run:
What did you expect to see?
The coverage profile marks some covered lines in
yyParse()
.What did you see instead?
Despite
yyParse()
is invoked, it is not covered according to the profile.The text was updated successfully, but these errors were encountered: