kustomize-controller/tests/fuzz
Paulo Gomes 73f005e541
fuzz: Refactor Fuzzers based on Go native fuzzing
The existing fuzzers are converted into the Go native format. This
works well with most fuzzers, apart from the one that fuzzes the
controller.

That specific test depends on funcs and vars that are defined on
suite_test.go, which is not supported when building fuzzers leveraging
Go native fuzz for oss-fuzz. That test is therefore ignored when
executed with make fuzz-native. But, all tests are covered with
make fuzz-smoketest, in order to support oss-fuzz.

Once the controller is rewritten we can revist this and ensure that
fuzzers does not require envtest nor embedded CRDs.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-07 12:26:43 +01:00
..
Dockerfile.builder Refactor fuzzing 2022-01-14 15:38:24 +00:00
README.md Refactor fuzzing 2022-01-14 15:38:24 +00:00
native_go_run.sh fuzz: Refactor Fuzzers based on Go native fuzzing 2022-09-07 12:26:43 +01:00
oss_fuzz_build.sh fuzz: Refactor Fuzzers based on Go native fuzzing 2022-09-07 12:26:43 +01:00
oss_fuzz_run.sh Refactor fuzzing 2022-01-14 15:38:24 +00:00

README.md

fuzz testing

Flux is part of Google's oss fuzz program which provides continuous fuzzing for open source projects.

The long running fuzzing execution is configured in the oss-fuzz repository. Shorter executions are done on a per-PR basis, configured as a github workflow.

For fuzzers to be called, they must be compiled within oss_fuzz_build.sh.

Testing locally

Build fuzzers:

make fuzz-build

All fuzzers will be built into ./build/fuzz/out.

Smoke test fuzzers:

make fuzz-smoketest

The smoke test runs each fuzzer once to ensure they are fully functional.

Run fuzzer locally:

./build/fuzz/out/fuzz_conditions_match

Run fuzzer inside a container:

	docker run --rm -ti \
		-v "$(pwd)/build/fuzz/out":/out \
		gcr.io/oss-fuzz/fluxcd \
		/out/fuzz_conditions_match