test: do not consider warning from Sanitizer as fatal#56644
Merged
test: do not consider warning from Sanitizer as fatal#56644
Conversation
with sanitizer enabled, unittest_ceph_crypto fails like ``` [ RUN ] ForkDeathTest.MD5 [WARNING] /home/jenkins-build/build/workspace/ceph-pull-requests/src/googletest/googletest/src/gtest-death-test.cc:1121:: Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test detected 3 threads. See https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#death-tests-and-threads for more explanation and suggested solutions, especially if this is the last message you see before your test times out. /home/jenkins-build/build/workspace/ceph-pull-requests/src/test/ceph_crypto.cc:273: Failure Death test: do_simple_crypto() Result: died but not with expected error. Expected: contains regular expression "^$" Actual msg: [ DEATH ] ==3798016==Running thread 3797882 was not suspended. False leaks are possible. [ DEATH ] ==3798016==Running thread 3797885 was not suspended. False leaks are possible. [ DEATH ] [ FAILED ] ForkDeathTest.MD5 (119 ms) ``` but this error message should not considered as an indication of fatal error. so, in this change, instead of matching the output with a regex of "^$", we use a matcher to match with the error message if sanitizer is enabled. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
56316e6 to
fbbb336
Compare
Contributor
Author
|
@rzarzynski hi Radek, could you please help review this change? it helps to get us closer to an ASan-clean |
Contributor
Author
|
@cbodley hi Casey, seems Radek does not have enough bandwidth looking at this, do you mind taking a look? i tested it locally. |
Contributor
|
Hi Kefu! Sorry, I missed the notification last week :-/. Looking. |
rzarzynski
approved these changes
Apr 18, 2024
| // sanitizer warns like: | ||
| // ==3798016==Running thread 3797882 was not suspended. False leaks are possible. | ||
| // but we should not take it as a fatal error. | ||
| const std::string matcher = ".*False leaks are possible.*"); |
Contributor
|
LGTM. As this change is restricted solely to the unit test, I doubt we need full QA – passing Anyway, let's give @cbodley some time to take a look as well. |
Contributor
Author
|
@rzarzynski hi Radek, thank you for your review and approval! |
cbodley
approved these changes
Apr 23, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
with sanitizer enabled, unittest_ceph_crypto fails like
but this error message should not considered as an indication of fatal error. so, in this change, instead of matching the output with a regex of "^$", we use a matcher to match with the error message if sanitizer is enabled.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e