Commit message:
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.