On 26/07/2025 19:44, Collin Funk wrote:
Hi Pádraig,
Pádraig Brady <p...@draigbrady.com> writes:
That looks like a more general issue.
Shouldn't the (exit $1) in Exit() set $? to $fail ?
Perhaps remove_tmp_() is triggered too early or something?
Thanks for checking. Here is what the full log is before the test exits,
without my patch:
+ :
./tests/cksum/md5sum-bsd.sh: line 73: backslash\is\not\dir\sep: No such
file or directory
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ test '' = yes
+ cd /home/collin/coreutils-9.7.186-fc7f2
+ chmod -R u+rwx /home/collin/coreutils-9.7.186-fc7f2/gt-md5sum-bsd.sh.Y0VS
+ rm -rf /home/collin/coreutils-9.7.186-fc7f2/gt-md5sum-bsd.sh.Y0VS
+ exit 1
FAIL tests/cksum/md5sum-bsd.sh (exit status: 1)
As we can see, 'Exit' is actually never called for some reason. I have
pushed the simpler patch to call 'echo' with fixes this. Here is the
log:
+ echo.exe ''
./tests/cksum/md5sum-bsd.sh: line 73: backslash\is\not\dir\sep: No such
file or directory
+ Exit 0
+ set +e
+ exit 0
+ exit 0
+ remove_tmp_
+ __st=0
+ cleanup_
+ :
+ test '' = yes
+ cd /home/collin/coreutils-9.7.186-fc7f2
+ chmod -R u+rwx /home/collin/coreutils-9.7.186-fc7f2/gt-md5sum-bsd.sh.BdoX
+ rm -rf /home/collin/coreutils-9.7.186-fc7f2/gt-md5sum-bsd.sh.BdoX
+ exit 0
PASS tests/cksum/md5sum-bsd.sh (exit status: 0)
So I guess we can't redirect ':'.
Collin
We already avoid the :> blah || ... pattern
with sc_prohibit_colon_redirection in cfg.mk
It seems we should probably change that syntax check
to the more stringent ': *>[^>]' in tests/ at least
That would avoid both issues.
I'll push that change in a while.
cheers,
Padraig