test: three more cargo-fuzz targets + test-fuzz-long recipe

- command_roundtrip: structure-aware (via arbitrary crate) Command
  encode → parse → equal. Symmetric to cobs_roundtrip.
- cobs_decoder_multi_frame: chunked feeding with arbitrary split sizes;
  asserts bounded payload and that command count never exceeds sentinel
  count.
- cobs_chunk_invariant: same stream through two decoders (chunked vs
  all-at-once) must produce the same command sequence.

Adds test-fuzz-long recipe (600s per target, ~1h 10m total) for CI
cron / pre-release. All seven targets smoke-tested at 100k runs each
with zero findings.
This commit is contained in:
swaits committed 2026-04-13 12:12:12 -06:00
1 parent adbad81e19
commit ef576ba1ec
5 files changed
+274

No files matched your search

+13
View File
@@ -44,6 +44,19 @@ test-fuzz:
cd fuzz && cargo +nightly fuzz run parse_radio_config -- -max_total_time=60
cd fuzz && cargo +nightly fuzz run cobs_decoder_feed -- -max_total_time=60
cd fuzz && cargo +nightly fuzz run cobs_roundtrip -- -max_total_time=60
cd fuzz && cargo +nightly fuzz run command_roundtrip -- -max_total_time=60
cd fuzz && cargo +nightly fuzz run cobs_decoder_multi_frame -- -max_total_time=60
cd fuzz && cargo +nightly fuzz run cobs_chunk_invariant -- -max_total_time=60
# long fuzz run: 10 minutes per target. Use for CI cron / pre-release.
test-fuzz-long:
cd fuzz && cargo +nightly fuzz run parse_command -- -max_total_time=600
cd fuzz && cargo +nightly fuzz run parse_radio_config -- -max_total_time=600
cd fuzz && cargo +nightly fuzz run cobs_decoder_feed -- -max_total_time=600
cd fuzz && cargo +nightly fuzz run cobs_roundtrip -- -max_total_time=600
cd fuzz && cargo +nightly fuzz run command_roundtrip -- -max_total_time=600
cd fuzz && cargo +nightly fuzz run cobs_decoder_multi_frame -- -max_total_time=600
cd fuzz && cargo +nightly fuzz run cobs_chunk_invariant -- -max_total_time=600
# run tests under miri (catches UB, requires nightly + miri component)
# The proptest suite is skipped — its file-persistence layer calls getcwd