midi2-dev / bl-midi2-rs

Ergonomic, versatile, strong types wrapping MIDI 2.0 message data.
https://crates.io/crates/midi2
Apache License 2.0
18 stars 2 forks source link

Fuzz Testing #8

Open BenLeadbetter opened 1 month ago

BenLeadbetter commented 1 month ago

the midi2 crate is a really good candidate for a fuzz testing round. Especially while in this early alpha phase, where many of the message wrappers are potentially quite unstable.

Sysex wrappers and also dynamically sized wrappers are particularly in need of some thorough testing. Such tests might simply create a mutable message, write in a payload of randomised bytes of random length copy the data into a buffer and then ensure that the message can be recreated from that buffer again, to complete the full round trip.

More Resources

BenLeadbetter commented 1 month ago

I've implemented a couple of simple roundtrip fuzz test targets for the sysex message types. This is good but we could do with some more.