Repository navigation
Apply a per-test patch set in the coverage worker - #219
Conversation
✅ Deploy Preview for corecheckprod canceled.
|
| + WriteCompactSize(stream, MAX_SIZE + 1); | ||
| + BOOST_CHECK_EXCEPTION(ReadCompactSize(stream), std::ios_base::failure, | ||
| + HasReason{"ReadCompactSize(): size too large"}); | ||
| +} |
There was a problem hiding this comment.
lgtm, but why is it not deterministic?
There was a problem hiding this comment.
I've no idea. I should have said in the description that this is a highly speculative set of LLM generated patches that I personally have very low confidence in. I expect this patch set to change a lot but I was just trying to be an optimist and hoping to get somewhat cleaner reports until the patch by patch evaluation has been done.
They have been somewhat locally shown to reduce coverage flips so the hope is that it would be useful to deploy something early while the testing and evaluation continues.
There was a problem hiding this comment.
If it doesn't help as a temporary measure then I'll revert.
There was a problem hiding this comment.
ok, this one is funny: It happens intermittently due to bitcoin/bitcoin@3333077 errors when a zero-input tx fails to decode the "witness" due to failing to decode random trailing bytes as compact size.
| + with self.nodes[0].assert_debug_log(['Timing mishap']): | ||
| + no_pong_node.send_and_ping(msg_pong(ping_nonce)) | ||
| + self.check_peer_info(pingtime=ping_delay, minping=ping_delay, pingwait=None) | ||
| + |
There was a problem hiding this comment.
lgtm. happy to review a pull
There was a problem hiding this comment.
Cool, I will get a PR put together
| + self.log.info('generatetoaddress with maxtries=0 mines nothing') | ||
| + block_count = node.getblockcount() | ||
| + assert_equal(self.generatetoaddress(node, 1, 'mneYUmWYsuk7kySiURxCi3AGxrAqZxLgPZ', 0), []) | ||
| + assert_equal(node.getblockcount(), block_count) |
There was a problem hiding this comment.
This non-det is from signet, I guess
| +// A functional run only reaches that branch when a peer sends a block we previously found invalid, | ||
| +// which happens in a small fraction of runs (mempool_reorg.py, feature_bip68_sequence.py); here the | ||
| +// invalidity is staged in the block index and the block is delivered over the real message path. | ||
| +BOOST_FIXTURE_TEST_CASE(cached_invalid_block_discourages_outbound_peer, TestChain100Setup) |
There was a problem hiding this comment.
should this maybe be a functional test?
There was a problem hiding this comment.
Yeah probably, will fold it into function for next batch
|
Thanks @maflcko for giving your input on the patches! |
Applies a set of test-only patches to the bitcoin checkout inside the worker, one patch per test, so a line that a test always executes stops appearing as a coverage change on files a pull request never touched.
Each patch is applied on its own: one that no longer applies is named in a
COVERAGE_TEST_PATCH_MISSING:line and skipped, and the run still builds and tests with the rest. The patches are staged when the stored pull-request diff is built, so they never show up as changes in a pull request, and the set that was applied is written totests-patches.jsonbesidecoverage.json.The set is pinned to
a06515e9and will need rebasing as bitcoin moves. Nothing here touches Bitcoin production code — 25 patches, 24 test cases, 15 files, all undersrc/test/andtest/functional/.