coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tests: avoid a false failure on Cygwin


From: Collin Funk
Subject: Re: tests: avoid a false failure on Cygwin
Date: Sat, 26 Jul 2025 11:44:22 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

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

Attachment: 0001-tests-avoid-a-false-failure-on-Cygwin.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]