From 22063c8c083d2d8130efb76482e45fa1976a595a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 8 Nov 2016 19:57:41 -0600 Subject: tests: use "returns_" rather than explicit comparison with "$?" * tests/chmod/no-x.sh: Likewise. * tests/cp/no-deref-link1.sh: Likewise. * tests/cp/no-deref-link2.sh: Likewise. * tests/cp/no-deref-link3.sh: Likewise. * tests/du/move-dir-while-traversing.sh: Likewise. * tests/ls/infloop.sh: Likewise. * tests/ls/stat-failed.sh: Likewise. * tests/ls/time-style-diag.sh: Likewise. * tests/misc/chroot-fail.sh: Likewise. * tests/misc/env-null.sh: Likewise. * tests/misc/env.sh: Likewise. * tests/misc/nice-fail.sh: Likewise. * tests/misc/printenv.sh: Likewise. * tests/misc/timeout.sh: Likewise. * tests/tail-2/follow-name.sh: Likewise. --- tests/chmod/no-x.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/chmod') diff --git a/tests/chmod/no-x.sh b/tests/chmod/no-x.sh index 304eb8229..499f74a52 100755 --- a/tests/chmod/no-x.sh +++ b/tests/chmod/no-x.sh @@ -48,10 +48,9 @@ compare exp out || fail=1 cd a # This will fail with ''chmod: fts_read failed: Permission denied'' -chmod a-x . b 2> /dev/null && fail=1 # chmod must exit with status 1. # Due to a bug in coreutils-5.93's fts.c, chmod would provoke # an abort (exit with status 134) on recent glibc-based systems. -test $? = 1 || fail=1 +returns_ 1 chmod a-x . b 2> /dev/null || fail=1 Exit $fail -- cgit v1.2.3-70-g09d2