test: functional test failures under --usecli #32264

issue fanquake openend this issue on April 14, 2025
  1. fanquake commented at 9:36 am on April 14, 2025: member

    Ubuntu 24.04.2 LTS Python 3.12.3 master @ 817edfb21e4fa96289d69d4e1dbabb6b9ef9d8f5

    0cmake -B build
    1cmake --build build
    2./build/test/functional/test_runner.py --usecli
    
     0feature_assumeutxo.py                                                | ✖ Failed  | 11 s
     1feature_bip68_sequence.py                                            | ✖ Failed  | 58 s
     2feature_fastprune.py                                                 | ✖ Failed  | 1 s
     3feature_fee_estimation.py                                            | ✖ Failed  | 1 s
     4feature_nulldummy.py                                                 | ✖ Failed  | 1 s
     5feature_reindex_readonly.py                                          | ✖ Failed  | 0 s
     6feature_signet.py                                                    | ✖ Failed  | 1 s
     7feature_taproot.py                                                   | ✖ Failed  | 6 s
     8mempool_package_rbf.py                                               | ✖ Failed  | 22 s
     9mining_mainnet.py                                                    | ✖ Failed  | 1 s
    10p2p_net_deadlock.py --v1transport                                    | ✖ Failed  | 1 s
    11p2p_net_deadlock.py --v2transport                                    | ✖ Failed  | 1 s
    12p2p_tx_download.py                                                   | ✖ Failed  | 34 s
    13rpc_deprecated.py                                                    | ✖ Failed  | 1 s
    14rpc_estimatefee.py                                                   | ✖ Failed  | 1 s
    15rpc_generate.py                                                      | ✖ Failed  | 1 s
    16rpc_getblockfrompeer.py                                              | ✖ Failed  | 1 s
    17rpc_getdescriptorinfo.py                                             | ✖ Failed  | 1 s
    18rpc_invalid_address_message.py                                       | ✖ Failed  | 2 s
    19rpc_packages.py                                                      | ✖ Failed  | 5 s
    20rpc_scanblocks.py                                                    | ✖ Failed  | 1 s
    21rpc_scantxoutset.py                                                  | ✖ Failed  | 5 s
    22rpc_whitelist.py                                                     | ✖ Failed  | 1 s
    23wallet_bumpfee.py --descriptors                                      | ✖ Failed  | 10 s
    24wallet_descriptor.py --descriptors                                   | ✖ Failed  | 7 s
    25wallet_encryption.py --descriptors                                   | ✖ Failed  | 6 s
    26wallet_fundrawtransaction.py --descriptors                           | ✖ Failed  | 12 s
    27wallet_labels.py --descriptors                                       | ✖ Failed  | 2 s
    28wallet_miniscript.py --descriptors                                   | ✖ Failed  | 2 s
    29wallet_send.py --descriptors                                         | ✖ Failed  | 1 s
    
     0147/318 - rpc_deprecated.py failed, Duration: 1 s
     1
     2stdout:
     32025-04-14T09:29:49.903000Z TestFramework (INFO): PRNG seed is: 5746030027211002162
     42025-04-14T09:29:49.903000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250414_092629/rpc_deprecated_169
     52025-04-14T09:29:50.177000Z TestFramework (INFO): Tests for deprecated RPC methods (if any)
     62025-04-14T09:29:50.178000Z TestFramework (INFO): Tests for deprecated wallet-related RPC methods (if any)
     72025-04-14T09:29:50.178000Z TestFramework (INFO): Test settxfee RPC deprecation
     82025-04-14T09:29:50.203000Z TestFramework (ERROR): Unexpected exception caught during testing
     9Traceback (most recent call last):
    10  File "/root/ci_scratch/test/functional/test_framework/test_framework.py", line 182, in main
    11    self.run_test()
    12  File "/root/ci_scratch/build/test/functional/rpc_deprecated.py", line 37, in run_test
    13    assert_raises_rpc_error(-32, 'settxfee is deprecated and will be fully removed in v31.0.', self.nodes[0].rpc.settxfee, 0.01)
    14                                                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
    15AttributeError: 'NoneType' object has no attribute 'settxfee'
    
     0131/318 - rpc_whitelist.py failed, Duration: 1 s
     1
     2stdout:
     32025-04-14T09:29:42.390000Z TestFramework (INFO): PRNG seed is: 3309837604605811676
     42025-04-14T09:29:42.390000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250414_092629/rpc_whitelist_186
     52025-04-14T09:29:43.102000Z TestFramework (INFO): [user1]: Testing a non permitted permission (getnetworkinfo)
     62025-04-14T09:29:43.102000Z TestFramework (ERROR): Unexpected exception caught during testing
     7Traceback (most recent call last):
     8  File "/root/ci_scratch/test/functional/test_framework/test_framework.py", line 182, in main
     9    self.run_test()
    10  File "/root/ci_scratch/build/test/functional/rpc_whitelist.py", line 78, in run_test
    11    assert_equal(403, rpccall(self.nodes[0], user, permission).status)
    12                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    13  File "/root/ci_scratch/build/test/functional/rpc_whitelist.py", line 20, in rpccall
    14    conn = http.client.HTTPConnection(url.hostname, url.port)
    15           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    16  File "/usr/lib/python3.12/http/client.py", line 880, in __init__
    17    (self.host, self.port) = self._get_hostport(host, port)
    18                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    19  File "/usr/lib/python3.12/http/client.py", line 926, in _get_hostport
    20    i = host.rfind(':')
    21        ^^^^^^^^^^
    22AttributeError: 'NoneType' object has no attribute 'rfind'
    
     090/318 - feature_bip68_sequence.py failed, Duration: 58 s
     1
     2stdout:
     32025-04-14T09:28:25.778000Z TestFramework (INFO): PRNG seed is: 2393500354933353065
     42025-04-14T09:28:25.779000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250414_092629/feature_bip68_sequence_271
     52025-04-14T09:28:26.365000Z TestFramework (INFO): Running test disable flag
     62025-04-14T09:28:26.430000Z TestFramework (INFO): Running test sequence-lock-confirmed-inputs
     72025-04-14T09:29:22.254000Z TestFramework (INFO): Running test sequence-lock-unconfirmed-inputs
     82025-04-14T09:29:23.869000Z TestFramework (ERROR): Assertion failed
     9Traceback (most recent call last):
    10  File "/root/ci_scratch/test/functional/test_framework/test_framework.py", line 182, in main
    11    self.run_test()
    12  File "/root/ci_scratch/build/test/functional/feature_bip68_sequence.py", line 73, in run_test
    13    self.test_sequence_lock_unconfirmed_inputs()
    14  File "/root/ci_scratch/build/test/functional/feature_bip68_sequence.py", line 336, in test_sequence_lock_unconfirmed_inputs
    15    assert_equal(None if i == 1 else 'inconclusive', self.nodes[0].submitblock(block.serialize().hex()))
    16  File "/root/ci_scratch/test/functional/test_framework/util.py", line 77, in assert_equal
    17    raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
    18AssertionError: not(None == )
    
  2. maflcko commented at 9:50 am on April 14, 2025: member

    File “/root/ci_scratch/build/test/functional/rpc_deprecated.py”, line 37, in run_test assert_raises_rpc_error(-32, ‘settxfee is deprecated and will be fully removed in v31.0.’, self.nodes[0].rpc.settxfee, 0.01) ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: ‘NoneType’ object has no attribute ‘settxfee’

    This one seems obvious: The rpc member field should almost never be used. Directly calling the RPC field via the getattr is better.

    File “/root/ci_scratch/build/test/functional/feature_bip68_sequence.py”, line 336, in test_sequence_lock_unconfirmed_inputs assert_equal(None if i == 1 else ‘inconclusive’, self.nodes[0].submitblock(block.serialize().hex())) File “/root/ci_scratch/test/functional/test_framework/util.py”, line 77, in assert_equal raise AssertionError(“not(%s)” % " == “.join(str(arg) for arg in (thing1, thing2) + args)) AssertionError: not(None == )

    This affects a few RPCs, where json-none is an empty string for the cli, see also #18476.

    For the other issues, I haven’t looked, but there is self.supports_cli = False.

  3. maflcko added the label Tests on Apr 14, 2025
  4. mzumsande commented at 9:55 pm on April 15, 2025: contributor

    I’m looking into these currently, supports_cli = False is always possible of course but maybe we can fix the source of the failure instead in many cases?!

    This affects a few RPCs, where json-none is an empty string for the cli, see also #18476.

    My suggestion would be to have the test framework return None back to the the test if the cli is used and returns an empty string. That fixes a handful of the failing tests.

    [Edit]: #32286 (merged) fixed this problem, #32290 (open) attempts to fix the remaining ones.

  5. achow101 closed this on Apr 16, 2025

  6. achow101 referenced this in commit eb6b1003c1 on Apr 16, 2025
  7. achow101 reopened this on Apr 16, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-05-09 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me