- 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.
73 lines
1.3 KiB
TOML
73 lines
1.3 KiB
TOML
[package]
|
|
name = "donglora-protocol-fuzz"
|
|
version = "0.0.0"
|
|
edition = "2024"
|
|
publish = false
|
|
|
|
[package.metadata]
|
|
cargo-fuzz = true
|
|
|
|
[dependencies]
|
|
libfuzzer-sys = "0.4"
|
|
arbitrary = { version = "1", features = ["derive"] }
|
|
heapless = "0.9"
|
|
ucobs = "0.3"
|
|
|
|
[dependencies.donglora-protocol]
|
|
path = ".."
|
|
default-features = false
|
|
features = ["std"]
|
|
|
|
# Prevent this from being picked up by a workspace scan of the parent repo.
|
|
[workspace]
|
|
members = ["."]
|
|
|
|
[[bin]]
|
|
name = "parse_command"
|
|
path = "fuzz_targets/parse_command.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "parse_radio_config"
|
|
path = "fuzz_targets/parse_radio_config.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "cobs_decoder_feed"
|
|
path = "fuzz_targets/cobs_decoder_feed.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "cobs_roundtrip"
|
|
path = "fuzz_targets/cobs_roundtrip.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "command_roundtrip"
|
|
path = "fuzz_targets/command_roundtrip.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "cobs_decoder_multi_frame"
|
|
path = "fuzz_targets/cobs_decoder_multi_frame.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "cobs_chunk_invariant"
|
|
path = "fuzz_targets/cobs_chunk_invariant.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|