tests: import the config fuzzing tests#453
Merged
daniloegea merged 1 commit intocanonical:mainfrom Apr 12, 2024
Merged
Conversation
da985df to
89e5dfb
Compare
89e5dfb to
8072e03
Compare
slyon
approved these changes
Apr 10, 2024
Contributor
slyon
left a comment
There was a problem hiding this comment.
Introducing some JavaScript code... But this will only be part of our development workflow and seems manageable and extensible. And it already proofed useful (#450, #451).
LGTM overall, I left some tiny inline comments.
We can (should) always extend/adopt the schema descriptions for future Netplan settings.
I see there are some comments in tests/config_fuzzer/runner.sh, can we maybe have a proper tests/config_fuzzer/README.md to document how to use this, e.g. locally?
Maybe we could also move the schema definitions to tests/config_fuzzer/schema/, to unbloat the primary directory of the fuzzer?
8072e03 to
fedd1d3
Compare
The config_fuzzer will generate random netplan YAML files and use them to test libnetplan. It also adds a new Github workflow to run the tests. This workflow will not block merges if it fails.
fedd1d3 to
fc8d7bc
Compare
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.
This is a project I've been working. It will use json schemas to generate random YAML files. It implements support for most of the interface types and properties support by Netplan. I used JavaScript (note that I don't have much experience with it :P) to use the json-schema-faker project.
The config_fuzzer will generate random netplan YAML files and use them to test libnetplan.
It also adds a new Github workflow to run the tests. If a crash or memory issue is detected, the workflow will fail in the end. It's being executed in this PR.
There is a lot of room for improvement but this is a good start.
Description
Checklist
make checksuccessfully.make check-coverage).