Skip to content

Commit 17834bd

Browse files
committed
Merge bitcoin/bitcoin#31333: fuzz: Implement G_TEST_GET_FULL_NAME
92d3d69 fuzz: Implement G_TEST_GET_FULL_NAME (Hodlinator) Pull request description: Catching up to bench & unit tests. Makes for more orderly paths for fuzz tests using `BasicTestingSetup`. ### Before ``` /tmp/test_common bitcoin/0748ae43ef8fa80703bc/regtest/blocks/xor.dat ``` ### After ``` /tmp/test_common bitcoin/tx_pool_standard/f18b3744625e0600eb0c/regtest/blocks/xor.dat ``` ACKs for top commit: kevkevinpal: ACK [92d3d69](bitcoin/bitcoin@92d3d69) furszy: utACK 92d3d69 tdb3: ACK 92d3d69 dergoegge: utACK 92d3d69 brunoerg: code review ACK 92d3d69 Tree-SHA512: 5e83970b111232adece10f79e3a43d0c3c49ab635763e2a4b420f1336cbb8fee94aab751264ddec01ac8363166636e3b29cfe3b2969fc28c8dd6b31bda351950
2 parents cf57722 + 92d3d69 commit 17834bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/fuzz/fuzz.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ __AFL_FUZZ_INIT();
3535

3636
const std::function<void(const std::string&)> G_TEST_LOG_FUN{};
3737

38-
const std::function<std::string()> G_TEST_GET_FULL_NAME{};
39-
4038
/**
4139
* A copy of the command line arguments that start with `--`.
4240
* First `LLVMFuzzerInitialize()` is called, which saves the arguments to `g_args`.
@@ -80,6 +78,9 @@ void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target,
8078
static std::string_view g_fuzz_target;
8179
static const TypeTestOneInput* g_test_one_input{nullptr};
8280

81+
const std::function<std::string()> G_TEST_GET_FULL_NAME{[]{
82+
return std::string{g_fuzz_target};
83+
}};
8384

8485
#if defined(__clang__) && defined(__linux__)
8586
extern "C" void __llvm_profile_reset_counters(void) __attribute__((weak));

0 commit comments

Comments
 (0)