Skip to content

refs #12442 - generate a fuzzing corpus by extracting code from testrunner#7232

Merged
firewave merged 1 commit into
cppcheck-opensource:mainfrom
firewave:testrunner-dump
May 18, 2026
Merged

refs #12442 - generate a fuzzing corpus by extracting code from testrunner#7232
firewave merged 1 commit into
cppcheck-opensource:mainfrom
firewave:testrunner-dump

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

@firewave
Copy link
Copy Markdown
Collaborator Author

I tried to do this via an option. It would be possible to pass this as an internal field via the Settings but it would be problematic to get that into all Settings objects in the tests.

@firewave
Copy link
Copy Markdown
Collaborator Author

The idea is to have a corpus generated from all our test cases which will generate an artifact which can be pulled from the OSS-Fuzz integration to be used. This will give us a broad spectrum of code.

Some of the files are rather big though and I wonder if we should filter those out since they could provide misleading timeouts and too big inputs. But that could also be handled by specify the maximum input size via a fuzzing CLI parameter.

@firewave firewave force-pushed the testrunner-dump branch 6 times, most recently from 1e619f4 to 49fba2a Compare January 17, 2025 17:23
@firewave firewave changed the title generate a fuzzing corpus by extracting code from testrunner refs #12442 - generate a fuzzing corpus by extracting code from testrunner Jan 17, 2025
@firewave firewave force-pushed the testrunner-dump branch from 49fba2a to c8d31df Compare May 5, 2025 10:12
@firewave firewave force-pushed the testrunner-dump branch 2 times, most recently from 8bdab58 to 423ff5b Compare October 21, 2025 07:12
@firewave
Copy link
Copy Markdown
Collaborator Author

If the code relies on additional files (i.e. includes) it would not work as expected. This suggests that we should move tests which require additional files from unit tests to Python.

@firewave firewave force-pushed the testrunner-dump branch 2 times, most recently from 400e22f to ec127c0 Compare January 12, 2026 02:57
@sonarqubecloud
Copy link
Copy Markdown

@firewave firewave force-pushed the testrunner-dump branch 2 times, most recently from c95d650 to 8e98720 Compare May 17, 2026 19:51
@firewave
Copy link
Copy Markdown
Collaborator Author

@firewave firewave marked this pull request as ready for review May 17, 2026 19:51
Comment thread lib/tokenlist.cpp Dismissed
Comment thread lib/tokenlist.cpp

#ifdef STORE_INPUT_DIR
#include <atomic>
#include <fstream>
@firewave firewave merged commit 72547b3 into cppcheck-opensource:main May 18, 2026
70 checks passed
@firewave firewave deleted the testrunner-dump branch May 18, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants