]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
test/common/test_back_trace: skip one more frame when testing w/ ASan
authorKefu Chai <tchaikov@gmail.com>
Sat, 4 May 2024 03:28:14 +0000 (11:28 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sat, 4 May 2024 03:31:30 +0000 (11:31 +0800)
commit2f44b3468b21000a4c57458abe9cb639e6581bcc
tree82bab8e04c8145759cc7313f0b599dd0cac1e69d
parent04416f48efe02891b265c07b4f38b46e422bbef9
test/common/test_back_trace: skip one more frame when testing w/ ASan

if ASan is enabled, backtrace() returns one more frame, so we need
to skip one more frame when testing backtrace facility. this change
addresses the following test failure:

```
[ RUN      ] BackTrace.Basic
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/common/test_back_trace.cc:43: Failure
Value of: std::regex_match(lines[lineno], e)
  Actual: false
Expected: true
[  FAILED  ] BackTrace.Basic (5 ms)
```

it only manifests itself when testing with ASan enabled.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/test/common/test_back_trace.cc