| commit | 5be28d7074430e24ae185929d0bc13d7bb1137ad | [log] [tgz] |
|---|---|---|
| author | Michael Stapelberg <stapelberg@golang.org> | Wed Oct 22 16:39:19 2025 +0200 |
| committer | Michael Stapelberg <stapelberg@golang.org> | Wed Oct 22 07:57:35 2025 -0700 |
| tree | 95e991e19f2d45b423a6a2005d00b9873f8f8bd7 | |
| parent | 24f779f6aaefe5b1b01156fda6403f9abfb19fe1 [diff] |
internal/crashmonitor: fix TestViaStderr/trap
I believe there’s a mistake in commit 06ef541f:
What used to be:
if got != want {
t.Errorf("got counter name <<%s>>, want <<%s>>", got, want)
}
became the following in TestViaStderr/panic:
if !wantRE.MatchString(got) {
t.Errorf("got counter name <<%s>>, want match for <<%s>>", got, wantRE)
}
…but the condition was negated in TestViaStderr/trap:
if wantRE.MatchString(got) {
t.Errorf("got counter name <<%s>>, want match for <<%s>>", got, wantRE)
}
This only went unnoticed because the crash stack line numbers are incorrect.
I noticed this when importing the x/telemetry package into google3,
where the package names are different and need an update.
Change-Id: I6327d174d09d0073c1e18e46618e0fd35e6b4e0c
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/713780
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This repository holds the Go Telemetry server code and libraries, used for hosting telemetry.go.dev and instrumenting Go toolchain programs with opt-in telemetry.
Warning: this repository is intended for use only in tools maintained by the Go team, including tools in the Go distribution and auxiliary tools like gopls or govulncheck. There are no compatibility guarantees for any of the packages here: public APIs will change in breaking ways as the telemetry integration is refined.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/telemetry.
The main issue tracker for the telemetry repository is located at https://go.dev/issues. Prefix your issue with “x/telemetry:” in the subject line, so it is easy to find.
This repository uses eslint to format TS files, stylelint to format CSS files, and prettier to format TS, CSS, Markdown, and YAML files.
See the style guides:
It is encouraged that all TS and CSS code be run through formatters before submitting a change. However, it is not a strict requirement enforced by CI.
./npm install./npm run all