-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Jim Meyering on 10/26/2009 3:04 AM: > The other two patches adjust tests of env and nice.
And I'm committing this followup, necessary on cygwin 1.5, where trailing dots are silently removed from file names due to Windows limitations (cygwin 1.7 works around windows by encoding the name differently). In other words, on older cygwin, 'foo ...' behaves like 'foo ..' (accessing the existing parent directory, giving exit status 126) rather than an attempt to access the file '...' (missing, so exit status 127). - -- Don't work too hard, make some time for fun as well! Eric Blake [email protected] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrlk1UACgkQ84KuGfSFAYDZkACfaogjqF4+aDT3c3GE9oPVvevL Q8kAoJ1SqBnCJRT3oHJjMRxErvhtDa1i =7XtO -----END PGP SIGNATURE-----
>From dae24f5ffc4846ce5178b3f765aec9074ce73b08 Mon Sep 17 00:00:00 2001 From: Eric Blake <[email protected]> Date: Mon, 26 Oct 2009 06:05:44 -0600 Subject: [PATCH] tests: avoid file name not portable to cygwin * tests/misc/chroot-fail: Use 'no_such', not '...', since cygwin 1.5 silently strips trailing dots. * tests/misc/nice-fail: Likewise. * tests/misc/stdbuf: Likewise. * tests/misc/timeout-parameters: Likewise. --- tests/misc/chroot-fail | 2 +- tests/misc/nice-fail | 2 +- tests/misc/stdbuf | 2 +- tests/misc/timeout-parameters | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/misc/chroot-fail b/tests/misc/chroot-fail index 5b58293..877ad0a 100755 --- a/tests/misc/chroot-fail +++ b/tests/misc/chroot-fail @@ -41,7 +41,7 @@ if chroot / true ; then test $? = 2 || fail=1 chroot / . # invalid command test $? = 126 || fail=1 - chroot / ... # no such command + chroot / no_such # no such command test $? = 127 || fail=1 else test $? = 125 || fail=1 diff --git a/tests/misc/nice-fail b/tests/misc/nice-fail index da85eb2..7a1bbe8 100755 --- a/tests/misc/nice-fail +++ b/tests/misc/nice-fail @@ -39,7 +39,7 @@ nice sh -c 'exit 2' # exit status propagation test $? = 2 || fail=2 nice . # invalid command test $? = 126 || fail=1 -nice ... # no such command +nice no_such # no such command test $? = 127 || fail=1 Exit $fail diff --git a/tests/misc/stdbuf b/tests/misc/stdbuf index 33bc658..90e45d7 100755 --- a/tests/misc/stdbuf +++ b/tests/misc/stdbuf @@ -56,7 +56,7 @@ test $? = 125 || fail=1 stdbuf -i0 -o0 -e0 true || fail=1 #check all files stdbuf -o1 . # invalid command test $? = 126 || fail=1 -stdbuf -o1 ... # no such command +stdbuf -o1 no_such # no such command test $? = 127 || fail=1 # Ensure line buffering stdout takes effect diff --git a/tests/misc/timeout-parameters b/tests/misc/timeout-parameters index 52d4c8a..02b63a7 100755 --- a/tests/misc/timeout-parameters +++ b/tests/misc/timeout-parameters @@ -57,7 +57,7 @@ timeout 1 . test $? = 126 || fail=1 # no such command -timeout 1 ... +timeout 1 no_such test $? = 127 || fail=1 Exit $fail -- 1.6.5.rc1
