[dev.fuzz] cmd/go: skip fuzz tests on unsupported platforms

For now, fuzzing is only supported on Darwin, Linux, and Windows. We
haven't testing shared memory communication between coordinator and
worker processes on other platforms. Currently, fuzz.CoordinateFuzzing
and RunFuzzWorker both panic with "unimplemented" messages.

Unfortunately, these may be masked by runtime.Goexit calls that
override panics, so some builders fail with

    test executed panic(nil) or runtime.Goexit

Change-Id: Ic7bd692461958626dd5c5bb31198aec86387bbd6
Reviewed-on: https://go-review.googlesource.com/c/go/+/290810
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
This commit is contained in:
Jay Conrod 2021-02-09 16:09:30 -05:00
parent 5ef7357b50
commit b60f793850
7 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,6 @@
# TODO(jayconrod): support shared memory on more platforms.
[!darwin] [!linux] [!windows] skip
# Test that calling f.Error in a fuzz target causes a non-zero exit status.
! go test -fuzz=Fuzz -fuzztime=5s -parallel=1 error_fuzz_test.go
! stdout ^ok

View File

@ -1,3 +1,6 @@
# TODO(jayconrod): support shared memory on more platforms.
[!darwin] [!linux] [!windows] skip
[short] skip
env GOCACHE=$WORK/cache

View File

@ -1,3 +1,6 @@
# TODO(jayconrod): support shared memory on more platforms.
[!darwin] [!linux] [!windows] skip
[short] skip
# Run chatty fuzz targets with an error.

View File

@ -1,3 +1,6 @@
# TODO(jayconrod): support shared memory on more platforms.
[!darwin] [!linux] [!windows] skip
[short] skip
# There are no seed values, so 'go test' should finish quickly.

View File

@ -1,3 +1,6 @@
# TODO(jayconrod): support shared memory on more platforms.
[!darwin] [!linux] [!windows] skip
# Matches only fuzz targets to test.
go test standalone_fuzz_test.go
! stdout '^ok.*\[no tests to run\]'

View File

@ -1,3 +1,6 @@
# TODO(jayconrod): support shared memory on more platforms.
[!darwin] [!linux] [!windows] skip
# Tests that a crash caused by a mutator-discovered input writes the bad input
# to testdata, and fails+reports correctly. This tests the end-to-end behavior
# of the mutator finding a crash while fuzzing, adding it as a regression test

View File

@ -1,3 +1,6 @@
# TODO(jayconrod): support shared memory on more platforms.
[!darwin] [!linux] [!windows] skip
# Test basic fuzzing mutator behavior.
#
# fuzz_test.go has two fuzz targets (FuzzA, FuzzB) which both add a seed value.