Skip to content

Windows cross-build: unit test system_tests/run_command fails and functional tests cannot start bitcoind #34150

@DevPatel-11

Description

@DevPatel-11

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

Following doc/build-windows.md using WSL + MinGW on Windows, build + install succeed and the GUI runs, but tests fail:

  1. The unit test system_tests/run_command in test_bitcoin.exe fails with an assertion on the expected error message.
  2. Functional tests (wallet_basic.py and --coverage) fail to start bitcoind with Assertion failed: base.is_absolute(), file ./util/fs.cpp, line 36.

So, building and running the GUI works, but the documented unit and functional tests do not pass on this configuration.

Expected behaviour

After a successful cross-build using doc/build-windows.md, the enabled unit tests (test_bitcoin) and basic functional tests (like wallet_basic.py and --coverage) should run and pass on this supported WSL + MinGW configuration, in line with src/test/README.md and test/functional/README.md.

Steps to reproduce

All commands are run inside WSL (Ubuntu). The source tree is not under /mnt/c, but under the WSL filesystem.

  1. Clone and enter the repo:
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin
  1. Build depends (per doc/build-windows.md):
gmake -C depends HOST=x86_64-w64-mingw32
  1. Configure and build (per doc/build-windows.md):
cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
cmake --build build
  1. Install to Windows (bitcoind/bitcoin-qt work fine from here):
cmake --install build --prefix /mnt/c/workspace/bitcoin
  1. Build unit tests:
cmake --build build --target test_bitcoin
  1. Run the specific unit test:
cd ~/bitcoin/build/bin
./test_bitcoin.exe --run_test=system_tests/run_command --log_level=test_suite
  1. Run a functional test and coverage (from repo root):
cd ~/bitcoin
build/test/functional/test_runner.py wallet_basic.py
build/test/functional/test_runner.py --coverage

Relevant log output

Unit test failure:

cd ~/bitcoin/build/bin
./test_bitcoin.exe --run_test=system_tests/run_command --log_level=test_suite

Output (trimmed):

Entering test module "Bitcoin Core Test Suite"
./wallet/test/walletload_tests.cpp(14): Test suite "walletload_tests" is skipped because disabled
... (many test suites skipped because disabled) ...
./test/testnet4_miner_tests.cpp(30): Test suite "testnet4_miner_tests" is skipped because disabled
./test/system_tests.cpp(17): Entering test suite "system_tests"
./test/system_tests.cpp(21): Entering test case "run_command"
./test/system_tests.cpp(56): error: in "system_tests/run_command": check what.find(tfm::format("RunCommandParseJSON error: process(%s) returned 1: \n", command)) != std::string::npos has failed
./test/system_tests.cpp(21): Leaving test case "run_command"; testing time: 196716us
./test/system_tests.cpp(17): Leaving test suite "system_tests"; testing time: 199262us
./test/system_ram_tests.cpp(13): Test suite "system_ram_tests" is skipped because disabled
... (more suites skipped) ...
Leaving test module "Bitcoin Core Test Suite"; testing time: 433839us

*** 1 failure is detected in the test module "Bitcoin Core Test Suite"

Functional test failure (wallet_basic.py):

cd ~/bitcoin
build/test/functional/test_runner.py wallet_basic.py

Output:

Temporary test directory at /tmp/test_runner_₿_🏃_20251225_162435
Remaining jobs: [wallet_basic.py]
1/1 - wallet_basic.py failed, Duration: 57 s

