Commit fbbb336
committed
test: do not consider warning from Sanitizer as fatal
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 <[email protected]>1 parent a2e5d82 commit fbbb336
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
274 | 282 | | |
275 | 283 | | |
276 | 284 | | |
| |||
0 commit comments