Skip to content

Commit 12a6933

Browse files
authored
Merge pull request ceph#56644 from tchaikov/wip-warning-not-fatal
test: do not consider warning from Sanitizer as fatal Reviewed-by: Radoslaw Zarzynski <[email protected]> Reviewed-by: Casey Bodley <[email protected]>
2 parents 2b66455 + fbbb336 commit 12a6933

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/test/ceph_crypto.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,15 @@ void do_simple_crypto() {
270270

271271
#if GTEST_HAS_DEATH_TEST && !defined(_WIN32)
272272
TEST_F(ForkDeathTest, MD5) {
273-
ASSERT_EXIT(do_simple_crypto(), ::testing::ExitedWithCode(0), "^$");
273+
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
274+
// sanitizer warns like:
275+
// ==3798016==Running thread 3797882 was not suspended. False leaks are possible.
276+
// but we should not take it as a fatal error.
277+
const std::string matcher = ".*False leaks are possible.*");
278+
#else
279+
const std::string matcher = "^$";
280+
#endif
281+
ASSERT_EXIT(do_simple_crypto(), ::testing::ExitedWithCode(0), matcher);
274282
}
275283
#endif // GTEST_HAS_DEATH_TEST && !defined(_WIN32)
276284

0 commit comments

Comments
 (0)