diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-04-13 17:44:01 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-04-13 17:44:45 +0200 |
| commit | 7a67784ca8bdc3b26cce2f0ec9a40d2dd9ec9396 (patch) | |
| tree | c7dd8da465221ae089567170eb435eda8b1262de /pkg/report/report_test.go | |
| parent | b0dfc7a076b65d7d8e25d0d3c02fed32f3c4a3fc (diff) | |
pkg/report: detect hangs in unregister_netdevice
Add special report format for hangs in unregister_netdevice.
And support new format of lockdep reports (otherwise they all
are marked as corrupted).
Diffstat (limited to 'pkg/report/report_test.go')
| -rw-r--r-- | pkg/report/report_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/report/report_test.go b/pkg/report/report_test.go index d2c928c1e..5b196bdda 100644 --- a/pkg/report/report_test.go +++ b/pkg/report/report_test.go @@ -123,10 +123,11 @@ func testParseImpl(t *testing.T, reporter Reporter, test *ParseTest) { if rep != nil && rep.Title == "" { t.Fatalf("found crash, but title is empty") } - title, corrupted := "", false + title, corrupted, corruptedReason := "", false, "" if rep != nil { title = rep.Title corrupted = rep.Corrupted + corruptedReason = rep.corruptedReason } if title != test.Title || corrupted != test.Corrupted { if *flagUpdate && test.StartLine == "" && test.EndLine == "" { @@ -143,8 +144,8 @@ func testParseImpl(t *testing.T, reporter Reporter, test *ParseTest) { t.Logf("failed to update test file: %v", err) } } - t.Fatalf("want:\nTITLE: %s\nCORRUPTED: %v\ngot:\nTITLE: %s\nCORRUPTED: %v\n", - test.Title, test.Corrupted, title, corrupted) + t.Fatalf("want:\nTITLE: %s\nCORRUPTED: %v\ngot:\nTITLE: %s\nCORRUPTED: %v (%v)\n", + test.Title, test.Corrupted, title, corrupted, corruptedReason) } if title != "" && len(rep.Report) == 0 { t.Fatalf("found crash message but report is empty") |
