aboutsummaryrefslogtreecommitdiffstats
path: root/prog/test/fuzz_test.go
blob: f01905ea3515900aedaec1c28459367c735cfbdf (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
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2019 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 test

import (
	"testing"
)

func TestFuzz(t *testing.T) {
	for i, data := range []string{
		`test$length10(&200000000000009`,
		`test$str0(&(0x7f0000000000)='\xz+')`,
		`syz_compare(&AUTO=""/81546506777")`,
		`syz_compare(&AUTO=""/190734863281259)`,
		`syz_compare(&AUTO=""/500000)`,
		`test$vma0(&(0x7f0000000000)=0)`,
		`test$vma0(&(0x7f0000000000)=')`,
		`test$length10(&(0x7f0000009000),AUTO)`,
		`syz_compare(&AUTO=""/2712404)
mutate4()
mutate7()
mutate8()
`,
		`E`,
		`
test$str0(&(0x7f0000ffffd5)=ANY=[0])
test$res2()
test$res2()
test$res2()
test$res2()
`,
	} {
		t.Logf("test #%v: %q", i, data)
		inp := []byte(data)[:len(data):len(data)]
		FuzzDeserialize(inp)
		FuzzParseLog(inp)
	}
}