test: Fix Python compatibility issues in test framework #34218

pull tboy1337 wants to merge 2 commits into bitcoin:master from tboy1337:test-framework-fixes changing 1 files +7 −2
  1. tboy1337 commented at 8:16 AM on January 7, 2026: none

    This PR addresses cross-platform compatibility issues in the Bitcoin Core test framework:

    Changes

    • Windows compatibility: Add proper error handling for os.geteuid() in skip_if_no_bpf_permissions() method, which doesn't exist on Windows systems
    • Consistent return behavior: Fix inconsistent return statements in inspect_sqlite_db() method to ensure proper error handling when sqlite3 is unavailable

    Testing

    • Verified the test framework compiles successfully on both Windows and Unix-like systems
    • Confirmed pylint score improved from 6.67/10 to 6.75/10
    • No impact on existing test functionality

    Motivation

    These fixes ensure the test framework works correctly across all supported platforms (Windows, macOS, Linux) and improve error handling robustness.

  2. test: Fix Python issues in test framework
    - Add Windows compatibility for BPF permissions check by handling missing os.geteuid()
    - Fix inconsistent return statements in inspect_sqlite_db method
    c6fe7e24a0
  3. DrahtBot added the label Tests on Jan 7, 2026
  4. DrahtBot commented at 8:17 AM on January 7, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34218.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • permissions -> permission [Use singular "permission" in "no permission to use BPF" for correct English and clearer comprehension.]

    <sup>2026-01-07</sup>

  5. test: Ensure newline at end of file in test framework
    - Added a newline at the end of the file in test_framework.py to comply with PEP 8 standards and prevent potential issues in file handling.
    da355cd185
  6. fanquake closed this on Jan 7, 2026

  7. tboy1337 deleted the branch on Jan 7, 2026
Contributors
Labels

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: 2026-04-26 06:12 UTC

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