-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/test2json: go test -bench -json -count output is inconsistent #66825
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
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
cc @aclements |
Let me piggy-back on this issue as it nicely shows another problem. I can also create a separate one, if that's preferred. The problem is that there is a This |
pohly
added a commit
to pohly/kubernetes
that referenced
this issue
Nov 8, 2024
Because Go emits a "run" event for a benchmark, but no "passed" (golang/go#66825 (comment)), gotestsum treats the benchmark as failed (gotestyourself/gotestsum#413 (comment) -2172063128) because the events for the test are incomplete. Discussions on how to handle this in gotestsum haven't led to a conclusion and drag on. In the meantime, scheduler_perf jobs keep being treated as failed because of this. By identifying the false positives and removing them, prune-junit-xml can solve the situation for us.
pohly
added a commit
to pohly/kubernetes
that referenced
this issue
Nov 18, 2024
Because Go emits a "run" event for a benchmark, but no "passed" (golang/go#66825 (comment)), gotestsum treats the benchmark as failed (gotestyourself/gotestsum#413 (comment) -2172063128) because the events for the test are incomplete. Discussions on how to handle this in gotestsum haven't led to a conclusion and drag on. In the meantime, scheduler_perf jobs keep being treated as failed because of this. By identifying the false positives and removing them, prune-junit-xml can solve the situation for us.
pohly
added a commit
to pohly/kubernetes
that referenced
this issue
Nov 18, 2024
Because Go does not a "pass" action for benchmarks (golang/go#66825 (comment)), gotestsum reports a successful benchmark run as failed (gotestyourself/gotestsum#413 (comment)). We can work around that in each benchmark and sub-benchmark by emitting the output line that `go test` expects on stdout from the test binary for success.
kennethk-1201
pushed a commit
to kennethk-1201/kubernetes
that referenced
this issue
Jan 2, 2025
Because Go does not a "pass" action for benchmarks (golang/go#66825 (comment)), gotestsum reports a successful benchmark run as failed (gotestyourself/gotestsum#413 (comment)). We can work around that in each benchmark and sub-benchmark by emitting the output line that `go test` expects on stdout from the test binary for success.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Go version
go version go1.22.2 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
Note how the first timing output line has the Test field, and the second one doesn't.
What did you expect to see?
Either both output events having the Test field set (which is what makes more sense to me and would make it easier to extract the data I am looking for, since without Test field I have to manually filter out metadata and result option lines), or neither (which curiously is what
go doc test2json
claims).The text was updated successfully, but these errors were encountered: