Skip to content

Improve the coverage of the memory leak tests #365

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

Merged
merged 4 commits into from
Jun 8, 2023

Conversation

daniloegea
Copy link
Contributor

Description

Now the run_asan.sh script will call the generator twice for each yaml file, once with renderer=networkd and again with renderer=NetworkManager.

When the renderer is set to NetworkManager, it will also call a new tool (keyfile_to_yaml.c) to load the keyfile.

Also, plug two memory leaks :)

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

Danilo Egea Gondolfo added 4 commits May 30, 2023 12:12
component->bond will be set twice if the parser processes the interface
in a second pass.
component1->peer and component2->peer will be set twice if the parser
processes the interface in a second pass.
It will be mainly used to help catching memory leaks.
The script was changed to run the test with both networkd and
NetworkManager renderers (when possible).
For the NetworkManager keyfiles generated in the second step, it will
call the new tool to load it.

It will improve the coverage of the memory leak tests.
@daniloegea daniloegea force-pushed the check_keyfile_load_leaks branch from e2ea01e to 2965626 Compare May 30, 2023 13:59
Copy link
Contributor

@schopin-pro schopin-pro left a comment

Choose a reason for hiding this comment

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

I like it :)

Good call on using the system netplan to change the renderer!

@schopin-pro schopin-pro merged commit f25df3f into canonical:main Jun 8, 2023
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