From 7a67784ca8bdc3b26cce2f0ec9a40d2dd9ec9396 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 13 Apr 2018 17:44:01 +0200 Subject: 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). --- pkg/report/report_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pkg/report/report_test.go') 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") -- cgit mrf-deployment