mirror of
https://github.com/coredns/coredns.git
synced 2025-12-10 20:35:10 -05:00
fuzzing: allow setup function to be called (#3175)
This allows to fuzzing of more interesting targets that require setup. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
10
plugin/pkg/fuzz/setup.go
Normal file
10
plugin/pkg/fuzz/setup.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package fuzz
|
||||
|
||||
// SetupFunc can be given to Do to perform a one time setup of the fuzzing
|
||||
// environment. This function is called on every fuzz, it is your
|
||||
// responsibility to make it idempotent. If SetupFunc returns an error, panic
|
||||
// is called with that error.
|
||||
//
|
||||
// There isn't a ShutdownFunc, because fuzzing is supposed to be run for a long
|
||||
// time and there isn't any hook to call it from.
|
||||
type SetupFunc func() error
|
||||
Reference in New Issue
Block a user