]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/ceph_assert: fix death test timeout with threadsafe style 67085/head
authorKefu Chai <k.chai@proxmox.com>
Tue, 27 Jan 2026 08:34:09 +0000 (16:34 +0800)
committerKefu Chai <k.chai@proxmox.com>
Tue, 27 Jan 2026 08:37:19 +0000 (16:37 +0800)
commit357a56bb1869599c7e4430cd2c5d9ab98e8e6309
tree68322825ec05731d8317955fe36192d135ffb3dc
parent9c1a6fe13f87fb1516c7e22b4ad13bc46010ddfc
test/ceph_assert: fix death test timeout with threadsafe style

The unittest_ceph_assert test was timing out intermittently with warning:
```
"Death tests use fork(), which is unsafe particularly in a threaded
context. For this test, Google Test detected 3 threads."
```
The issue occurs because global_init() creates threads before the death
tests run. Use the "threadsafe" death test style to handle this safely,
matching the pattern already used in ceph_breakpad.cc and
test_perf_counters_cache.cc.

see also https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/test/ceph_assert.cc