The contrib/devtools/test_deterministic_coverage.sh
script is problematic:
- It is written in bash. This can lead to issues when running with the ancient bash version shipped by macOS by default, or can lead to other compatibility issues, such as #31588 (review). Also, pipefail isn’t set, so IO errors may be silently ignored.
- It is based on gcov. This can lead to issues, such as #31588#pullrequestreview-2602169248 (possibly due to prefix-map), or #31588 (comment) (gcovr processing error), or #31588#pullrequestreview-2605954001 (gcovr assertion error).
- The script is severely outdated, with the last update to
NON_DETERMINISTIC_TESTS
being in the prior decade.
Instead of patching around all issues one-by-one, just provide a fresh rewrite, based on the recently added deterministic-fuzz-coverage
tool based on clang, llvm-cov, and llvm-profdata. (Initial feedback indicates that this is a more promising attempt: #31588 (comment) and #31588 (comment)).
The new tool also sets RANDOM_CTX_SEED=21
as suggested by hodlinator in #31588 (comment).