]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] testing: report T.Deadline when running seed values
authorJay Conrod <jayconrod@google.com>
Wed, 23 Jun 2021 23:23:37 +0000 (16:23 -0700)
committerJay Conrod <jayconrod@google.com>
Thu, 24 Jun 2021 17:45:48 +0000 (17:45 +0000)
commitcc04ab463dd6c86ad8d22bbadba4d325fffa2131
tree676f7f2a85804950dca1ff0865bae6a43e05e89c
parentdf99a270b36fe9f0b8bd43ba05e305fa738d2de6
[dev.fuzz] testing: report T.Deadline when running seed values

T.Deadline should return the test deadline, set with -timeout. When
fuzz targets are run with seed values as unit tests, either with or
without -fuzz, T.Deadline should work inside the fuzz function.

There is no deadline when fuzzing, even if -fuzztime is set, since
workers may have much shorter deadlines, and fuzz function behavior
shouldn't be time-dependent anyway.

Fixes #46220

Change-Id: I84aaeb9d7bfdc12bdcb6f1ab3fe67b3067ad2dfe
Reviewed-on: https://go-review.googlesource.com/c/go/+/330509
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_deadline.txt [new file with mode: 0644]
src/testing/fuzz.go
src/testing/testing.go