Skip to content

Commit

Permalink
internal/crashmonitor: update assertions after CL 561635 revert
Browse files Browse the repository at this point in the history
This CL changes the test expectations to match the runtime
behavior after the revert of CL 561635, which caused the
stack to emit program counters that are valid for CallersFrames.
However, CallersFrames' expectations are... idiosyncratic
and it was considered undesirable to transfer them to
the runtime traceback format.

Unfortunately that means that telemetry for crash reports
will drop inline frames.  Hopefully this is only temporary.

Updates golang/go#65761

Change-Id: I0f8601cbb1328715f357249b91bd21941860bd0e
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/571656
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Michael Matloob <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
  • Loading branch information
Pinkle-pash committed Mar 14, 2024
1 parent 8396298 commit d4710f6
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions internal/crashmonitor/monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ func TestViaStderr(t *testing.T) {
want := "crash/crash\n" +
"runtime.gopanic:--\n" +
"golang.org/x/telemetry/internal/crashmonitor_test.grandchild:=66\n" +
"golang.org/x/telemetry/internal/crashmonitor_test.child:+2\n" +
// TODO(adonovan): CL 561635 to the Go runtime, which causes
// the GOTRACEBACK=system output to be a valid input to CallersFrames,
// was reverted (see #65761), hopefully temporarily.
// For now the output contains missing frames and sometimes wrong
// line numbers.
//
// "golang.org/x/telemetry/internal/crashmonitor_test.child:+2\n" +
"golang.org/x/telemetry/internal/crashmonitor_test.TestMain:+9\n" +
"main.main:--\n" +
"runtime.main:--\n" +
Expand Down Expand Up @@ -147,7 +153,13 @@ func TestStart(t *testing.T) {
want := "crash/crash\n" +
"runtime.gopanic:--\n" +
"golang.org/x/telemetry/internal/crashmonitor_test.grandchild:=66\n" +
"golang.org/x/telemetry/internal/crashmonitor_test.child:+2\n" +
// TODO(adonovan): CL 561635 to the Go runtime, which causes
// the GOTRACEBACK=system output to be a valid input to CallersFrames,
// was reverted (see #65761), hopefully temporarily.
// For now the output contains missing frames and sometimes wrong
// line numbers.
//
//"golang.org/x/telemetry/internal/crashmonitor_test.child:+2\n" +
"golang.org/x/telemetry/internal/crashmonitor_test.TestMain.func3:+1\n" +
"runtime.goexit:--"
if got != want {
Expand Down

0 comments on commit d4710f6

Please sign in to comment.