commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.6k stars 534 forks source link

spec_tests.py: Add option to generate fuzz corpus #467

Closed nwellnhof closed 1 year ago

nwellnhof commented 1 year ago

Add an option --fuzz-corpus that writes the test cases to separate files including the options header, so they can be used as seed corpus for fuzz testing.

nwellnhof commented 1 year ago

My plan is to use our own spec tests as seed corpus for OSS-Fuzz instead of an external test suite: https://github.com/google/oss-fuzz/blob/master/projects/cmark/build.sh

jgm commented 1 year ago

Good idea.

nwellnhof commented 1 year ago

Thanks! Here's the pull request for OSS-Fuzz: https://github.com/google/oss-fuzz/pull/9564