aboutsummaryrefslogtreecommitdiffstats
path: root/prog
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-04-01 12:20:19 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-04-01 12:20:19 +0200
commit44fe9159be031342cb956bde7dc3f3fa0340d9af (patch)
tree234a97e0f1c423bbf9c812497b0bad337cbe9060 /prog
parent36b433b718e36d924005b19a1d1525c928171aff (diff)
prog/test: rename prog/fuzz to prog/test
gometalinter complained about fuzz.FuzzFoo names, but go-fuzz now requires all fuzz functions to start with Fuzz. So move the package to prog/test.
Diffstat (limited to 'prog')
-rw-r--r--prog/test/fuzz.go (renamed from prog/fuzz/fuzz.go)6
-rw-r--r--prog/test/fuzz_test.go (renamed from prog/fuzz/fuzz_test.go)6
2 files changed, 6 insertions, 6 deletions
diff --git a/prog/fuzz/fuzz.go b/prog/test/fuzz.go
index 3a9c23359..e86509237 100644
--- a/prog/fuzz/fuzz.go
+++ b/prog/test/fuzz.go
@@ -1,7 +1,7 @@
// 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 fuzz
+package test
import (
"bytes"
@@ -12,7 +12,7 @@ import (
_ "github.com/google/syzkaller/sys/test/gen" // import the target we use for fuzzing
)
-func Deserialize(data []byte) int {
+func FuzzDeserialize(data []byte) int {
p0, err0 := fuzzTarget.Deserialize(data, prog.NonStrict)
p1, err1 := fuzzTarget.Deserialize(data, prog.Strict)
if p0 == nil {
@@ -56,7 +56,7 @@ func Deserialize(data []byte) int {
return 0
}
-func ParseLog(data []byte) int {
+func FuzzParseLog(data []byte) int {
if len(fuzzTarget.ParseLog(data)) != 0 {
return 1
}
diff --git a/prog/fuzz/fuzz_test.go b/prog/test/fuzz_test.go
index 7b1426c7c..22c4066df 100644
--- a/prog/fuzz/fuzz_test.go
+++ b/prog/test/fuzz_test.go
@@ -1,7 +1,7 @@
// 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 fuzz
+package test
import (
"testing"
@@ -24,7 +24,7 @@ mutate8()
`,
} {
t.Logf("test #%v: %q", i, string(data))
- Deserialize([]byte(data))
- ParseLog([]byte(data))
+ FuzzDeserialize([]byte(data))
+ FuzzParseLog([]byte(data))
}
}