When running the Catch2 unit tests using CLion on my Macbook Pro M3 Max running MacOS 15.4.1 the following error frequently occurs:
/Users/jeremy.thorp/Git/wiredtiger/test/catch2/sub_level_error/unit/test_sub_level_error_drop_conflict.cpp:100: Failure: due to unexpected exception with message: Error result is 2
in
SECTION("Test WT_CONFLICT_DHANDLE with tiered storage")
The error is caused by a missing dynamically loaded library, libwiredtiger_dir_store.so, that the test depends on. This library may, or may not, be available depending on how WT has been built.
Note, the issue was initially thought to be Mac specific, but this is not the case.
If WT is built using
cmake -DHAVE_UNITTEST=1 -G "Ninja" ./..
then libwiredtiger_dir_store.so will be built on Posix systems (including Linux & Mac), and the Catch2 tests will all pass.
However, CLion optimises the build to build only the binaries required to run the executable (eg Catch2 unit tests) requested. The dependency for libwiredtiger_dir_store.so is missing, and so the library will not be built by default, in which case the test will fail.
The fix is to explicitly add that dependency using CMake's add_dependencies() feature.
- is caused by
-
WT-14026 Set sub-level error code and message with python tests for drop EBUSY workflows (schema and table lock conflict)
-
- Closed
-
- is related to
-
WT-14573 Fix handling of WT Log files by HexFiend and hexdump
-
- Closed
-
-
WT-14568 Compatibility tests fail due to missing stable toolchain file
-
- Closed
-
- related to
-
WT-12800 Remove dead code in reconciliation
-
- Closed
-