Tested cherrypicking 8e5f8a4f775b93d30b86d28405886eea232cf875 from #30737 on top of this PR to forward RANDOM_CTX_SEED on inside test/fuzz/test_runner.py.
Ran this ~10 times:
RANDOM_CTX_SEED=21 build_fuzz/test/fuzz/test_runner.py ../qa-assets/
Many of the failures come down to:
Done 2 runs in 0 second(s)
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
what(): filesystem error: cannot remove all: No such file or directory [/tmp/test_common bitcoin/02ccd0019e3e40fb6001] [/tmp/test_common bitcoin/02ccd0019e3e40fb6001/regtest]
==41419== ERROR: libFuzzer: deadly signal
This proves to me that the latter part of this comment is not true. I would therefore suggest one of:
- Use
m_rng directly instead of reintroducing g_rng_temp_path.
- Make
g_rng_temp_path truly non-deterministic (maybe through reverting part of 97e16f57042cab07e5e73f6bed19feec2006e4f7, moving the seeding, haven't tested).
- Remove the latter part of the comment. (Edit: This defeats the point of introducing
g_rng_temp_path, so the other two alternatives would be preferable).
/** Random context to get unique temp data dirs. */