rustworkx icon indicating copy to clipboard operation
rustworkx copied to clipboard

Adding fuzz targets for special graphs

Open Krishn1412 opened this issue 8 months ago • 3 comments

Added Fuzz targets for heavy-hex graph and lollipop graph to test their robustness for various inputs.

Krishn1412 avatar Apr 11 '25 14:04 Krishn1412

Pull Request Test Coverage Report for Build 14405272801

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.84%

Totals Coverage Status
Change from base Build 14391902387: 0.0%
Covered Lines: 18637
Relevant Lines: 19446

💛 - Coveralls

coveralls avatar Apr 11 '25 14:04 coveralls

I will review #1430 later, but my opinion for fuzzing is:

  • we shoud fuzz random generators to verify assumptions about random graphs
  • we should not fuzz deterministic graph generators

In short, anything that takes a seed is a good candidate for fuzzing and everything that does not take a seed... well, we should let it pass.

It is mostly because the input space is smaller. We could write a for loop that creates all the lollipop graphs smaller than 512. Fuzzing doesn't hurt, but I think a more traditional test would have place here.

The same is not as true for randomizes functions as fuzzing could, in fact, lead to a different input that we generally would not be able to find.

IvanIsCoding avatar Apr 11 '25 23:04 IvanIsCoding

Okay I understand. I was just trying to fit in fuzzing somehow for the special graphs. I'll move ahead with the random generators.

Krishn1412 avatar Apr 14 '25 11:04 Krishn1412