Bitcoin

bitcoin core – Failed to generate debug log in functional test

I’m working on a PR to migrate all the test-only rpc’s. -test rpc. I am facing an issue in one of my functional tests. feature_config_args.py Node does not generate debug logs. Here is the test_framework.log.

2024-08-26T15:07:46.488000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/home/probot/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
    self.run_test()
  File "/home/probot/bitcoin/test/functional/feature_config_args.py", line 429, in run_test
    self.test_testnet3_deprecation_msg()
  File "/home/probot/bitcoin/test/functional/feature_config_args.py", line 393, in test_testnet3_deprecation_msg
    with open(f"log_dir/debug.log", 'w'), self.nodes(0).assert_debug_log((t3_warning_log)):
  File "/home/probot/.pyenv/versions/3.10.8/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/probot/bitcoin/test/functional/test_framework/test_node.py", line 485, in assert_debug_log
    prev_size = self.debug_log_size(encoding="utf-8")  # Must use same encoding that is used to read() below
  File "/home/probot/bitcoin/test/functional/test_framework/test_node.py", line 473, in debug_log_size
    with open(self.debug_log_path, **kwargs) as dl:
FileNotFoundError: (Errno 2) No such file or directory: '/tmp/test_runner_₿_🏃_20240826_203720/feature_config_args_0/node0/testnet3/debug.log'
2024-08-26T15:07:46.540000Z TestFramework (INFO): Stopping nodes

PR can be viewed here PR

The failed tests are not related to any changes I made to the file and I can’t figure out why debug.log isn’t being generated.

Related Articles

Back to top button