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. --- prog/collide_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'prog/collide_test.go') diff --git a/prog/collide_test.go b/prog/collide_test.go index 0e29777a7..54ac156ab 100644 --- a/prog/collide_test.go +++ b/prog/collide_test.go @@ -73,7 +73,7 @@ r4 = dup(r3) for i := 0; i < iters; i++ { collided := AssignRandomAsync(p, r) if !test.check(collided) { - t.Fatalf("bad async assignment:\n%s\n", collided.Serialize()) + t.Fatalf("bad async assignment:\n%s", collided.Serialize()) } for _, call := range collided.Calls { anyAsync = anyAsync || call.Props.Async @@ -143,7 +143,7 @@ dup(r3) } serialized := string(woProps.Serialize()) if serialized != test.duplicated { - t.Fatalf("expected:%s\ngot:%s\n", test.duplicated, serialized) + t.Fatalf("expected:%s\ngot:%s", test.duplicated, serialized) } } // TODO: also test the `async` assignment. -- cgit mrf-deployment