Revert "tests: drop obsolete x-prefix in compacter-slow.sh"
What changed, and why it matters
This commit re-adds an old-style 'x' prefix to a string comparison in a test helper script. It is a test-only change with no effect on the actual Core Lightning node software, user funds, network behavior, or security. The change simply restores a defensive shell-coding idiom to avoid a rare edge case in ancient shells.
No security action required. Treat as a normal test-maintenance revert.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit reverts a prior cleanup that removed the ‘x’ prefix from a shell string comparison in tests/plugins/compacter-slow.sh. The resulting line is ‘if [ x”$1” != x”–version” ]; then’. This is a classic POSIX-shell compatibility trick to avoid issues when the variable value begins with a hyphen or is empty in older ‘[ ’ implementations. It affects only a test plugin used to simulate a slow gossip compaction daemon during race-condition tests. No production code, cryptographic operations, RPC interfaces, or network protocol handling are modified.
Changed components
tests/plugins/compacter-slow.shInspect captured patch +1 / −1
### tests/plugins/compacter-slow.sh
@@ -2,7 +2,7 @@
# This pretends to be lightning_gossip_compactd, but waits until the file "compactd-continue"
# exists. This lets us test race conditions.
-if [ "$1" != "--version" ]; then
+if [ x"$1" != x"--version" ]; then
while [ ! -f "compactd-continue" ]; do
sleep 1
doneWhy this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.