Questions tagged [unit-test]

11 questions
4
votes
2 answers

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

I cloned the Bitcoin Core and did the build. But, I am experiencing a Unit Test Failure in system_tests.cpp, Line 48 BOOST_AUTO_TEST(run_command). First, my environment: Hardware: Intel i7-8550U @1.80GHz 2001 Mhz, 4 Cores, 8 Logical Processors,…
3
votes
2 answers

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

I have heard writing tests is a good starting point for contributing to Bitcoin Core. How do I work out which parts or specific lines of the codebase need additional test coverage?
3
votes
1 answer

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

When I build and run the unit tests on Mac OS using the make check command the output contains these two summaries (images uploaded below). Why does the testsuite summary initially summarize zero tests and then later only summarize a small number of…
Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
2
votes
1 answer

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

I have heard that improving the Bitcoin Core tests is a good way to start contributing to Bitcoin Core. What are some good examples of previous first contributions to the tests to take some inspiration from?
2
votes
1 answer

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

I was watching Fabian Jahr's presentation on debugging Bitcoin Core at Bitcoin Edge Dev++ 2019. He mentioned Valgrind briefly at the end. What is it and when should I use it over gdb, lldb, pdb etc?
2
votes
2 answers

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

I'm considering writing unit tests to Bitcoin core as a first step to C++ development and Bitcoin contribution. Anyone have any suggestions about the journey I'm about to begin and possible files that are needing tests?
2
votes
0 answers

Random generation of elliptic curve points: is there a preferred approach?

While most practical applications are concerned with the random generation of private keys, anyone who wishes to write unit-testing code on the secp256k1 elliptic curve group may wish to have the ability to randomly generate elliptic curve points.…
Sven Williamson
  • 1,524
  • 10
  • 23
1
vote
1 answer

Debugging Bitcoin Unit Tests

I am running the unit tests from bitcoin source using make check, and would like to debug the tests using LogPrint in the bitcoin source files. I read in the Test Docs that logs are only output to test_framework.log, but I'm unable to locate this…
JBaczuk
  • 7,278
  • 1
  • 11
  • 32
1
vote
1 answer

NBitcoin in C# MVC App Gives Me A WitnessProgramMissmatch Error When I Try to Build The Transaction

I am writing tests for an app I built that uses NBitcoin to send bitcoin and make bitcoin transactions. I have the following code to create fake bitcoins for an integration test: private ICoin[] CreateFakeCoins(TxInList inputs, Script…
1
vote
1 answer

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

The python test script below (using the pyln-testing library) opens a channel between l1 and l2, and then the funder (l1) pays half of the channel's capacity to l2. After this payment 'l2' wants to make a smaller payment to l1, but this payment…
gijswijs
  • 285
  • 1
  • 12
1
vote
1 answer

What backward compatibility testing is done on Bitcoin Core?

The unit and functional tests of the latest release of Bitcoin Core obviously test the codebase of that release. What backward compatibility testing is done to ensure the latest release passes previous releases' versions of the unit and functional…
Michael Folkson
  • 14,337
  • 3
  • 11
  • 45