Motivation
Some unit tests use a deterministic random number generator where all generated numbers are deterministically derived from a given starting number (seed) which is generated “randomly”. Those tests can detect bugs and fail accordingly based on the random numbers produced by the generator. It is very useful if it is possible to reproduce a test failure.
Thus it would be very useful to print the seed, so that if a test fails, that failure can later be reproduced by providing the same seed via the RANDOM_CTX_SEED
environment variable.
It appears that in the CI multiprocess, i686, DEBUG
the seed is printed (it uses DEBUG_LOG_OUT
), but is not printed for previous releases, qt5 dev package and depends packages, DEBUG
(it does not use DEBUG_LOG_OUT
).
Possible solution
Use DEBUG_LOG_OUT
also in previous releases, qt5 dev package and depends packages, DEBUG
.
See #28196 (review)
Useful Skills
- Compiling Bitcoin Core from source
- Running the C++ unit tests
Guidance for new contributors
Want to work on this issue?
For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.