ASTC decoding part 4: Fuzz testing#49
Draft
Erik-White wants to merge 14 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
The fourth part of ASTC (Adaptive scalable texture compression) decoding. ASTC is used with KTX containers to compress texture data.
This adds a fuzz testing harness to ImageSharp.Textures. It currently only contains ASTC related tests, but could easily be extended with others in future. It can either be run with a pre-determined seed, or with directed fuzzing via libfuzzer.
This is very much an optional part of the ASTC implementation. I have found fuzz testing useful in the other projects, but I will leave it up to you if whether you think it is suitable here. (Un)forunately I didn't actually find any bugs via these tests, but hopefully that indicates that the ASTC decoder is already very solid!
Prerequisites
Test data
Everything used is either created by myself, or sourced from
https://github.com/KhronosGroup/KTX-Software (Apache 2.0 license)
https://github.com/KhronosGroup/KTX-Software-CTS (Apache 2.0 license)
https://github.com/ARM-software/astc-encoder (Apache-2.0 license)