diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-04-01 12:20:19 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-04-01 12:20:19 +0200 |
| commit | 44fe9159be031342cb956bde7dc3f3fa0340d9af (patch) | |
| tree | 234a97e0f1c423bbf9c812497b0bad337cbe9060 | |
| parent | 36b433b718e36d924005b19a1d1525c928171aff (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.
| -rw-r--r-- | fuzz.yaml | 12 | ||||
| -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 |
3 files changed, 12 insertions, 12 deletions
@@ -18,13 +18,13 @@ targets: function: Fuzz package: github.com/google/syzkaller/tools/syz-trace2syz/proggen build_tags: syz_target syz_os_linux syz_arch_amd64 - - name: prog.Deserialize + - name: prog-Deserialize harness: - function: Deserialize - package: github.com/google/syzkaller/prog/fuzz + function: FuzzDeserialize + package: github.com/google/syzkaller/prog/test build_tags: syz_target,syz_os_test,syz_arch_64 - - name: prog.ParseLog + - name: prog-ParseLog harness: - function: ParseLog - package: github.com/google/syzkaller/prog/fuzz + function: FuzzParseLog + package: github.com/google/syzkaller/prog/test build_tags: syz_target,syz_os_test,syz_arch_64 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)) } } |
