Test checkunparsable errors #35834

pull Herb-ops wants to merge 2 commits into bitcoin:master from Herb-ops:test-checkunparsable-errors changing 1 files +18 −12
  1. Herb-ops commented at 12:44 PM on July 29, 2026: none

    CheckUnparsable parses both a private-form descriptor and its corresponding public-form descriptor. The helper previously reused one error string for both parses.

    The public parse therefore overwrote the private parse’s error. Although the helper verified that both parses failed, its exact error assertion only checked the error produced by the public parse. An incorrect private-form error could consequently go undetected.

    Changes

    • Store the private and public parse errors separately.
    • Check the exact private error when a private-form descriptor is provided.
    • Continue checking the exact public error.
    • Add an overload that accepts different expected private and public errors.
    • Preserve the existing three-argument interface for cases where both errors should match.
    • Update the affected test cases with their existing private-form errors.

    This also corrects a raw descriptor test whose private input used raw(...) while its public input mistakenly used sh(...). Both inputs now use raw(...), with Raw script is not hex as the expected error.

    This PR only changes test code and does not affect production descriptor parsing.

  2. test: Fix public descriptor in raw() unparsable test f49f433352
  3. test: Check private errors in CheckUnparsable 3e1d0ee5e3
  4. DrahtBot commented at 12:44 PM on July 29, 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/35834.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35445 (wallet, descriptor: Revert StringType::COMPAT for Miniscript expressions and drop the concept of a Descriptor ID that can be validated by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. DrahtBot added the label CI failed on Aug 5, 2026
  6. DrahtBot commented at 10:56 PM on August 5, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task riscv32 bare metal, static libbitcoin_consensus: https://github.com/bitcoin/bitcoin/actions/runs/30452867012/job/92449751882</sub> <sub>LLM reason (✨ experimental): CI failed because submodule clones from sourceware.org during 01_base_install.sh hit HTTP 429 rate limits (“unable to access … returned error: 429”), causing the Docker build to abort (exit code 2).</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  7. DrahtBot removed the label CI failed on Aug 17, 2026
Contributors

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-08-26 01:51 UTC

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