aboutsummaryrefslogtreecommitdiffstats
path: root/prog/checksum_test.go
blob: abed9803cd7b74bddd9ff7ade9d876dc89d9e1f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2016 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

package prog_test

import (
	"testing"

	. "github.com/google/syzkaller/prog"
	_ "github.com/google/syzkaller/sys"
)

func TestChecksumCalcRandom(t *testing.T) {
	target, rs, iters := InitTest(t)
	ct := target.DefaultChoiceTable()
	for i := 0; i < iters; i++ {
		p := target.Generate(rs, 10, ct)
		for _, call := range p.Calls {
			CalcChecksumsCall(call)
		}
		p.Mutate(rs, 10, ct, nil, nil)
		for _, call := range p.Calls {
			CalcChecksumsCall(call)
		}
	}
}