Skip to content

Test checkunparsable errors - #35834

Closed
Herb-ops wants to merge 2 commits into
bitcoin:masterfrom
Herb-ops:test-checkunparsable-errors
Closed

Herb-ops wants to merge 2 commits into
bitcoin:masterfrom
Herb-ops:test-checkunparsable-errors

Conversation

@Herb-ops

Copy link
Copy Markdown

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.

@DrahtBot

DrahtBot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

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

Code Coverage & Benchmarks

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

Reviews

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

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.

@DrahtBot

DrahtBot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🚧 At least one of the CI tasks failed.
Task riscv32 bare metal, static libbitcoin_consensus: https://github.com/bitcoin/bitcoin/actions/runs/30452867012/job/92449751882
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).

Hints

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.

@DrahtBot

DrahtBot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

@maflcko

maflcko commented Sep 18, 2026

Copy link
Copy Markdown
Member

Are you still working on this, or can it be closed?

@sedited

sedited commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Closing for now due to inactivity.

@sedited sedited closed this Oct 30, 2026
@Herb-ops

Herb-ops commented Nov 6, 2026

Copy link
Copy Markdown
Author

Hi, I’ve updated the branch and run the tests locally. The descriptor tests passed, along with the compiled tests and most functional tests. Could this PR be reopened for review? Thank you.

@sedited

sedited commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

I cannot (as in github doesn't allow me) re-open a pull request after it was pushed to. If you still think the changes here are worthwhile, open a new pull request. I would like you to reconsider though, since this pull request also failed to garner any interest for the time it was open, we have hundreds of existing open pull requests, and review resources are scarce.

@Herb-ops

Herb-ops commented Nov 6, 2026

Copy link
Copy Markdown
Author

Thanks for explaining. I understand, and I agree that review time is limited. I’ll focus my efforts on reviewing existing pull requests instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants