Problem
The src/test/check-nondet script uses git grep to detect non-deterministic patterns in source code, but it silently passes in CI without actually checking anything.
In CI, make check runs from the build directory (build-${CC}-${PROTOCOL}/), which is outside the git repository. All git grep commands fail with:
fatal: not a git repository (or any parent up to mount point /home/runner/work/stellar-core/stellar-core)
Since the script uses if git grep <pattern>; then exit 1; fi, a failing git grep (exit code 128) is falsy, so every check is skipped and the script exits 0 (PASS).
This allowed SecretKey::random() calls to be merged into test code in #5177 without being caught.
Problem
The
src/test/check-nondetscript usesgit grepto detect non-deterministic patterns in source code, but it silently passes in CI without actually checking anything.In CI,
make checkruns from the build directory (build-${CC}-${PROTOCOL}/), which is outside the git repository. Allgit grepcommands fail with:Since the script uses
if git grep <pattern>; then exit 1; fi, a failinggit grep(exit code 128) is falsy, so every check is skipped and the script exits 0 (PASS).This allowed
SecretKey::random()calls to be merged into test code in #5177 without being caught.