diff options
author | fanquake <fanquake@gmail.com> | 2020-12-27 17:37:25 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-12-27 17:37:32 +0800 |
commit | 31e511658a18d916b743bfcddeef52c0a4e6ea7a (patch) | |
tree | 1d531606593ab4ba33e8a9f9adea7285e6817ca9 /src/test | |
parent | 02cf20b9f571474c939d18a8b9d6b5d22479a222 (diff) | |
parent | fa09f97beabafaaeb59fca710760578ff1f2e8d7 (diff) |
Merge #20674: fuzz: Call SendMessages after ProcessMessage to increase coverage
fa09f97beabafaaeb59fca710760578ff1f2e8d7 fuzz: Call SendMessages after ProcessMessage to increase coverage (MarcoFalke)
Pull request description:
ACKs for top commit:
practicalswift:
Tested ACK fa09f97beabafaaeb59fca710760578ff1f2e8d7
dhruv:
tACK fa09f97
Crypt-iQ:
cr ACK fa09f97beabafaaeb59fca710760578ff1f2e8d7
sipa:
utACK fa09f97beabafaaeb59fca710760578ff1f2e8d7
Tree-SHA512: 87c52aa38f902c4f6c9c2380f486a3ab21edc0e21e48bb619cdb67cfd698154cc57b170eef31fc940c0bb2c878e155847de03fc6e4cd85bed25f10c4f80c747b
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/process_message.cpp | 4 | ||||
-rw-r--r-- | src/test/fuzz/process_messages.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/test/fuzz/process_message.cpp b/src/test/fuzz/process_message.cpp index 01de8bdbb5..8a6404f210 100644 --- a/src/test/fuzz/process_message.cpp +++ b/src/test/fuzz/process_message.cpp @@ -75,6 +75,10 @@ void fuzz_target(const std::vector<uint8_t>& buffer, const std::string& LIMIT_TO GetTime<std::chrono::microseconds>(), std::atomic<bool>{false}); } catch (const std::ios_base::failure&) { } + { + LOCK(p2p_node.cs_sendProcessing); + g_setup->m_node.peerman->SendMessages(&p2p_node); + } SyncWithValidationInterfaceQueue(); LOCK2(::cs_main, g_cs_orphans); // See init.cpp for rationale for implicit locking order requirement g_setup->m_node.connman->StopNodes(); diff --git a/src/test/fuzz/process_messages.cpp b/src/test/fuzz/process_messages.cpp index e12e780a18..9012c1ba39 100644 --- a/src/test/fuzz/process_messages.cpp +++ b/src/test/fuzz/process_messages.cpp @@ -79,6 +79,10 @@ FUZZ_TARGET_INIT(process_messages, initialize_process_messages) connman.ProcessMessagesOnce(random_node); } catch (const std::ios_base::failure&) { } + { + LOCK(random_node.cs_sendProcessing); + g_setup->m_node.peerman->SendMessages(&random_node); + } } SyncWithValidationInterfaceQueue(); LOCK2(::cs_main, g_cs_orphans); // See init.cpp for rationale for implicit locking order requirement |