aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorKatie Hockman <katie@golang.org>2021-09-10 10:00:00 -0400
committerKatie Hockman <katie@golang.org>2021-09-10 15:20:44 +0000
commitb38e853d04ffc00732474e2e90ffad24f5c6a462 (patch)
tree4925ad6845a985f9f29060ab934b507d93f886d5 /src/testing
parent213d9f9a3893eeed1fe1fe5e9e216da33f4d75c4 (diff)
downloadgo-b38e853d04ffc00732474e2e90ffad24f5c6a462.tar.xz
[dev.fuzz] testing: move corpus from testdata/corpus to testdata/fuzz
Fixes golang/go#48128 Change-Id: I04deb17226ff5d5dfcbe408fe089f400d4d3836f Reviewed-on: https://go-review.googlesource.com/c/go/+/349053 Trust: Katie Hockman <katie@golang.org> Run-TryBot: Katie Hockman <katie@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/fuzz.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testing/fuzz.go b/src/testing/fuzz.go
index e567f7d9f4..975aa87eab 100644
--- a/src/testing/fuzz.go
+++ b/src/testing/fuzz.go
@@ -34,7 +34,7 @@ var (
// corpusDir is the parent directory of the target's seed corpus within
// the package.
- corpusDir = "testdata/corpus"
+ corpusDir = "testdata/fuzz"
)
// fuzzWorkerExitCode is used as an exit code by fuzz worker processes after an internal error.
@@ -419,7 +419,7 @@ func (f *F) Fuzz(ff interface{}) {
fmt.Fprintf(f.w, "%v\n", err)
if crashErr, ok := err.(fuzzCrashError); ok {
crashName := crashErr.CrashName()
- fmt.Fprintf(f.w, "Crash written to %s\n", filepath.Join("testdata/corpus", f.name, crashName))
+ fmt.Fprintf(f.w, "Crash written to %s\n", filepath.Join(corpusDir, f.name, crashName))
fmt.Fprintf(f.w, "To re-run:\ngo test %s -run=%s/%s\n", f.fuzzContext.importPath(), f.name, crashName)
}
}