]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: cygwin: handle ENOENT from execvp(".")
authorPádraig Brady <P@draigBrady.com>
Tue, 12 Apr 2022 11:31:01 +0000 (12:31 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 12 Apr 2022 23:36:25 +0000 (00:36 +0100)
* tests/misc/env.sh: Verify with another command that
execvp() doesn not return ENOENT, before testing the
exit code from the command in question.
* tests/misc/nice-fail.sh: Likewise.
* tests/misc/stdbuf.sh: Likewise.
* tests/misc/timeout-parameters.sh: Likewise.

tests/misc/env.sh
tests/misc/nice-fail.sh
tests/misc/stdbuf.sh
tests/misc/timeout-parameters.sh

index 3e10899d582fb14866e24047d0eefa13805fa988..5a63f347cd7e73b417f5ba4bb0010c188e38bdc6 100755 (executable)
@@ -18,7 +18,7 @@
 
 
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
-print_ver_ env pwd
+print_ver_ env pwd nice
 
 # A simple shebang program to call "echo" from symlinks like "./-u" or "./--".
 echo "#!$abs_top_builddir/src/echo simple_echo" > simple_echo \
@@ -46,7 +46,7 @@ compare exp out || fail=1
 returns_ 125 env --- || fail=1 # unknown option
 returns_ 125 env -u || fail=1 # missing option argument
 returns_ 2 env sh -c 'exit 2' || fail=1 # exit status propagation
-returns_ 126 env . || fail=1 # invalid command
+returns_ 126 nice . && { returns_ 126 env . || fail=1; } # invalid command
 returns_ 127 env no_such || fail=1 # no such command
 
 # POSIX is clear that environ may, but need not be, sorted.
index 3303662d103ecfcff28f5f51d19a1365aeaf781e..5fdd9c315f41a8d3e4d6dfa88a755c9a4c694473 100755 (executable)
@@ -18,7 +18,7 @@
 
 
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
-print_ver_ nice
+print_ver_ nice env
 
 
 # These tests verify exact status of internal failure.
@@ -26,7 +26,7 @@ returns_ 125 nice -n 1 || fail=1 # missing command
 returns_ 125 nice --- || fail=1 # unknown option
 returns_ 125 nice -n 1a || fail=1 # invalid adjustment
 returns_ 2 nice sh -c 'exit 2' || fail=1 # exit status propagation
-returns_ 126 nice . || fail=1 # invalid command
+returns_ 126 env . && { returns_ 126 nice . || fail=1; } # invalid command
 returns_ 127 nice no_such || fail=1 # no such command
 
 Exit $fail
index e07ad02d791d100868cc87fcfd2484646fb3597b..6a21592a754f982928b76ec9f5edf517dbdb4530 100755 (executable)
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
-print_ver_ stdbuf
+print_ver_ stdbuf env
 
 getlimits_
 
@@ -52,7 +52,7 @@ returns_ 125 stdbuf -o$SIZE_OFLOW true || fail=1 # size too large
 returns_ 125 stdbuf -iL true || fail=1 # line buffering stdin disallowed
 returns_ 125 stdbuf true || fail=1 # a buffering mode must be specified
 stdbuf -i0 -o0 -e0 true || fail=1 #check all files
-returns_ 126 stdbuf -o1 . || fail=1 # invalid command
+returns_ 126 env . && { returns_ 126 stdbuf -o1 . || fail=1; } # invalid command
 returns_ 127 stdbuf -o1 no_such || fail=1 # no such command
 
 # Terminate any background processes
index fc9c8392f5ae6dd3ebdfe2becb35877694a37258..8c8c29b9733896f266abc63afa0b9913a38d16e7 100755 (executable)
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
-print_ver_ timeout
+print_ver_ timeout env
 getlimits_
 
 
@@ -42,7 +42,7 @@ timeout 9.999999999 sleep 0 || fail=1
 returns_ 125 timeout --signal=invalid 1 sleep 0 || fail=1
 
 # invalid command
-returns_ 126 timeout 10 . || fail=1
+returns_ 126 env . && { returns_ 126 timeout 10 . || fail=1; }
 
 # no such command
 returns_ 127 timeout 10 no_such || fail=1