From acc528cbf40c42eb112d2ce66c5f778bd4a397fb Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 16 Apr 2024 16:35:18 +0200 Subject: tools/syz-linter: check t.Logf/Errorf/Fatalf messages Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf. --- pkg/csource/csource_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/csource/csource_test.go') diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go index 957d2ebc9..8b4d83296 100644 --- a/pkg/csource/csource_test.go +++ b/pkg/csource/csource_test.go @@ -139,7 +139,7 @@ func testOne(t *testing.T, p *prog.Prog, opts Options) { if atomic.AddUint32(&failedTests, 1) > maxFailures { t.Fatal() } - t.Logf("opts: %+v\nprogram:\n%s\n", opts, p.Serialize()) + t.Logf("opts: %+v\nprogram:\n%s", opts, p.Serialize()) t.Fatalf("%v", err) } bin, err := Build(p.Target, src) @@ -147,7 +147,7 @@ func testOne(t *testing.T, p *prog.Prog, opts Options) { if atomic.AddUint32(&failedTests, 1) > maxFailures { t.Fatal() } - t.Logf("opts: %+v\nprogram:\n%s\n", opts, p.Serialize()) + t.Logf("opts: %+v\nprogram:\n%s", opts, p.Serialize()) t.Fatalf("%v", err) } defer os.Remove(bin) -- cgit mrf-deployment