![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
#include <test/fuzz/fuzz.h>#include <netaddress.h>#include <netbase.h>#include <test/fuzz/util/check_globals.h>#include <test/util/coverage.h>#include <test/util/random.h>#include <test/util/setup_common.h>#include <util/check.h>#include <util/fs.h>#include <util/sock.h>#include <util/time.h>#include <algorithm>#include <csignal>#include <cstdint>#include <cstdio>#include <cstdlib>#include <cstring>#include <exception>#include <fstream>#include <functional>#include <iostream>#include <map>#include <memory>#include <random>#include <string>#include <tuple>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | FuzzTarget |
Functions | |
| static void | SetArgs (int argc, char **argv) |
| auto & | FuzzTargets () |
| void | FuzzFrameworkRegisterTarget (std::string_view name, TypeTestOneInput target, FuzzTargetOptions opts) |
| static void | test_one_input (FuzzBufferType buffer) |
| static void | initialize () |
| int | LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) |
| int | LLVMFuzzerInitialize (int *argc, char ***argv) |
Variables | |
| const std::function< void(const std::string &)> | G_TEST_LOG_FUN {} |
| This is connected to the logger. | |
| static std::vector< const char * > | g_args |
| A copy of the command line arguments that start with --. | |
| const std::function< std::vector< const char * >()> | G_TEST_COMMAND_LINE_ARGUMENTS |
| Retrieve the command line arguments. | |
| static std::string_view | g_fuzz_target |
| static const TypeTestOneInput * | g_test_one_input {nullptr} |
| const std::function< std::string()> | G_TEST_GET_FULL_NAME |
| Retrieve the unit test name. | |
| void FuzzFrameworkRegisterTarget | ( | std::string_view | name, |
| TypeTestOneInput | target, | ||
| FuzzTargetOptions | opts ) |
| auto & FuzzTargets | ( | ) |
|
static |
| int LLVMFuzzerInitialize | ( | int * | argc, |
| char *** | argv ) |
| int LLVMFuzzerTestOneInput | ( | const uint8_t * | data, |
| size_t | size ) |
|
static |
|
static |
|
static |
A copy of the command line arguments that start with --.
First LLVMFuzzerInitialize() is called, which saves the arguments to g_args. Later, depending on the fuzz test, G_TEST_COMMAND_LINE_ARGUMENTS() may be called by BasicTestingSetup constructor to fetch those arguments and store them in BasicTestingSetup::m_node::args.
| const std::function<std::vector<const char*>()> G_TEST_COMMAND_LINE_ARGUMENTS |
Retrieve the command line arguments.
| const std::function<std::string()> G_TEST_GET_FULL_NAME |
Retrieve the unit test name.
| const std::function<void(const std::string&)> G_TEST_LOG_FUN {} |
|
static |