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

Enable unit test run with valgrind #2540

Merged
merged 12 commits into from Aug 7, 2020

Conversation

olgavrou
Copy link
Collaborator

@olgavrou olgavrou commented Aug 6, 2020

This PR

  • adds a script to run the unit tests with valgrind in the CI
  • resolves various erros that valgrind was reporting when running the unit tests

@@ -73,6 +75,14 @@ BOOST_AUTO_TEST_CASE(vw_dll_parsed_and_constructed_example_parity)

BOOST_AUTO_TEST_CASE(vw_dll_parse_escaped)
{
for (size_t i = 0; i < framework::master_test_suite().argc; i++)
Copy link
Member

Choose a reason for hiding this comment

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

What's the reason we have to skip it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This specific test explicitly throws and valgrind reports memory blocks lost from the std::set<std::string> m_defined_options set (defined in options_boost_po.h) which I can only account to aborting with an exception causing destructors not being called rather than an actual memory leak

Copy link
Member

Choose a reason for hiding this comment

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

Seems odd that boost test doesn't let the destructors run though. Oh well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Discussed offline, this is actually due to the fact the the options_i pointer created when the vw object is initialized leaks since the test throws on initialize and options is not cleaned up. Will leave as-is for now and look into making the options_i options pointer a unique_ptr

@olgavrou
Copy link
Collaborator Author

olgavrou commented Aug 7, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@olgavrou olgavrou merged commit 6c84a4a into VowpalWabbit:master Aug 7, 2020
lalo pushed a commit to lalo/vowpal_wabbit that referenced this pull request Aug 12, 2020
olgavrou added a commit to Sharad24/vowpal_wabbit that referenced this pull request Nov 12, 2020
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.

None yet

3 participants