avogadrolibs icon indicating copy to clipboard operation
avogadrolibs copied to clipboard

Add fuzz testing for file formats

Open ghutchis opened this issue 1 year ago • 1 comments

The latest seems to be fuzztest: https://github.com/google/fuzztest/blob/main/doc/quickstart-cmake.md https://github.com/google/fuzztest/blob/main/doc/use-cases.md

I'd suggest adding fuzz tests for all the "native" file formats, e.g:

  • cjson
  • cml
  • xyz
  • pdb
  • sdf

Obvious many of the other formats should also get fuzz testing, but that's a good start.

ghutchis avatar Mar 02 '24 23:03 ghutchis

Here's an example of loading files from a corpus: https://github.com/google/fuzztest/blob/main/doc/fuzz-test-macro.md#loading-seed-inputs-from-a-directory

It looks like this requires separate directories for each file type.

ghutchis avatar Mar 03 '24 14:03 ghutchis