Skip to content

Add property based testing with quickcheck #970

Closed
@fitzgen

Description

@fitzgen

https://github.com/BurntSushi/quickcheck

Another kind of fuzzing of sorts. We should use quickcheck to generate struct definitions and whitelisting/opaque/etc rules, generate a header containing those definitions in C source form, run bindgen on the header, and then assert various properties about the resulting bindings.

Ideas of properties to assert:

  • bindgen doesn't panic
  • the resulting bindings compile
  • the resulting bindings layout tests pass
  • whitelisted types appear in the bindings

All of these rely on generating valid C headers, not just garbage, which is a little bit of work, but seems do-able.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions