mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
scripted-diff: Use new FUZZ_TARGET macro everywhere
-BEGIN VERIFY SCRIPT-
ren() { sed --regexp-extended -i "s|$1|$2|g" $(git grep -l --extended-regexp "$1"); }
# Replace FUZZ_TARGET_INIT
ren 'FUZZ_TARGET_INIT\((.+), (.+)\)' 'FUZZ_TARGET(\1, .init = \2)'
# Delete unused FUZZ_TARGET_INIT
sed -i -e '37,39d' src/test/fuzz/fuzz.h
-END VERIFY SCRIPT-
This commit is contained in:
parent
fa36ad8b09
commit
fa6dfaaf45
46 changed files with 54 additions and 57 deletions
|
|
@ -46,7 +46,7 @@ void initialize_addrman()
|
|||
return NetGroupManager(asmap);
|
||||
}
|
||||
|
||||
FUZZ_TARGET_INIT(data_stream_addr_man, initialize_addrman)
|
||||
FUZZ_TARGET(data_stream_addr_man, .init = initialize_addrman)
|
||||
{
|
||||
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
|
||||
CDataStream data_stream = ConsumeDataStream(fuzzed_data_provider);
|
||||
|
|
@ -233,7 +233,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
FUZZ_TARGET_INIT(addrman, initialize_addrman)
|
||||
FUZZ_TARGET(addrman, .init = initialize_addrman)
|
||||
{
|
||||
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
|
||||
SetMockTime(ConsumeTime(fuzzed_data_provider));
|
||||
|
|
@ -311,7 +311,7 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
|
|||
}
|
||||
|
||||
// Check that serialize followed by unserialize produces the same addrman.
|
||||
FUZZ_TARGET_INIT(addrman_serdeser, initialize_addrman)
|
||||
FUZZ_TARGET(addrman_serdeser, .init = initialize_addrman)
|
||||
{
|
||||
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
|
||||
SetMockTime(ConsumeTime(fuzzed_data_provider));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue