- Notifications
You must be signed in to change notification settings - Fork4
Add test for file variations#31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fintelia commentedNov 26, 2025
This sounds like it is implementing fuzzing. To quote the readme:
|
RunDevelopment commentedNov 26, 2025
Kinda? It qualifies as fuzzing in the sense that it uses (mostly) invalid inputs. My understanding was that fuzzing isn't a priority to minimize maintenance burden. Random fuzzing can find crashes whenever, making the workload unpredictable. Worse, it's likely on the maintainer to triage and fix those crashes once discovered. But those downsides don't really apply here. The mutations done here are deterministic. So if we start in a valid state (as we are now), they'll only find crashes when something changes. E.g. the implementation changes, new test files get added, dependencies get updated. And since changes are introduced via PRs, it should be on the PR author to fix the crashes they introduced or uncovered. |
I added a test that mutates the image files we already have and checks that decoders do not panic for them. Current mutations include:
imagetests for too.This would have found a panic in OBT that was fixed by#28.
Unfortunately, this test is currently a lot slower than it has to be because
imageonly supports using plugins when reading files. This forces the test to write the modified files to disk for every mutation that we want to test. Writing to disk makes the test a lot slower than it has to be, but it's not too bad. It only takes 2 sec on my machine.I madeimage-rs/image#2662 to address this API oversight. But even if a solution gets added, we probably won't be able to use the solution right away due to version compatibility.