Skip to content

test: Improve code coverage for pubkey checks - #34099

Merged
glozow merged 1 commit into
bitcoin:masterfrom
billymcbip:cov
Jan 13, 2026
Merged

glozow merged 1 commit into
bitcoin:masterfrom
billymcbip:cov

Conversation

@billymcbip

Copy link
Copy Markdown
Contributor

Cover these branches in IsCompressedOrUncompressedPubKey and IsCompressedPubKey:

  • Non-canonical public key: invalid length for uncompressed key
  • Non-canonical public key: invalid length for compressed key
  • Non-canonical public key: invalid prefix for compressed key

See the missed branches here: https://maflcko.github.io/b-c-cov/total.coverage/src/script/interpreter.cpp.gcov.html

script_tests succeed on my end.

@DrahtBot DrahtBot added the Tests label Dec 18, 2025
@DrahtBot

DrahtBot commented Dec 18, 2025 •

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/34099.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK rkrux, darosior, maflcko

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

@rkrux

rkrux commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Nice, the coverage is available now here: https://corecheck.dev/bitcoin/bitcoin/pulls/34099.

I can see the PR description mentioned functions of the interpreter file has increased coverage! I don't know why the previous PR didn't have the coverage available.

@billymcbip

billymcbip commented Dec 18, 2025 •

Copy link
Copy Markdown
Contributor Author

@rkrux perhaps my force push on the other PR broke the code coverage job.

By the way, I also verified that the branches are being called by adding an assert(false) to those branches. script_tests then failed as expected.

@brunoerg

Copy link
Copy Markdown
Contributor

I can see the PR description mentioned functions of the interpreter file has increased coverage! I don't know why the previous PR didn't have the coverage available.

There was an issue with corecheck that hopefully has been fixed. See corecheck/corecheck#148 and corecheck/corecheck#143.

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code review ACK 6bb66fc

The changes are same as the ones in the previous PR #34058.

@billymcbip

ghost commented Dec 19, 2025

Copy link
Copy Markdown
Contributor Author

@brunoerg thank you. Separately, I think lost and gained baseline coverage is wrong. It's not plausible that my PR had as high an impact as https://corecheck.dev/bitcoin/bitcoin/pulls/34099 indicates.

@brunoerg

ghost commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

@brunoerg thank you. Separately, I think lost and gained baseline coverage is wrong. It's not plausible that my PR had as high an impact as https://corecheck.dev/bitcoin/bitcoin/pulls/34099 indicates.

Yes, it's wrong, see: corecheck/corecheck#150

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 6bb66fc

@maflcko

ghost commented Jan 13, 2026

Copy link
Copy Markdown
Member

ACK 6bb66fc 🌑

Show signature

Signature:

untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
trusted comment: ACK 6bb66fcccb5b65eada89578737ecada6f017fc5a 🌑
Fs6+hoZoEJWFFdV3J5KL2mjgnG7bkIQJNjLxkKyDaViRs0D/PRcp++0hlSA8+O/0g2hX+cvUx3byetNZYfZlAg==

@glozow
glozow merged commit 72e0999 into bitcoin:master Jan 13, 2026
@billymcbip
billymcbip deleted the cov branch January 14, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants