From 29b0fd90e6ac720fb21cc98ae89acfa6704b35bc Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 29 Nov 2017 17:53:07 +0100 Subject: pkg/report: include Maintainers into report Currently getting a complete report requires a complex, multi-step dance (including getting information that external users are not interested in -- guilty file). Simplify interface down to 2 functions: Parse and Symbolize. Parse does what it did before, Symbolize symbolizes report and fills in maintainers. This simplifies both implementations of Reporter interface and all users of the interface. Potentially we could get this down to 1 function Parse that does everything. However, (1) Symbolize can fail, while Parse cannot, (2) usually we want to ignore (log) Symbolize errors, but otherwise proceed with the report, (3) repro does not need symbolization for all but the last report. --- pkg/report/linux_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/report/linux_test.go') diff --git a/pkg/report/linux_test.go b/pkg/report/linux_test.go index 38786b087..9dfbdb640 100644 --- a/pkg/report/linux_test.go +++ b/pkg/report/linux_test.go @@ -2910,8 +2910,9 @@ Call Trace: if err != nil { t.Fatal(err) } + linux := reporter.(*linux) for report, guilty0 := range tests { - if guilty := reporter.ExtractGuiltyFile([]byte(report)); guilty != guilty0 { + if guilty := linux.extractGuiltyFile([]byte(report)); guilty != guilty0 { t.Logf("log:\n%s", report) t.Logf("want guilty:\n%s", guilty0) t.Logf("got guilty:\n%s", guilty) -- cgit mrf-deployment