github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/prog/checksum_test.go (about) 1 // Copyright 2016 syzkaller project authors. All rights reserved. 2 // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 package prog_test 5 6 import ( 7 "testing" 8 9 . "github.com/google/syzkaller/prog" 10 _ "github.com/google/syzkaller/sys" 11 ) 12 13 func TestChecksumCalcRandom(t *testing.T) { 14 target, rs, iters := InitTest(t) 15 ct := target.DefaultChoiceTable() 16 for i := 0; i < iters; i++ { 17 p := target.Generate(rs, 10, ct) 18 for _, call := range p.Calls { 19 CalcChecksumsCall(call) 20 } 21 p.Mutate(rs, 10, ct, nil, nil) 22 for _, call := range p.Calls { 23 CalcChecksumsCall(call) 24 } 25 } 26 }