Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Fix config loading defaults and error handling#9

Merged
il-steffen merged 1 commit intoIntelLabs:masterfrom
il-steffen:config_defaults
Oct 14, 2022
Merged

Fix config loading defaults and error handling#9
il-steffen merged 1 commit intoIntelLabs:masterfrom
il-steffen:config_defaults

Conversation

@il-steffen
Copy link
Copy Markdown
Contributor

  • System default is actually at kafl_fuzzer/config_default.yaml
  • Setting KAFL_CONFIG_FILE is now optional to override system default
  • Fix order to let CWD/kafl.yaml override KAFL_CONFIG_FILE
  • Catch + handle when failing to load $CWD/kafl.yaml or KAFL_CONFIG_FILE
  • Clarify changes in config_default.yaml

@il-steffen
Copy link
Copy Markdown
Contributor Author

Note: We abort if KAFL_CONFIG_FILE is set but the file fails to load. Since kafl.yaml does not exist anymore we need to update env.sh to either unset KAFL_CONFIG_FILE or point to a new/empty/duplicate default config?

Copy link
Copy Markdown
Contributor

@Wenzel Wenzel left a comment

Choose a reason for hiding this comment

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

I made a few comments to improve the code quality.
Overall, I think switching to dynaconf is a better choice and would make our life easier to handle kAFL.fuzzer configuration.

- System default is actually at kafl_fuzzer/config_default.yaml
  Setting KAFL_CONFIG_FILE is now optional to override the system default

- Fix loading order to let CWD/kafl.yaml override KAFL_CONFIG_FILE
  Complain + abort when $CWD/kafl.yaml or KAFL_CONFIG_FILE are set but not loading
  Document changes in config_default.yaml
@il-steffen
Copy link
Copy Markdown
Contributor Author

Rebase with fixed up logging.exceptions() and logging.debug() handlers...

@il-steffen il-steffen requested a review from Wenzel October 14, 2022 13:54
@il-steffen il-steffen merged commit 8cb8219 into IntelLabs:master Oct 14, 2022
@il-steffen il-steffen deleted the config_defaults branch October 30, 2022 00:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants