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

Added sanitizer testing for swss-common unit test. #561

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mint570
Copy link
Contributor

@mint570 mint570 commented Nov 16, 2021

swss-common: Added sanitizer testing for swss-common unit test.

Signed-off-by: Runming Wu [email protected]

@mint570
Copy link
Contributor Author

mint570 commented Nov 16, 2021

@qiluo-msft
This is inspired by the review in #556. Adding sanitizer testing could help in catching certain bugs like memory leak.
This pr is independent from PINS. It does not block the PINS prs.
Please take a look when you have time. Thanks.

@@ -10,6 +10,9 @@ endif

CFLAGS_GTEST =
LDADD_GTEST = -L/usr/src/gtest -lgtest -lgtest_main
CFLAGS_ASAN = -fsanitize=address -static-libasan
CFLAGS_TSAN = -fsanitize=thread
CFLAGS_USAN = -fsanitize=undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not combine them together? Even further, just integrate all the options to the original tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't seem to work if I combine them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you share the error message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Address sanitizer cannot combine with thread sanitizer: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
(Check "-fsanitize=address" or "-fsanitize=thread".)

@mint570
Copy link
Contributor Author

mint570 commented Dec 2, 2021

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 561 in repo Azure/sonic-swss-common

@mint570
Copy link
Contributor Author

mint570 commented Dec 2, 2021

@qiluo-msft
Looks like I don't have permission to restart the test.
I am not sure why the test got stuck.

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