mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-14 07:01:16 +02:00
7f122a4188fuzz: non-addrman fuzz tests: override-able check ratio (Vasil Dimov)3bd83e273dfuzz: addrman fuzz tests: override-able check ratio (Vasil Dimov)46b0fe7829test: non-addrman unit tests: override-able check ratio (Vasil Dimov)81e4d54d3atest: addrman unit tests: override-able check ratio (Vasil Dimov)6dff6214bebench: put addrman check ratio in a variable (Vasil Dimov)6f7c7567c5fuzz: parse the command line arguments in fuzz tests (Vasil Dimov)92a0f7e58dtest: parse the command line arguments in unit tests (Vasil Dimov) Pull request description: Previously command line arguments passed to unit and fuzz tests would be ignored by the tests themselves. They would be used by the boost test framework (e.g. `--run_test="addrman_tests/*"`) or by the fuzzer (e.g. `-runs=1`). However both provide ways to pass down the extra arguments to the test itself. Use that, parse the arguments and make them available to the tests via `gArgs`. This makes the tests more flexible as they can be run with any bitcoind config option specified on the command line. When creating `AddrMan` objects in tests, use `-checkaddrman=` (if provided) instead of hardcoding the check ratio in many different places. See https://github.com/bitcoin/bitcoin/pull/20233#issuecomment-889813074 for further motivation for this. ACKs for top commit: mzumsande: re-ACK7f122a4188josibake: reACK7f122a4188Tree-SHA512: 3a05e61e4d70a0569bb67594bcce3aad8fdef63cdcc54e2823a3bc9f18679571985004412b6c332a210f67849bab32d8467b4115fbff8f5fac9834982e60dcf3