dpp icon indicating copy to clipboard operation
dpp copied to clipboard

Add tests from Rust bindgen

Open Laeeth opened this issue 5 years ago • 2 comments

To start with you could just check dpp doesn't choke on their headers, linked here:

https://github.com/rust-lang/rust-bindgen

Someday we can check the D declaration is right but it's not urgent.

They have a cool fuzzer here:

https://github.com/rust-lang/rust-bindgen/blob/master/tests/quickchecking/src/fuzzers.rs

Laeeth avatar Jan 10 '19 04:01 Laeeth

Note that it's just rust code that generates random headers. So we could use directly just by creating relevant dpp file in a bash script.

bindgen with quickchecking quickchecking generates random C headers to test bindgen using the quickcheck property testing crate. When testing bindgen with quickchecking, the generated header files are passed to bindgen's csmith-fuzzing/predicate.py script. If that script fails, quickchecking panics, and you can report an issue containing the test case!

Prerequisites Running Prerequisites

Laeeth avatar Jan 10 '19 04:01 Laeeth

Also they have a driver for csmith. https://github.com/rust-lang/rust-bindgen/blob/master/csmith-fuzzing/README.md

Laeeth avatar Jan 10 '19 04:01 Laeeth