]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] testing: use exit status 70 for worker errors (not crashes)
authorJay Conrod <jayconrod@google.com>
Fri, 26 Feb 2021 17:50:48 +0000 (12:50 -0500)
committerJay Conrod <jayconrod@google.com>
Tue, 9 Mar 2021 18:36:46 +0000 (18:36 +0000)
commitac58614190c9dd1ca0a1a47bf7a29a4a7c501e72
treefba4ceef7d79f462cff4c75c1faa55c8065cd12d
parentf251d1fbb69156627379df28a150343c08a29474
[dev.fuzz] testing: use exit status 70 for worker errors (not crashes)

If a worker process encounters an error communicating with the
coordinator, or if the setup code reports an error with F.Fail
before calling F.Fuzz, exit with status 70. The coordinator will report
these errors and 'go test' will exit non-zero, but the coordinator
won't record a crasher since the problem is not in the code being
fuzzed.

The coordinator also detects unexpected terminations before the worker
calls F.Fuzz by sending a ping RPC. If the worker terminates before
responding to the ping RPC, the coordinator won't record a crasher.

Exit codes are chosen somewhat arbitrary, but in the Advanced Bash
Scripting Guide, 70 is "internal software error" which is applicable
here. 70 is also ASCII 'F'.

Change-Id: I1e676e39a7b07c5664efaaa3221d055f55240fff
Reviewed-on: https://go-review.googlesource.com/c/go/+/297033
Trust: Jay Conrod <jayconrod@google.com>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
src/cmd/go/testdata/script/test_fuzz_mutate_fail.txt [new file with mode: 0644]
src/internal/fuzz/worker.go
src/testing/fuzz.go
src/testing/testing.go