Skip to content

testing: enforce the documented restriction on fuzz target result parameters #51222

Closed
@findleyr

Description

@findleyr

The documentation for F.Fuzz states that "ff must be a function with no return value", but in practice this is not enforced. For example, the following invocation is accepted:

func FuzzFoo(f *testing.F) {
	f.Fuzz(func(t *testing.T, i int) int {
		return 0
	})
}

We should enforce the documented restriction. If we don't, users will likely depend on the current behavior. We can always relax this restriction in the future.

Marking as a release blocker as this is an API change.

CC @golang/release @bcmills

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions