From 1d632d8438f2698e5cda7b2aa0c6d64849d76b16 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Thu, 11 Jul 2024 13:15:17 +0300 Subject: [PATCH] pkg: use t.Logf instead of fmt.Printf in tests --- pkg/dwarf/line/line_parser_test.go | 3 +-- pkg/proc/proc_test.go | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/dwarf/line/line_parser_test.go b/pkg/dwarf/line/line_parser_test.go index 8c36464c34..cc5955a0b0 100644 --- a/pkg/dwarf/line/line_parser_test.go +++ b/pkg/dwarf/line/line_parser_test.go @@ -6,7 +6,6 @@ import ( "debug/macho" "debug/pe" "flag" - "fmt" "io" "os" "os/exec" @@ -272,7 +271,7 @@ func runTestPCToLine(t testing.TB, lineInfos DebugLines, entries []pctolineEntry file, line := lineInfos[0].PCToLine(basePC, pc) if pc == entries[i].pc { if i%samples == 0 && log { - fmt.Printf("match %x / %x (%v)\n", pc, entries[len(entries)-1].pc, time.Since(t0)/samples) + t.Logf("match %x / %x (%v)\n", pc, entries[len(entries)-1].pc, time.Since(t0)/samples) t0 = time.Now() } diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go index b17e6b0621..eff99e1b2c 100644 --- a/pkg/proc/proc_test.go +++ b/pkg/proc/proc_test.go @@ -594,7 +594,6 @@ func testseq2intl(t *testing.T, fixture protest.Fixture, grp *proc.TargetGroup, fnname = fn.Name } t.Logf("at %#x (%s) %s:%d", pc, fnname, f, ln) - //fmt.Printf("at %#x %s:%d\n", pc, f, ln) } switch pos := tc.pos.(type) { case int: