Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/toml params for fuzzer #106

Merged
merged 9 commits into from
Nov 8, 2023
Merged

Feat/toml params for fuzzer #106

merged 9 commits into from
Nov 8, 2023

Conversation

lukacan
Copy link
Collaborator

@lukacan lukacan commented Oct 13, 2023

Instead of using the HFUZZ_RUN_ARGS environment variable all the time, this feature allows us to pass the HFUZZ_RUN_ARGS flags within the Trdelnik.toml file. It also supports precedence from the command line interface (CLI), so if we specify a timeout within the Toml file as 500 seconds, it can still be overwritten by CLI input like HFUZZ_RUN_ARGS='-t 33'. Furthermore, it also supports merging from the CLI, so if the CLI's HFUZZ_RUN_ARGS contains flags that are not supported within the configuration file, they will simply be merged.

@lukacan lukacan requested a review from Ikrk October 13, 2023 10:50
crates/client/src/commander.rs Outdated Show resolved Hide resolved
crates/cli/src/command/fuzz.rs Outdated Show resolved Hide resolved
crates/client/src/config.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Ikrk Ikrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will probably work but it could be simplified and more readable.

crates/client/src/config.rs Outdated Show resolved Hide resolved
crates/client/src/config.rs Outdated Show resolved Hide resolved
crates/client/src/config.rs Outdated Show resolved Hide resolved
crates/client/src/config.rs Outdated Show resolved Hide resolved
crates/client/src/config.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Ikrk Ikrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is much better than before :-) I think it may still be slightly improved...

crates/client/src/config.rs Outdated Show resolved Hide resolved
crates/client/src/config.rs Outdated Show resolved Hide resolved
@Ikrk Ikrk merged commit 1201161 into develop Nov 8, 2023
7 checks passed
lukacan added a commit that referenced this pull request May 20, 2024
* 🚧 arguments to hongfuzz within trdelnik toml

* 🚧 Working on merge with CLI and give precedence

* 🚧 Removed lazy static for config, modified precedence from cli and added logic for merge (may be changed)

* ✅ added tests for config merge/precedence with cli, updated template and small changes in order to work with other command

* 🐛 moved config

* 🐛 fixed review + added tests for short flag without space

* ♻️ Removed parse from CLI as later has precedence, renamed structs and modified tests

* 🔥 unused extern crate

* 🧑‍💻 Simplified vec to string loop and improved function name

---------

Co-authored-by: lukacan <[email protected]>
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.

2 participants