Skip to main content
5 votes
Accepted

How can I analyze the test coverage of the Bitcoin Core codebase?

Marco Falke has a site that analyzes the current line, function and branch coverage for unit tests, functional tests and fuzz tests. Alternatively, vasild runs clang's tools and then a script to ...
Michael Folkson's user avatar
4 votes

How can I analyze the test coverage of the Bitcoin Core codebase?

If your intention is to contribute to Bitcoin Core, you must be able to build these reports locally. So that you can compare if your changes have been effective at increasing coverage. The general ...
givanse's user avatar
  • 230
3 votes
Accepted

Debugging Bitcoin Unit Tests

You are confusing the two kinds of tests. Unit tests are compiled into a separate binary and run by make check. Functional tests are testing the RPC commands and have to be run explicitly using the ...
Ava Chow's user avatar
  • 70.9k
3 votes
Accepted

Can someone explain the output from running Bitcoin Core unit tests on Mac OS please?

This is the output for all platforms at the moment, not just MacOS. To paraphrase from sipa on IRC: The first summary is bitcoin's own summary: because of some hackery to run unit tests in parallel, ...
laanwj's user avatar
  • 311
2 votes
Accepted

What is Valgrind? When should I use it for debugging Bitcoin Core over using gdb, lldb, pdb etc?

If you watched Fabian's presentation (or read the transcript) you'll have seen that he said you can use Valgrind for memory leak checks and that it can be used similarly to lldb. valgrind --leak-check=...
Michael Folkson's user avatar
2 votes

pyln.testing channel's spendable_msatoshi remains 0 in the direction towards the funder, regardless of balance

You opened a 1 million Satoshi channel and send 500 sats to the other side. The protocol requires a 1%channel reserve kept on both sides for the penalty mechanism to always have enough collateral. ...
Rene Pickhardt's user avatar
1 vote

Bitcoin Core: Unit Test Failure: system_tests.cpp: Line 48 BOOST_AUTO_TEST(run_command)

Here is my work around. I still have a hard time believing that the test code needs revision, but this is what I did and the tests now pass. From the above, I changed the call of RunCommandParseJSON()...
TKChattoraj's user avatar
1 vote
Accepted

What backward compatibility testing is done on Bitcoin Core?

What backward compatibility testing is done to ensure the latest release passes previous releases' versions of the functional tests? There is a feature_backwards_compatibility.py functional test ...
Michael Folkson's user avatar
1 vote
Accepted

What are some examples of previous first contributions improving Bitcoin Core tests?

PR #8836 was one of John Newbery's earlier contributions to Bitcoin Core. He introduced this code so that bitcoin-util-test.py would fail when the output_cmp file is empty. if not outputData: ...
Michael Folkson's user avatar
1 vote

Is writing unit tests a good way to start contributing to Bitcoin core?

If you are learning C++ from scratch you may struggle to start writing unit tests to begin with even if you identify a particular unit test that is missing. So that is one challenge. In terms of ...
Michael Folkson's user avatar
1 vote

Is writing unit tests a good way to start contributing to Bitcoin core?

Jumping straight to writing unit test can be hard, I suggest You check the official github page for how to contribute to the bitcoin core: https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING....
Saxtheowl's user avatar
  • 2,810

Only top scored, non community-wiki answers of a minimum length are eligible