Structure the fuzz implementation to be closer to what go native will support. Add Makefile target to enable smoketesting fuzzers. Add smoketest as CI workflow. Signed-off-by: Paulo Gomes <paulo.gomes@weave.works> |
||
---|---|---|
.. | ||
Dockerfile.builder | ||
README.md | ||
fuzz_controllers.go | ||
go.mod | ||
oss_fuzz_build.sh | ||
oss_fuzz_run.sh |
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