From caddc6cbcef9933a4539a06714df006e0c5ac7b2 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 22 Nov 2022 12:03:55 +0100 Subject: pkg/testutil: add RandSource helper The code to send rand source is dublicated in several packages. Move it to testutil package. --- prog/heatmap_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'prog/heatmap_test.go') diff --git a/prog/heatmap_test.go b/prog/heatmap_test.go index cbda3ce43..4103a4f97 100644 --- a/prog/heatmap_test.go +++ b/prog/heatmap_test.go @@ -7,6 +7,8 @@ import ( "math/rand" "sort" "testing" + + "github.com/google/syzkaller/pkg/testutil" ) func TestGenericHeatmap(t *testing.T) { @@ -48,7 +50,7 @@ func TestGenericHeatmap(t *testing.T) { const tries = 10 iters := iterCount() / tries - r := rand.New(randSource(t)) + r := rand.New(testutil.RandSource(t)) for _, test := range testData { data, err := DecodeB64(test.data) if err != nil { -- cgit mrf-deployment