qa: Wait for both alerts in `feature_versionbits_warning.py` #36938

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:261121-qa-versionbits changing 1 files +10 −1
  1. hebasto commented at 11:36 AM on November 21, 2026: member

    The node raises the unknown rules warning, and runs the -alertnotify command, twice in this test. The first time is when the unknown deployment becomes active, and the second is after the restart. The test checks the alert file only once, at the end. As the command appends to the alert file, that check is already satisfied by the output of the first alert, so the test does not wait for the second command at all.

    The first commit waits for the first alert before the restart.

    The second commit empties the alert file while the node is down, so that the final check can only be satisfied by the second alert.

    On Windows, this narrows a race in which the test directory was removed while the second command was still starting. The command keeps open the handles it inherits from the node, which made the cleanup fail:

    PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:...
    

    This PR improves the test logic and mitigates #28529. However, it does not address the inheritance of the node's handles by child processes, part of which is tracked in #36668.

  2. test: Check the first alert in `feature_versionbits_warning.py`
    The node raises the unknown rules warning and runs `-alertnotify` as
    soon as the unknown deployment becomes active, which happens before the
    restart. Wait for the warning to appear in the alert file at that point.
    6315c77592
  3. test: Wait for the second alert in `feature_versionbits_warning.py`
    The check at the end of the test was already satisfied by the output of
    the first alert, so the test did not wait for the `-alertnotify` command
    run after the restart. Empty the alert file while the node is down, so
    that only the second alert can satisfy it.
    
    On Windows, this narrows a race in which the test directory was removed
    while that command was still starting. The command keeps open the
    handles it inherits from the node, which made the cleanup fail with
    WinError 32.
    61ceda1347
  4. hebasto added the label Tests on Nov 21, 2026
  5. DrahtBot commented at 11:36 AM on November 21, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  6. hebasto commented at 12:31 PM on November 21, 2026: member

    Here is a demo PR that shows how this change affects feature_versionbits_warning.py on Windows.

    Specifically, see https://github.com/hebasto/bitcoin-core-nightly/actions/runs/44900192891/job/136839646245.


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-11-24 00:51 UTC

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