Skip to content

Commit a1e2716

Browse files
committed
Merge bitcoin/bitcoin#36045: test: avoid undersized Boost.Test signal stacks
9eba3aa test: avoid undersized Boost.Test signal stacks (Lőrinc) Pull request description: **Problem:** Boost.Test can fail while an Alpine CI test binary is starting, before any tests run. The required signal stack size depends on the runner's CPU features, while musl provides a fixed size. **Fix:** Use the [regular process stack](https://www.boost.org/doc/libs/latest/libs/test/doc/html/boost_test/utf_reference/link_references/config_disable_alt_stack.html) for Boost.Test signal handling in both unit-test binaries. Fixes #36026 ACKs for top commit: maflcko: lgtm ACK 9eba3aa Tree-SHA512: 177a31ab325f4ebce0ad7e4679b171cd5a28787595bf0e117fc66731b8bf9157c4f5bef74cc6bb7651021bafb616fe5e9a25709abf30b7689d10ddd0fbd484cb
2 parents 7dcb7f0 + 9eba3aa commit a1e2716

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/test/kernel/test_kernel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#include <util/byte_units.h>
88
#include <util/fs.h>
99

10+
// Boost.Test's SIGSTKSZ alternate stack can be smaller than Linux requires on musl.
11+
#define BOOST_TEST_DISABLE_ALT_STACK
1012
#define BOOST_TEST_MODULE Bitcoin Kernel Test Suite
1113
#include <boost/test/included/unit_test.hpp>
1214

src/test/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
/**
66
* See https://www.boost.org/doc/libs/1_78_0/libs/test/doc/html/boost_test/adv_scenarios/single_header_customizations/multiple_translation_units.html
77
*/
8+
// Boost.Test's SIGSTKSZ alternate stack can be smaller than Linux requires on musl.
9+
#define BOOST_TEST_DISABLE_ALT_STACK
810
#define BOOST_TEST_MODULE Bitcoin Core Test Suite
911

1012
#include <boost/test/included/unit_test.hpp>

0 commit comments

Comments
 (0)