If the releases
directory exists, but still only a subset of the necessary previous release binaries are available, the test fails by throwing an exception (sometimes leading to follow-up exceptions like AssertionError: [node 0] Error: no RPC connection
) and printing out a stack trace, which can be confusing and at a first glance suggests that the node crashed or some alike.
Improve this by checking and printing out all of the missing release binaries and failing with an explicit error in this case. Also add an info on how to download previous releases binaries. Noticed while testing #30328.
Can be tested by e.g.
0$ rm -rf ./releases
1$ ./test/get_previous_releases.py -b
2$ rm -rf ./releases/v28.0/
3$ ./build/test/functional/wallet_migration.py
master:
0...
12024-12-10T18:48:54.067000Z TestFramework (ERROR): Assertion failed
2Traceback (most recent call last):
3 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 590, in start_nodes
4 node.start(extra_args[i], *args, **kwargs)
5 File "/home/thestack/bitcoin/test/functional/test_framework/test_node.py", line 257, in start
6 self.process = subprocess.Popen(self.args + extra_args, env=subp_env, stdout=stdout, stderr=stderr, cwd=cwd, **kwargs)
7 File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
8 self._execute_child(args, executable, preexec_fn, close_fds,
9 File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
10 raise child_exception_type(errno_num, err_msg, err_filename)
11FileNotFoundError: [Errno 2] No such file or directory: '/home/thestack/bitcoin/releases/v28.0/bin/bitcoind'
12
13During handling of the above exception, another exception occurred:
14
15Traceback (most recent call last):
16 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 131, in main
17 self.setup()
18 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 315, in setup
19 self.setup_network()
20 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 409, in setup_network
21 self.setup_nodes()
22 File "/home/thestack/bitcoin/./build/test/functional/wallet_migration.py", line 54, in setup_nodes
23 self.start_nodes()
24 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 595, in start_nodes
25 self.stop_nodes()
26 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 610, in stop_nodes
27 node.stop_node(wait=wait, wait_until_stopped=False)
28 File "/home/thestack/bitcoin/test/functional/test_framework/test_node.py", line 396, in stop_node
29 self.stop(wait=wait)
30 File "/home/thestack/bitcoin/test/functional/test_framework/test_node.py", line 215, in __getattr__
31 assert self.rpc_connected and self.rpc is not None, self._node_msg("Error: no RPC connection")
32AssertionError: [node 0] Error: no RPC connection
332024-12-10T18:48:54.118000Z TestFramework (INFO): Stopping nodes
34Traceback (most recent call last):
35 File "/home/thestack/bitcoin/./build/test/functional/wallet_migration.py", line 1097, in <module>
36 WalletMigrationTest(__file__).main()
37 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 159, in main
38 exit_code = self.shutdown()
39 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 331, in shutdown
40 self.stop_nodes()
41 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 610, in stop_nodes
42 node.stop_node(wait=wait, wait_until_stopped=False)
43 File "/home/thestack/bitcoin/test/functional/test_framework/test_node.py", line 396, in stop_node
44 self.stop(wait=wait)
45 File "/home/thestack/bitcoin/test/functional/test_framework/test_node.py", line 215, in __getattr__
46 assert self.rpc_connected and self.rpc is not None, self._node_msg("Error: no RPC connection")
47AssertionError: [node 0] Error: no RPC connection
48[node 0] Cleaning up leftover process
49...
PR:
0...
12025-01-01T20:26:27.999000Z TestFramework (INFO): PRNG seed is: 4570383538468804512
22025-01-01T20:26:28.000000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_lz66_zcu
32025-01-01T20:26:28.003000Z TestFramework (ERROR): Binary not found: /home/thestack/bitcoin/releases/v28.0/bin/bitcoind
42025-01-01T20:26:28.003000Z TestFramework (ERROR): Binary not found: /home/thestack/bitcoin/releases/v28.0/bin/bitcoin-cli
52025-01-01T20:26:28.003000Z TestFramework (INFO): Previous releases binaries can be downloaded via `test/get_previous_releases.py -b`.
62025-01-01T20:26:28.003000Z TestFramework (ERROR): Assertion failed
7Traceback (most recent call last):
8 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 131, in main
9 self.setup()
10 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 315, in setup
11 self.setup_network()
12 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 409, in setup_network
13 self.setup_nodes()
14 File "/home/thestack/bitcoin/./build/test/functional/wallet_migration.py", line 50, in setup_nodes
15 self.add_nodes(self.num_nodes, versions=[
16 File "/home/thestack/bitcoin/test/functional/test_framework/test_framework.py", line 537, in add_nodes
17 raise AssertionError("At least one release binary is missing")
18AssertionError: At least one release binary is missing
192025-01-01T20:26:28.061000Z TestFramework (INFO): Stopping nodes
20...