diff options
author | MacroFake <falke.marco@gmail.com> | 2022-09-05 15:53:08 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-09-05 15:38:33 +0200 |
commit | fa642286b83f29cb0ac0c8d4c7d8eba10600402c (patch) | |
tree | 31f0b0f08d580a608c35c2dbd75e8c047db6cff4 /src | |
parent | e864f2e4afdefd292e2659e4049c001d1140d6af (diff) |
fuzz: Avoid timeout in bitdeque fuzz target
Diffstat (limited to 'src')
-rw-r--r-- | src/test/fuzz/bitdeque.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/fuzz/bitdeque.cpp b/src/test/fuzz/bitdeque.cpp index 01af8320b5..634a3de346 100644 --- a/src/test/fuzz/bitdeque.cpp +++ b/src/test/fuzz/bitdeque.cpp @@ -2,11 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <util/bitdeque.h> - #include <random.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/util.h> +#include <util/bitdeque.h> #include <deque> #include <vector> @@ -54,7 +53,8 @@ FUZZ_TARGET_INIT(bitdeque, InitRandData) --initlen; } - while (provider.remaining_bytes()) { + LIMITED_WHILE(provider.remaining_bytes() > 0, 900) + { { assert(deq.size() == bitdeq.size()); auto it = deq.begin(); @@ -538,5 +538,4 @@ FUZZ_TARGET_INIT(bitdeque, InitRandData) } ); } - } |