Skip to content

Improve the coverage of the memory leak tests#365

Merged
schopin-pro merged 4 commits intocanonical:mainfrom
daniloegea:check_keyfile_load_leaks
Jun 8, 2023
Merged

Improve the coverage of the memory leak tests#365
schopin-pro merged 4 commits intocanonical:mainfrom
daniloegea:check_keyfile_load_leaks

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