Source-Changes archive

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

CVS commit: src/tests/bin/sh



Module Name:    src
Committed By:   kre
Date:           Tue Nov 16 11:12:15 UTC 2021

Modified Files:
        src/tests/bin/sh: t_redir.sh t_syntax.sh

Log Message:
Correct a systematic atf_check usage error.   One must not pipe into
atf_check and simply expect it to work - the shell is permitted to,
and our shell currently does, run all commands in a pipeline in subshell
environments - when atf_check attempts to exit to indicate failure, it
only exits from that subshell, and the rest of the test continues, usually
to indicate success

Instead, when it is necessary (or just convenient) to pipe into atf_check
check the exit status of the pipeline (if atf_check is not last, which it
would usually be, then we would need the pipefail option set - there are
currently no such cases), and explicitly fail if atf_check did not exit(0).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/bin/sh/t_redir.sh
cvs rdiff -u -r1.10 -r1.11 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index