mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-03 18:26:15 +00:00
2cb7e99deee1017a6edd94d82de556895138361d test: also reset CConnman::m_private_broadcast in tests (Vasil Dimov) 91b7c874e2b1479ed29f067cd1bef7724aabd951 test: add ConnmanTestMsg convenience method Reset() (Vasil Dimov) Pull request description: Member variables of `CConnman::m_private_broadcast` (introduced in https://github.com/bitcoin/bitcoin/pull/29415) could influence the tests which creates non-determinism if the same instance of `CConnman` is used for repeated test iterations. So, reset the state of `CConnman::m_private_broadcast` from `ConnmanTestMsg::Reset()`. Currently this affects the fuzz tests `process_message` and `process_messages`. Reported in https://github.com/bitcoin/bitcoin/issues/34476#issuecomment-3849088794 ACKs for top commit: maflcko: review ACK 2cb7e99deee1017a6edd94d82de556895138361d 🚙 Crypt-iQ: tACK 2cb7e99deee1017a6edd94d82de556895138361d frankomosh: Code Review ACK 2cb7e99deee1017a6edd94d82de556895138361d brunoerg: code review ACK 2cb7e99deee1017a6edd94d82de556895138361d Tree-SHA512: 0f4b114542da8dc611689457ce67034c15cbfe409b006b2db72bc74078ee9513f5ce3d0e6e67d37c127cfa0a5170fe72fe3ea45ce2a61d45a358dd11bd1881f8
Test library
This contains files for the test library, which is used by the test binaries (unit tests, benchmarks, fuzzers, gui tests).
Generally, the files in this folder should be well-separated modules. New code should be added to existing modules or (when in doubt) a new module should be created.
The utilities in here are compiled into a library, which does not hold any state. However, the main file setup_common
defines the common test setup for all test binaries. The test binaries will handle the global state when they
instantiate the BasicTestingSetup (or one of its derived classes).