bitcoin
bitcoin copied to clipboard
fuzz: fuzz connman with non-empty addrman + ASMap
Motivation
Currently, we fuzz connman with an addrman from NodeContext
. However,
fuzzing connman with only empty addrman might not be effective, especially
for functions like GetAddresses
and other ones that plays with addrman. Also,
we do not fuzz connman with ASMap, what would be good for functions that need
GetGroup
, or even for addrman. Without it, I do not see how effective would be
fuzzing ASMapHealthCheck
, for example.
Changes
- Move
AddrManDeterministic
andConsumeNetGroupManager
to util. - Use
ConsumeNetGroupManager
in connman target to construct a netgroupmanager and use it forConnmanTestMsg
. - Use
AddrManDeterministic
in connman target to create an addrman. It does not slow down as "filling" the addrman (e.g. withFillAddrman
). - Add coverage for
ASMapHealthCheck
.