Fuzz testing

I never tried zig fuzzing prior to 0.16. There are some hints in the 0.16 release notes and there are older posts like this which aren’t as helpful any more because of the big changes with the new smith. I’m interested enough that I’d like to get my head wrapped around it and try to write a basic doc. So…

  1. Can anybody point me to more current treatment, beyond the release notes and the code (which are helpful)?
  2. I have a functional basic test setup knocked out, but when I try to build, I get @panic("missing --cache-dir=[path] argument") even if I explicitly indicate --cache-dir (or --global-cache-dir, for that matter).
zig test -ffuzz --cache-dir ./cache src/test_fuzz.zig

This is true for both 0.16 and master.

zig test, when run without -ffuzz, DOES indicate that 1 fuzz tests found (but doesn’t run the fuzz, of course).

For fuzzing you need the builder functionality.
Create a build.zig with a test step and run it like: zig build test --fuzz