stdout:
2025-12-25T16:24:35.518658Z TestFramework (INFO): PRNG seed is: 6050933089769083783
2025-12-25T16:24:35.520147Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20251225_162435/wallet_basic_0
2025-12-25T16:25:32.647545Z TestFramework (ERROR): Unexpected exception
Traceback (most recent call last):
  File "/home/kelos/bitcoin/test/functional/test_framework/test_framework.py", line 138, in main
    self.setup()
  File "/home/kelos/bitcoin/test/functional/test_framework/test_framework.py", line 269, in setup
    self.setup_network()
  File "/home/kelos/bitcoin/build/test/functional/wallet_basic.py", line 44, in setup_network
    self.setup_nodes()
  File "/home/kelos/bitcoin/test/functional/test_framework/test_framework.py", line 382, in setup_nodes
    self.start_nodes()
  File "/home/kelos/bitcoin/test/functional/test_framework/test_framework.py", line 528, in start_nodes
    node.wait_for_rpc_connection()
  File "/home/kelos/bitcoin/test/functional/test_framework/test_node.py", line 316, in wait_for_rpc_connection
    raise FailedToStartError(self._node_msg(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 3 during initialization. Assertion failed: base.is_absolute(), file ./util/fs.cpp, line 36
************************

2025-12-25T16:25:32.699370Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
2025-12-25T16:25:32.699638Z TestFramework (WARNING): Not cleaning up dir /tmp/test_runner_₿_🏃_20251225_162435/wallet_basic_0
2025-12-25T16:25:32.699739Z TestFramework (ERROR): Test failed. Test logging available at /tmp/test_runner_₿_🏃_20251225_162435/wallet_basic_0/test_framework.log
2025-12-25T16:25:32.699905Z TestFramework (ERROR):
2025-12-25T16:25:32.700105Z TestFramework (ERROR): Hint: Call /home/kelos/bitcoin/test/functional/combine_logs.py '/tmp/test_runner_₿_🏃_20251225_162435/wallet_basic_0' to consolidate all logs
2025-12-25T16:25:32.700184Z TestFramework (ERROR):
2025-12-25T16:25:32.700424Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2025-12-25T16:25:32.700571Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
2025-12-25T16:25:32.700677Z TestFramework (ERROR):

stderr:
[node 3] Cleaning up leftover process
[node 2] Cleaning up leftover process
[node 1] Cleaning up leftover process
[node 0] Cleaning up leftover process

TEST            | STATUS    | DURATION
wallet_basic.py | ✖ Failed  | 57 s

ALL             | ✖ Failed  | 57 s (accumulated)
Runtime: 57 s

Functional test failure with --coverage:

cd ~/bitcoin
build/test/functional/test_runner.py --coverage

Output:

Temporary test directory at /tmp/test_runner_₿_🏃_20251225_162532
Initializing coverage directory at /tmp/coveragemf6gv9tr
[node 0] Cleaning up leftover process
2025-12-25T16:25:32.916746Z TestFramework (INFO): PRNG seed is: 332623413216244638
2025-12-25T16:25:32.917531Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20251225_162532/cache
2025-12-25T16:25:35.676350Z TestFramework (ERROR): Unexpected exception
Traceback (most recent call last):
  File "/home/kelos/bitcoin/test/functional/test_framework/test_framework.py", line 138, in main
    self.setup()
  File "/home/kelos/bitcoin/test/functional/test_framework/test_framework.py", line 268, in setup
    self.setup_chain()
  File "/home/kelos/bitcoin/test/functional/test_framework/test_framework.py", line 356, in setup_chain
    self._initialize_chain()
  File "/home/kelos/bitcoin/test/functional/test_framework/test_framework.py", line 814, in _initialize_chain
    self.start_node(CACHE_NODE_ID)
  File "/home/kelos/bitcoin/test/functional/test_framework/test_framework.py", line 514, in start_node
    node.wait_for_rpc_connection()
  File "/home/kelos/bitcoin/test/functional/test_node.py", line 316, in wait_for_rpc_connection
    raise FailedToStartError(self._node_msg(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 3 during initialization. Assertion failed: base.is_absolute(), file ./util/fs.cpp, line 36
************************

2025-12-25T16:25:35.729866Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
2025-12-25T16:25:35.730219Z TestFramework (WARNING): Not cleaning up dir /tmp/test_runner_₿_🏃_20251225_162532/cache
2025-12-25T16:25:35.730333Z TestFramework (ERROR): Test failed. Test logging available at /tmp/test_runner_₿_🏃_20251225_162532/cache/test_framework.log
2025-12-25T16:25:35.730631Z TestFramework (ERROR):
2025-12-25T16:25:35.730888Z TestFramework (ERROR): Hint: Call /home/kelos/bitcoin/test/functional/combine_logs.py '/tmp/test_runner_₿_🏃_20251225_162532/cache' to consolidate all logs
2025-12-25T16:25:35.731025Z TestFramework (ERROR):
2025-12-25T16:25:35.731110Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2025-12-25T16:25:35.731245Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
2025-12-25T16:25:35.731393Z TestFramework (ERROR):

Traceback (most recent call last):
  File "/home/kelos/bitcoin/build/test/functional/test_runner.py", line 931, in <module>
    main()
  File "/home/kelos/bitcoin/build/test/functional/test_runner.py", line 542, in main
    run_tests(
  File "/home/kelos/bitcoin/build/test/functional/test_runner.py", line 595, in run_tests
    subprocess.check_output([sys.executable, tests_dir + 'create_cache.py'] + flags + ["--tmpdir=%s/cache" % tmpdir])
  File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/home/kelos/bitcoin/build/test/functional/create_cache.py', '--cachedir=/home/kelos/bitcoin/build/test/cache', '--configfile=/home/kelos/bitcoin/build/test/functional/../config.ini', '--coveragedir=/tmp/coveragemf6gv9tr', '--tmpdir=/tmp/test_runner_₿_🏃_20251225_162532/cache']' returned non-zero exit status 1.

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

master@d861c3820528fad2e17a455949bec70b6ba434dcc

Operating system and version

Windows 10.0.26200.7462 (host), WSL2 with Ubuntu; wsl.exe --version: - WSL version: 2.6.2.0 - Kernel version: 6.6.87.2-1 - WSLg version: 1.0.71 - MSRDC version: 1.2.6353 - Direct3D version: 1.611.1-81528511 - DXCore version: 10.0.26100.1-240331-1435.ge-release

Machine specifications

CPU:

  • 12th Gen Intel Core i5-12500H (x86_64)
  • 8 cores / 16 threads (lscpu)
  • L3 cache: 18 MiB

Memory:

  • 16 GiB RAM total
  • ~11 GiB free, 4 GiB swap (free -h)

Disk:

  • Host C: drive 454 GiB total, 219 GiB free (df -h, /mnt/c)
  • WSL root filesystem on /dev/sdd: 1.0 TiB total, 946 GiB free

Distro inside WSL:

  • Ubuntu 24.04.3 LTS (noble) (lsb_release -a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions