Skip to content

test: Improve code coverage for pubkey checks#34058

Closed
billymcbip wants to merge 1 commit intobitcoin:masterfrom
billymcbip:cov
Closed

test: Improve code coverage for pubkey checks#34058
billymcbip wants to merge 1 commit intobitcoin:masterfrom
billymcbip:cov

Conversation

@billymcbip
Copy link
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 12, 2025
@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 12, 2025

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

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK rkrux

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

Copy link
Contributor

@rkrux rkrux left a comment

Choose a reason for hiding this comment

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

Code review a00332f

Few conditions in the mentioned functions indeed don't seem to be covered in the tests.

The coverage report seems to be not available in corecheck for some reason: https://corecheck.dev/bitcoin/bitcoin/pulls/34058

Coverage report is currently being generated, please come back later

@rkrux
Copy link
Contributor

rkrux commented Dec 15, 2025

tACK a00332f

@billymcbip billymcbip closed this by deleting the head repository Dec 18, 2025
@billymcbip
Copy link
Contributor Author

@rkrux I created a new PR with the exact same changes: #34099. I hope the code coverage job will run correctly on that PR.

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.

3 participants