diff options
345 files changed, 3 insertions, 347 deletions
diff --git a/tests/chgrp/basic b/tests/chgrp/basic index 2c0d7fae6..4fad17606 100755 --- a/tests/chgrp/basic +++ b/tests/chgrp/basic @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh require_membership_in_two_groups_ -fail=0 set _ $groups; shift g1=$1 diff --git a/tests/chgrp/default-no-deref b/tests/chgrp/default-no-deref index fc378dec4..dc7e9d00a 100755 --- a/tests/chgrp/default-no-deref +++ b/tests/chgrp/default-no-deref @@ -29,7 +29,6 @@ g2=$2 mkdir d && touch f && ln -s ../f d/s || framework_failure -fail=0 g_init=`stat --printf=%g f` chgrp -R $g2 d || fail=1 diff --git a/tests/chgrp/deref b/tests/chgrp/deref index d4f19ce71..1a20e05bf 100755 --- a/tests/chgrp/deref +++ b/tests/chgrp/deref @@ -38,7 +38,6 @@ test "$g" = $g2 || skip_test_ "your system doesn't support changing the owner or group" \ "of a symbolic link." -fail=0 chgrp $g1 f set _ `ls -ln f`; g=$5; test "$g" = $g1 || fail=1 diff --git a/tests/chgrp/no-x b/tests/chgrp/no-x index 3ec49e9e7..175c1b2b8 100755 --- a/tests/chgrp/no-x +++ b/tests/chgrp/no-x @@ -33,7 +33,6 @@ g2=$2 mkdir -p d/no-x/y || framework_failure chmod u=rw d/no-x || framework_failure -fail=0 # This must exit nonzero. chgrp -R $g2 d >/dev/null 2>out && fail=1 diff --git a/tests/chgrp/posix-H b/tests/chgrp/posix-H index c24aa3f24..87295d4e6 100755 --- a/tests/chgrp/posix-H +++ b/tests/chgrp/posix-H @@ -34,7 +34,6 @@ ln -s 1 1s || framework_failure ln -s ../3 2/2s || framework_failure chgrp -R $g1 1 2 3 || framework_failure -fail=0 chgrp --preserve-root -H -R $g2 1s 2 || fail=1 diff --git a/tests/chgrp/recurse b/tests/chgrp/recurse index d29a65118..b0f2e2701 100755 --- a/tests/chgrp/recurse +++ b/tests/chgrp/recurse @@ -28,7 +28,6 @@ set _ $groups; shift g1=$1 g2=$2 -fail=0 # chgrp -R should not traverse a symlink to a directory. mkdir d e diff --git a/tests/chmod/c-option b/tests/chmod/c-option index 8d5979a3a..f00ef4bf8 100755 --- a/tests/chmod/c-option +++ b/tests/chmod/c-option @@ -30,7 +30,6 @@ chmod 444 $file || framework_failure skip_if_setgid_ -fail=0 chmod u=rwx $file || fail=1 chmod -c g=rwx $file > out || fail=1 diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x index 97823e090..d74dcc3be 100755 --- a/tests/chmod/equal-x +++ b/tests/chmod/equal-x @@ -26,7 +26,6 @@ fi file=f touch $file || framework_failure -fail=0 umask 005 for mode in =x =xX =Xx =x,=X =X,=x; do chmod a=r,$mode $file || fail=1 diff --git a/tests/chmod/equals b/tests/chmod/equals index fc0243c51..71c2b7db7 100755 --- a/tests/chmod/equals +++ b/tests/chmod/equals @@ -27,7 +27,6 @@ fi touch f || framework_failure -fail=0 expected_u=-rwx------ expected_g=----rwx--- diff --git a/tests/chmod/inaccessible b/tests/chmod/inaccessible index d0d739ef4..2ee6c01a7 100755 --- a/tests/chmod/inaccessible +++ b/tests/chmod/inaccessible @@ -26,7 +26,6 @@ fi mkdir -p d/e || framework_failure chmod 0 d/e d || framework_failure -fail=0 chmod u+rwx d d/e || fail=1 diff --git a/tests/chmod/no-x b/tests/chmod/no-x index 24cc01e7d..82aeb5fa5 100755 --- a/tests/chmod/no-x +++ b/tests/chmod/no-x @@ -28,7 +28,6 @@ skip_if_root_ mkdir -p d/no-x/y a/b || framework_failure chmod u=rw d/no-x || framework_failure -fail=0 # This must exit nonzero. chmod -R o=r d >/dev/null 2>out && fail=1 diff --git a/tests/chmod/octal b/tests/chmod/octal index 36423cb20..044cf3c8a 100755 --- a/tests/chmod/octal +++ b/tests/chmod/octal @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # Before coreutils-5.92, this would mistakenly succeed, # and act like `chmod 0 .'. diff --git a/tests/chmod/setgid b/tests/chmod/setgid index 5fe74ee1a..4b117f875 100755 --- a/tests/chmod/setgid +++ b/tests/chmod/setgid @@ -44,7 +44,6 @@ chmod g+s d 2> /dev/null && env -- test -g d || env -- test -g d || skip_test_ 'cannot create setgid directories' -fail=0 chmod 755 d diff --git a/tests/chmod/silent b/tests/chmod/silent index e0e984680..9f2d08e02 100755 --- a/tests/chmod/silent +++ b/tests/chmod/silent @@ -25,7 +25,6 @@ fi . $srcdir/test-lib.sh -fail=0 chmod -f 0 no-such 2> out && fail=1 chgrp -f 0 no-such 2>> out && fail=1 chown -f 0:0 no-such 2>> out && fail=1 diff --git a/tests/chmod/thru-dangling b/tests/chmod/thru-dangling index 6ecf64311..6a7742750 100755 --- a/tests/chmod/thru-dangling +++ b/tests/chmod/thru-dangling @@ -25,7 +25,6 @@ fi ln -s non-existent dangle || framework_failure -fail=0 # This operation cannot succeed since the symbolic link dangles. chmod 644 dangle 2> out && fail=1 diff --git a/tests/chmod/umask-x b/tests/chmod/umask-x index 32d815be1..ae0e51c9a 100755 --- a/tests/chmod/umask-x +++ b/tests/chmod/umask-x @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 touch file chmod 755 file (umask 77 && chmod -x file) 2>/dev/null && fail=1 diff --git a/tests/chmod/usage b/tests/chmod/usage index 1f1894427..9dd90ad35 100755 --- a/tests/chmod/usage +++ b/tests/chmod/usage @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # Each line in this list is a set of arguments, followed by :, # followed by the set of files it will attempt to chmod, diff --git a/tests/chown/basic b/tests/chown/basic index 6708da0a9..95a9cd1d3 100755 --- a/tests/chown/basic +++ b/tests/chown/basic @@ -26,7 +26,6 @@ require_root_ touch f || framework_failure -fail=0 chown -R --preserve-root 0:1 f # Make sure the owner and group are 0 and 1 respectively. diff --git a/tests/chown/deref b/tests/chown/deref index 24d0f93e1..c609751de 100755 --- a/tests/chown/deref +++ b/tests/chown/deref @@ -26,7 +26,6 @@ fi ln -s no-such dangle || framework_failure -fail=0 set _ `ls -ldo dangle`; shift; user=$3 diff --git a/tests/chown/preserve-root b/tests/chown/preserve-root index d33262047..f5c4fce3b 100755 --- a/tests/chown/preserve-root +++ b/tests/chown/preserve-root @@ -26,7 +26,6 @@ skip_if_root_ mkdir d && ln -s / d/slink-to-root -fail=0 # Even if --preserve-root were to malfunction, allowing the chown or # chgrp to traverse through "/", since we're running as non-root, diff --git a/tests/chown/separator b/tests/chown/separator index 4ee285647..6e717f695 100755 --- a/tests/chown/separator +++ b/tests/chown/separator @@ -46,7 +46,6 @@ case $host_triplet in *) ;; esac -fail=0 chown '' . || fail=1 diff --git a/tests/cp/abuse b/tests/cp/abuse index e9086b8f5..42f669205 100755 --- a/tests/cp/abuse +++ b/tests/cp/abuse @@ -32,7 +32,6 @@ echo "cp: will not copy \`b/1' through just-created symlink \`c/1'" \ # Check both cases: a dangling symlink, and one pointing to a writable file. -fail=0 for i in dangling-dest existing-dest; do test $i = existing-dest && echo i > t test $i = dangling-dest && rm -f t diff --git a/tests/cp/acl b/tests/cp/acl index 059a1e10c..2f8742880 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -45,7 +45,6 @@ acl1=`cd a && getfacl file | grep -v ':bin:' | grep -v 'mask::'` \ test $skip = yes && skip_test_ "'.' is not on a suitable file system for this test" -fail=0 # copy a file without preserving permissions cp a/file b/ || fail=1 diff --git a/tests/cp/backup-1 b/tests/cp/backup-1 index cc19f938c..73745956b 100755 --- a/tests/cp/backup-1 +++ b/tests/cp/backup-1 @@ -29,7 +29,6 @@ file_backup="$file$suffix" temp_files="$file $file_backup" rm -f $temp_files -fail=0 echo test > $file || fail=1 # Specify both version control and suffix so the environment variables diff --git a/tests/cp/backup-dir b/tests/cp/backup-dir index 9f0d0d719..a82d213e2 100755 --- a/tests/cp/backup-dir +++ b/tests/cp/backup-dir @@ -25,7 +25,6 @@ fi mkdir x y || framework_failure -fail=0 cp -a x y || fail=1 diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src index f226382d0..bf03e590a 100755 --- a/tests/cp/backup-is-src +++ b/tests/cp/backup-is-src @@ -26,7 +26,6 @@ fi echo a > a || framework_failure echo a-tilde > a~ || framework_failure -fail=0 # This cp command should exit nonzero. cp --b=simple a~ a > out 2>&1 && fail=1 diff --git a/tests/cp/cp-HL b/tests/cp/cp-HL index 17fff79b9..88f10e9cd 100755 --- a/tests/cp/cp-HL +++ b/tests/cp/cp-HL @@ -28,7 +28,6 @@ echo f > f || framework_failure ln -s f slink || framework_failure ln -s no-such-file src-dir/slink || framework_failure -fail=0 cp -H -R slink src-dir dest-dir || fail=1 test -d src-dir || fail=1 diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux index b1359c098..82bf4ae30 100755 --- a/tests/cp/cp-a-selinux +++ b/tests/cp/cp-a-selinux @@ -59,7 +59,6 @@ cd mnt || framework_failure echo > f || framework_failure echo > g || framework_failure -fail=0 # /bin/cp from coreutils-6.7-3.fc7 would fail this test by letting cp # succeed (giving no diagnostics), yet leaving the destination file empty. diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref index 5868fa207..3e3dab422 100755 --- a/tests/cp/cp-deref +++ b/tests/cp/cp-deref @@ -28,7 +28,6 @@ mkdir a b c d || framework_failure ln -s ../c a || framework_failure ln -s ../c b || framework_failure -fail=0 # Before coreutils-5.94, the following would fail with this message: # cp: will not create hard link `d/b/c' to directory `d/a/c' diff --git a/tests/cp/cp-i b/tests/cp/cp-i index 67f8a5652..59f60dd4c 100755 --- a/tests/cp/cp-i +++ b/tests/cp/cp-i @@ -26,7 +26,6 @@ fi mkdir -p a b/a/c || framework_failure touch a/c || framework_failure -fail=0 # coreutils 6.2 cp would neglect to prompt in this case. echo n | cp -iR a b 2>/dev/null || fail=1 diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup index 59d03a3ef..c43734ef1 100755 --- a/tests/cp/cp-mv-backup +++ b/tests/cp/cp-mv-backup @@ -36,7 +36,6 @@ expected=expected exec 1> $actual -fail=0 for prog in cp mv; do for initial_files in 'x' 'x y' 'x y y~' 'x y y.~1~' 'x y y~ y.~1~'; do for opt in none off numbered t existing nil simple never; do diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr index 8f3020bec..620560b26 100755 --- a/tests/cp/cp-mv-enotsup-xattr +++ b/tests/cp/cp-mv-enotsup-xattr @@ -59,7 +59,6 @@ getfattr -d a >out_a || skip_test_ "failed to get xattr of file" grep -F "$xattr_pair" out_a >/dev/null \ || skip_test_ "failed to set xattr of file" -fail=0 # This should pass without diagnostics cp -a a mnt/ 2>err || fail=1 diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents index da04c451f..1ba585fe0 100755 --- a/tests/cp/cp-parents +++ b/tests/cp/cp-parents @@ -34,7 +34,6 @@ mkdir -p a/b/c d e g || framework_failure ln -s d/a sym || framework_failure touch f || framework_failure -fail=0 # With 4.0.37 and earlier (back to when?), this would fail # with the failed assertion from dirname.c. diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink index d37cb1152..0a8872d89 100755 --- a/tests/cp/deref-slink +++ b/tests/cp/deref-slink @@ -27,7 +27,6 @@ fi touch f slink-target || framework_failure ln -s slink-target slink || framework_failure -fail=0 cp -d f slink || fail=1 Exit $fail diff --git a/tests/cp/dir-rm-dest b/tests/cp/dir-rm-dest index c5429d72c..aecc41bad 100755 --- a/tests/cp/dir-rm-dest +++ b/tests/cp/dir-rm-dest @@ -25,7 +25,6 @@ fi mkdir d e || framework_failure -fail=0 # Do it once with no destination... cp -R --remove-destination d e || fail=1 diff --git a/tests/cp/dir-slash b/tests/cp/dir-slash index 0c1e282a9..df41c1783 100755 --- a/tests/cp/dir-slash +++ b/tests/cp/dir-slash @@ -27,7 +27,6 @@ fi mkdir dir1 dir2 || framework_failure touch dir1/file || framework_failure -fail=0 cp -R dir1/ dir2 || fail=1 # This file should not exist, but it did with fileutils-4.0w. diff --git a/tests/cp/dir-vs-file b/tests/cp/dir-vs-file index 7e5e9d001..341536aa9 100755 --- a/tests/cp/dir-vs-file +++ b/tests/cp/dir-vs-file @@ -26,7 +26,6 @@ fi mkdir dir || framework_failure touch file || framework_failure -fail=0 # In 4.0.35, this cp invocation silently succeeded. cp -R dir file 2>/dev/null && fail=1 diff --git a/tests/cp/existing-perm-race b/tests/cp/existing-perm-race index e7166a717..0299e1e9c 100755 --- a/tests/cp/existing-perm-race +++ b/tests/cp/existing-perm-race @@ -28,7 +28,6 @@ set _ $groups; shift g1=$1 g2=$2 -fail=0 umask 077 mkfifo fifo || diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm index f47066504..0a4b25323 100755 --- a/tests/cp/fail-perm +++ b/tests/cp/fail-perm @@ -29,7 +29,6 @@ touch D/a || framework_failure chmod 0 D/a || framework_failure chmod u=rx,go=,-st D || framework_failure -fail=0 # This is expected to exit non-zero, because it can't read D/a. cp -pR D DD > /dev/null 2>&1 && fail=1 diff --git a/tests/cp/into-self b/tests/cp/into-self index cd8723236..84a0096f8 100755 --- a/tests/cp/into-self +++ b/tests/cp/into-self @@ -30,7 +30,6 @@ fi mkdir a dir || framework_failure -fail=0 # This command should exit nonzero. cp -R dir dir 2> out && fail=1 diff --git a/tests/cp/link b/tests/cp/link index d9cf4f827..416e64ea8 100755 --- a/tests/cp/link +++ b/tests/cp/link @@ -28,7 +28,6 @@ touch src || framework_failure touch dest || framework_failure touch dest2 || framework_failure -fail=0 cp -f --link src dest || fail=1 cp -f --symbolic-link src dest2 || fail=1 diff --git a/tests/cp/link-heap b/tests/cp/link-heap index d9379b52e..c0f36bf86 100755 --- a/tests/cp/link-heap +++ b/tests/cp/link-heap @@ -35,7 +35,6 @@ cp -al $a $b || framework_failure mkdir e || framework_failure mv $a $b e || framework_failure -fail=0 (ulimit -v 20000; cp -al e f) || fail=1 Exit $fail diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref index d71a114e1..aa570671b 100755 --- a/tests/cp/link-no-deref +++ b/tests/cp/link-no-deref @@ -25,7 +25,6 @@ fi ln -s no-such-file dangling-slink || framework_failure -fail=0 # Prior to coreutils-6.0, this would fail on non-Linux kernels, # with link being applied to the dangling symlink. diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve index fcaef2d8e..b07a9d9b2 100755 --- a/tests/cp/link-preserve +++ b/tests/cp/link-preserve @@ -31,7 +31,6 @@ cp -d a b c || framework_failure test -f c/a || framework_failure test -f c/b || framework_failure -fail=0 a_inode=`ls -i c/a|sed 's,c/.*,,'` b_inode=`ls -i c/b|sed 's,c/.*,,'` diff --git a/tests/cp/no-deref-link1 b/tests/cp/no-deref-link1 index 86164ecc0..a362471ba 100755 --- a/tests/cp/no-deref-link1 +++ b/tests/cp/no-deref-link1 @@ -30,7 +30,6 @@ cd b ln -s ../a/foo . cd .. -fail=0 # It should fail with a message something like this: # ./cp: `a/foo' and `b/foo' are the same file diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2 index f323d6bd1..1f70bec13 100755 --- a/tests/cp/no-deref-link2 +++ b/tests/cp/no-deref-link2 @@ -30,7 +30,6 @@ cd b ln -s ../a . cd .. -fail=0 # It should fail with a message something like this: # cp: `a' and `b/foo' are the same file diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3 index 353e3ce05..c1af5448e 100755 --- a/tests/cp/no-deref-link3 +++ b/tests/cp/no-deref-link3 @@ -27,7 +27,6 @@ msg=bar echo $msg > a ln -s a b -fail=0 # It should fail with a message something like this: # cp: `a' and `b' are the same file diff --git a/tests/cp/parent-perm b/tests/cp/parent-perm index fe1304105..5da5ea7c6 100755 --- a/tests/cp/parent-perm +++ b/tests/cp/parent-perm @@ -34,7 +34,6 @@ cp -p --parent a/b/c/foo e || framework_failure # to a destination directory that it doesn't create. chmod g-rx e/a e/a/b || framework_failure -fail=0 cp -p --parent a/b/d/foo e || fail=1 # Ensure that permissions on just-created directory, e/a/, diff --git a/tests/cp/parent-perm-race b/tests/cp/parent-perm-race index 186e7b2fb..674824bbe 100755 --- a/tests/cp/parent-perm-race +++ b/tests/cp/parent-perm-race @@ -27,7 +27,6 @@ umask 002 mkdir mode ownership d || framework_failure chmod g+s d 2>/dev/null # The cp test is valid either way. -fail=0 for attr in mode ownership do diff --git a/tests/cp/perm b/tests/cp/perm index 7cc6f419e..0f1572587 100755 --- a/tests/cp/perm +++ b/tests/cp/perm @@ -27,7 +27,6 @@ very_expensive_ umask 037 -fail=0 # Now, try it with `mv', with combinations of --force, no-f and # existing-destination and not. diff --git a/tests/cp/preserve-2 b/tests/cp/preserve-2 index f2739a3e6..9549fd176 100755 --- a/tests/cp/preserve-2 +++ b/tests/cp/preserve-2 @@ -25,7 +25,6 @@ fi touch f || framework_failure -fail=0 cp --preserve=mode,links f g || fail=1 diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid index 1f3f10b88..5b932af60 100755 --- a/tests/cp/preserve-gid +++ b/tests/cp/preserve-gid @@ -102,5 +102,4 @@ t1 b1 "$nameless_uid" "$nameless_gid2" cp -p t1 c0 "$nameless_uid" "$nameless_gid1" cp -p t1 c1 "$nameless_uid" "$nameless_gid2" cp -p -fail=0 Exit $fail diff --git a/tests/cp/preserve-slink-time b/tests/cp/preserve-slink-time index 407b77272..f9afc8618 100755 --- a/tests/cp/preserve-slink-time +++ b/tests/cp/preserve-slink-time @@ -40,7 +40,6 @@ cp -Pp dangle d2 || framework_failure stat --format=%y dangle > t1 || framework_failure stat --format=%y d2 > t2 || framework_failure -fail=0 compare t1 t2 || fail=1 Exit $fail diff --git a/tests/cp/proc-short-read b/tests/cp/proc-short-read index e06143c9f..93e21bdc1 100755 --- a/tests/cp/proc-short-read +++ b/tests/cp/proc-short-read @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 kall=/proc/kallsyms test -r $kall || skip_test_ "your system lacks $kall" diff --git a/tests/cp/proc-zero-len b/tests/cp/proc-zero-len index 9103d8a0a..f71db612a 100755 --- a/tests/cp/proc-zero-len +++ b/tests/cp/proc-zero-len @@ -28,7 +28,6 @@ touch empty || framework_failure f=/proc/cpuinfo test -r $f || f=empty -fail=0 cat $f > out || fail=1 # With coreutils-6.9, this would create a zero-length "exp" file. diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink index 4b4e63586..b88dc1e15 100755 --- a/tests/cp/r-vs-symlink +++ b/tests/cp/r-vs-symlink @@ -31,7 +31,6 @@ echo abc > foo || framework_failure ln -s foo slink || framework_failure ln -s no-such-file no-file || framework_failure -fail=0 # This would fail in 4.1.5, not in 4.1.6. cp -r no-file junk 2>/dev/null || fail=1 diff --git a/tests/cp/reflink-auto b/tests/cp/reflink-auto index 5e39b7265..949acb48c 100755 --- a/tests/cp/reflink-auto +++ b/tests/cp/reflink-auto @@ -30,7 +30,6 @@ rm -f "$a_other" || framework_failure echo non_zero_size > "$a_other" || framework_failure -fail=0 # we shouldn't be able to reflink() files on separate partitions cp --reflink "$a_other" b && fail=1 diff --git a/tests/cp/reflink-perm b/tests/cp/reflink-perm index 0c752467c..7e4c9073e 100755 --- a/tests/cp/reflink-perm +++ b/tests/cp/reflink-perm @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 : > time_check : > file diff --git a/tests/cp/same-file b/tests/cp/same-file index d5deb6857..79b599ab2 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -220,7 +220,6 @@ cat <<\EOF | sed "$remove_these_sed" > $expected EOF -fail=0 compare $expected $actual 1>&2 || fail=1 diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink index ed755bc13..1225af2c5 100755 --- a/tests/cp/slink-2-slink +++ b/tests/cp/slink-2-slink @@ -30,7 +30,6 @@ ln -s file b || framework_failure ln -s no-such-file c || framework_failure ln -s no-such-file d || framework_failure -fail=0 cp --update --no-dereference a b || fail=1 cp --update --no-dereference c d || fail=1 diff --git a/tests/cp/sparse b/tests/cp/sparse index 9683a9e33..cb1734bf2 100755 --- a/tests/cp/sparse +++ b/tests/cp/sparse @@ -31,7 +31,6 @@ require_sparse_support_ size=`expr 128 \* 1024 + 1` dd bs=1 seek=$size of=sparse < /dev/null 2> /dev/null || framework_failure -fail=0 cp --sparse=always sparse copy || fail=1 diff --git a/tests/cp/special-bits b/tests/cp/special-bits index eaacd1475..d7829f346 100755 --- a/tests/cp/special-bits +++ b/tests/cp/special-bits @@ -35,7 +35,6 @@ chmod a=r,ug+sx c || framework_failure chown $NON_ROOT_USERNAME . || framework_failure chmod u=rwx,g=rx,o=rx . || framework_failure -fail=0 cp -p a a2 || fail=1 set _ `ls -l a`; shift; p1=$1 diff --git a/tests/cp/special-f b/tests/cp/special-f index c2641dbbe..65816a13c 100755 --- a/tests/cp/special-f +++ b/tests/cp/special-f @@ -28,7 +28,6 @@ mkfifo fifo || skip_test_ "fifos not supported" touch e || framework-failure -fail=0 # Without -f, expect it to fail. cp -R fifo e || fail=1 diff --git a/tests/cp/src-base-dot b/tests/cp/src-base-dot index 1b0ee7ada..6ed9c26be 100755 --- a/tests/cp/src-base-dot +++ b/tests/cp/src-base-dot @@ -25,7 +25,6 @@ fi mkdir x y || framework_failure -fail=0 cd y cp --verbose -ab ../x/. . > out 2>&1 || fail=1 diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash index a821e7ec0..1e4e94c3d 100755 --- a/tests/cp/symlink-slash +++ b/tests/cp/symlink-slash @@ -27,7 +27,6 @@ fi mkdir dir || framework_failure ln -s dir symlink || framework_failure -fail=0 cp -dR symlink/ s || fail=1 set `ls -l s` diff --git a/tests/cp/thru-dangling b/tests/cp/thru-dangling index b2a5d7449..633183984 100755 --- a/tests/cp/thru-dangling +++ b/tests/cp/thru-dangling @@ -29,7 +29,6 @@ echo hi > exp || framework_failure echo "cp: not writing through dangling symlink \`dangle'" \ > exp-err || framework_failure -fail=0 # Starting with 6.9.90, this usage fails, by default: cp f dangle > err 2>&1 && fail=1 diff --git a/tests/dd/direct b/tests/dd/direct index 7e80bee15..05c487f6f 100755 --- a/tests/dd/direct +++ b/tests/dd/direct @@ -31,7 +31,6 @@ truncate -s 511 short || framework_failure truncate -s 8191 m1 || framework_failure truncate -s 8193 p1 || framework_failure -fail=0 for i in short m1 p1; do rm -f out dd if=$i oflag=direct of=out || fail=1 diff --git a/tests/dd/misc b/tests/dd/misc index 07a019a49..53562d1dd 100755 --- a/tests/dd/misc +++ b/tests/dd/misc @@ -29,7 +29,6 @@ tmp_in2=dd-in2.$$ tmp_sym=dd-sym.$$ tmp_out=dd-out.$$ -fail=0 warn=0 echo data > $tmp_in || framework_failure ln $tmp_in $tmp_in2 || framework_failure diff --git a/tests/dd/not-rewound b/tests/dd/not-rewound index 056d961cd..101e37564 100755 --- a/tests/dd/not-rewound +++ b/tests/dd/not-rewound @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh -fail=0 echo abcde > in (dd skip=1 count=1 bs=1; dd skip=1 bs=1) < in > out 2> /dev/null || fail=1 diff --git a/tests/dd/reblock b/tests/dd/reblock index 5d6e95b1f..244345a4a 100755 --- a/tests/dd/reblock +++ b/tests/dd/reblock @@ -37,7 +37,6 @@ cat <<\EOF > exp-no-reblock || framework_failure 4 bytes (4 B) copied EOF -fail=0 # Use a fifo rather than a pipe in the tests below # so that the producer (printf subshell) will wait diff --git a/tests/dd/skip-seek-past-dev b/tests/dd/skip-seek-past-dev index c9abfc01f..f11542a2d 100755 --- a/tests/dd/skip-seek-past-dev +++ b/tests/dd/skip-seek-past-dev @@ -33,7 +33,6 @@ get_device_size() { $BLOCKDEV --getsize64 "$1" } -fail=0 # Get path to device the current dir is on. # Note df can only get fs size, not device size. diff --git a/tests/dd/skip-seek-past-file b/tests/dd/skip-seek-past-file index 937f99e17..6bbf505f5 100755 --- a/tests/dd/skip-seek-past-file +++ b/tests/dd/skip-seek-past-file @@ -25,7 +25,6 @@ fi require_sparse_support_ # for `truncate --size=$OFF_T_MAX` eval $(getlimits) # for OFF_T limits -fail=0 printf "1234" > file || framework_failure diff --git a/tests/dd/skip-seek2 b/tests/dd/skip-seek2 index 8bf0c851d..ce57b6b24 100755 --- a/tests/dd/skip-seek2 +++ b/tests/dd/skip-seek2 @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh -fail=0 echo LA:3456789abcdef > in || fail=1 (dd bs=1 skip=3 count=0 && dd bs=5) < in > out 2> /dev/null || fail=1 diff --git a/tests/dd/stderr b/tests/dd/stderr index a6c8fba4e..5c903c8d5 100755 --- a/tests/dd/stderr +++ b/tests/dd/stderr @@ -25,7 +25,6 @@ fi p=$abs_top_builddir -fail=0 # Ensure this exits successfully, even though stderr is closed, # because it generates no stderr output. diff --git a/tests/dd/unblock-sync b/tests/dd/unblock-sync index 4112e0e28..4b213c1f9 100755 --- a/tests/dd/unblock-sync +++ b/tests/dd/unblock-sync @@ -25,7 +25,6 @@ fi printf 000100020003xx > in || framework_failure -fail=0 dd cbs=4 ibs=4 conv=unblock,sync < in > out 2> /dev/null || fail=1 cat <<\EOF > exp || fail=1 diff --git a/tests/df/total-verify b/tests/df/total-verify index 7b6273d2d..dbedb8740 100755 --- a/tests/df/total-verify +++ b/tests/df/total-verify @@ -61,7 +61,6 @@ cat space # this helps when debugging any test failure df --total -i -P > inode || framework_failure cat inode -fail=0 $PERL check-df space || fail=1 $PERL check-df inode || fail=1 diff --git a/tests/df/unreadable b/tests/df/unreadable index 8e6002860..d5df5371d 100755 --- a/tests/df/unreadable +++ b/tests/df/unreadable @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh skip_if_root_ -fail=0 touch unreadable || fail=1 chmod a-r unreadable || fail=1 df unreadable || fail=1 diff --git a/tests/du/2g b/tests/du/2g index 4981efba8..4dc9fe03d 100755 --- a/tests/du/2g +++ b/tests/du/2g @@ -28,7 +28,6 @@ fi # Creating a 2GB file counts as `very expensive'. very_expensive_ -fail=0 # Get number of free kilobytes on current partition, so we can # skip this test if there is insufficient free space. diff --git a/tests/du/8gb b/tests/du/8gb index 1812d16a9..a9779c62a 100755 --- a/tests/du/8gb +++ b/tests/du/8gb @@ -44,7 +44,6 @@ possibly because this system's NFS support is buggy Consider rerunning this test on a different file system." fi -fail=0 # This would print `0 big' with coreutils-4.5.8. du -ab big > out || fail=1 diff --git a/tests/du/basic b/tests/du/basic index 5714e5720..38253bd04 100755 --- a/tests/du/basic +++ b/tests/du/basic @@ -32,7 +32,6 @@ printf '%*s' 257 make-sure-the-file-is-non-empty > a/b/F || framework_failure printf %4096s x > d/1 cp d/1 d/sub/2 -fail=0 B=`stat --format=%B a/b/F` diff --git a/tests/du/deref b/tests/du/deref index cb23cc124..3d7fe031d 100755 --- a/tests/du/deref +++ b/tests/du/deref @@ -28,7 +28,6 @@ mkdir -p a/sub || framework_failure ln -s a/sub slink || framework_failure touch b || framework_failure -fail=0 # This used to fail with the following diagnostic: # du: `b': No such file or directory diff --git a/tests/du/deref-args b/tests/du/deref-args index ce02807fc..7ed7d40da 100755 --- a/tests/du/deref-args +++ b/tests/du/deref-args @@ -29,7 +29,6 @@ ln -s dir slink || framework_failure printf %65536s x > 64k || framework_failure ln -s 64k slink-to-64k || framework_failure -fail=0 du -D slink | sed 's/^[0-9][0-9]* //' > out # Ensure that the trailing slash is preserved and handled properly. diff --git a/tests/du/exclude b/tests/du/exclude index 15dd9a6ca..12c1ef428 100755 --- a/tests/du/exclude +++ b/tests/du/exclude @@ -25,7 +25,6 @@ fi mkdir -p a/b/c a/x/y a/u/v || framework_failure -fail=0 du --exclude=x a | sed 's/^[0-9][0-9]* //' | sort > out || fail=1 printf '===\n' >> out diff --git a/tests/du/fd-leak b/tests/du/fd-leak index c280b884e..fd53f1f52 100755 --- a/tests/du/fd-leak +++ b/tests/du/fd-leak @@ -40,7 +40,6 @@ done # This may fail due to command line limitations. touch $f || framework_failure -fail=0 # With coreutils-5.0, this would fail due to a file descriptor leak. du $f > out || fail=1 diff --git a/tests/du/hard-link b/tests/du/hard-link index d9dd247d0..fe4ae19bc 100755 --- a/tests/du/hard-link +++ b/tests/du/hard-link @@ -28,7 +28,6 @@ fi mkdir -p dir/sub ( cd dir && { echo non-empty > f1; ln f1 f2; echo non-empty > sub/F; } ) -fail=0 # Note that for this first test, we transform f1 or f2 # (whichever name we find first) to f_. That is necessary because, diff --git a/tests/du/inacc-dest b/tests/du/inacc-dest index 337319583..fe65fca02 100755 --- a/tests/du/inacc-dest +++ b/tests/du/inacc-dest @@ -28,7 +28,6 @@ skip_if_root_ mkdir f && cd f && mkdir a b c d e && touch c/j && chmod a-x c \ || framework_failure -fail=0 du > ../t 2>&1 && fail=1 # Accept either of the following outputs. diff --git a/tests/du/inacc-dir b/tests/du/inacc-dir index 030a40a22..dde790322 100755 --- a/tests/du/inacc-dir +++ b/tests/du/inacc-dir @@ -25,7 +25,6 @@ skip_if_root_ mkdir -p a/sub || framework_failure -fail=0 du -s a > exp || fail=1 chmod 0 a/sub || fail=1 diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd index 05f9b2f9c..0f36b0c68 100755 --- a/tests/du/inaccessible-cwd +++ b/tests/du/inaccessible-cwd @@ -33,7 +33,6 @@ mkdir -p no-x a/b || framework_failure cd no-x || framework_failure chmod 0 . || framework_failure -fail=0 du "$cwd/a" > /dev/null || fail=1 diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable index 68ec61362..c87d3b516 100755 --- a/tests/du/long-from-unreadable +++ b/tests/du/long-from-unreadable @@ -65,7 +65,6 @@ mkdir inaccessible || framework_failure cd inaccessible || framework_failure chmod 0 . || framework_failure -fail=0 du -s "$cwd/$dir" > /dev/null || fail=1 Exit $fail diff --git a/tests/du/long-sloop b/tests/du/long-sloop index f62441970..99f7a1578 100755 --- a/tests/du/long-sloop +++ b/tests/du/long-sloop @@ -62,7 +62,6 @@ cat $file > /dev/null 2> err && in file name resolution' too_many=`sed 's/.*: //' err` -fail=0 # With coreutils-5.93 there was no failure. # With coreutils-5.94 we get the desired diagnostic: diff --git a/tests/du/no-deref b/tests/du/no-deref index 9ea8df328..9b2927012 100755 --- a/tests/du/no-deref +++ b/tests/du/no-deref @@ -26,7 +26,6 @@ fi mkdir -p dir/a/b || framework_failure ln -s dir slink || framework_failure -fail=0 du slink | sed 's/^[0-9][0-9]* //' > out cat <<\EOF > exp diff --git a/tests/du/no-x b/tests/du/no-x index 986689a68..3d24572bb 100755 --- a/tests/du/no-x +++ b/tests/du/no-x @@ -28,7 +28,6 @@ skip_if_root_ mkdir -p d/no-x/y || framework_failure chmod u=rw d/no-x || framework_failure -fail=0 # This must exit nonzero. du d >/dev/null 2>out && fail=1 diff --git a/tests/du/one-file-system b/tests/du/one-file-system index 0f95fe9d3..1d395c42e 100755 --- a/tests/du/one-file-system +++ b/tests/du/one-file-system @@ -26,7 +26,6 @@ fi mkdir -p b/c y/z || framework_failure -fail=0 # Due to a used-uninitialized variable, the "du -x" from coreutils-6.6 # would not traverse into second and subsequent directories listed diff --git a/tests/du/restore-wd b/tests/du/restore-wd index cbe147abf..fcaf1f3f1 100755 --- a/tests/du/restore-wd +++ b/tests/du/restore-wd @@ -26,7 +26,6 @@ fi mkdir a b || framework_failure -fail=0 # With du from coreutils-4.5.5 and 4.5.6, this would fail with # du: `b': No such file or directory diff --git a/tests/du/slash b/tests/du/slash index aac17183d..826a70f66 100755 --- a/tests/du/slash +++ b/tests/du/slash @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh require_readable_root_ -fail=0 du --exclude='[^/]*' -x / > out-t || fail=1 sed 's/^[0-9][0-9]* //' out-t > out diff --git a/tests/du/slink b/tests/du/slink index 3653067d6..45bd17e46 100755 --- a/tests/du/slink +++ b/tests/du/slink @@ -45,7 +45,6 @@ if df --type=nfsv3 . >/dev/null 2>&1; then skip_test_ "\`.' is on an NFS file system" fi -fail=0 symlink_name_lengths='1 15 16 31 32 59 60 63 64 127 128 255 256 511 512 1024' for len in $symlink_name_lengths; do name=`seq 1 $len|tr -c x y |head -c$len` diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash index 997bc057d..10244630b 100755 --- a/tests/du/trailing-slash +++ b/tests/du/trailing-slash @@ -29,7 +29,6 @@ fi mkdir -p dir/1/2 || framework_failure ln -s dir slink || framework_failure -fail=0 du slink/ | sed 's/^[0-9][0-9]* //' > out echo === >> out diff --git a/tests/du/two-args b/tests/du/two-args index f59ca7398..e5ddb2b53 100755 --- a/tests/du/two-args +++ b/tests/du/two-args @@ -33,7 +33,6 @@ cd sub || framework_failure t=t mkdir -p $t/1 $t/2 || framework_failure -fail=0 test -d $t || fail=1 du $t/1 $t/2 > /dev/null || fail=1 diff --git a/tests/id/no-context b/tests/id/no-context index f875ee0bc..0e42e3a22 100755 --- a/tests/id/no-context +++ b/tests/id/no-context @@ -27,7 +27,6 @@ fi # but this is as good a witness as any, in general. require_selinux_ -fail=0 # Require the context=... part by default. id > out || fail=1 diff --git a/tests/install/basic-1 b/tests/install/basic-1 index 7fdb7398b..a09be6318 100755 --- a/tests/install/basic-1 +++ b/tests/install/basic-1 @@ -31,7 +31,6 @@ rm -rf $dir $file || framework_failure mkdir -p $dir || framework_failure echo foo > $file || framework_failure -fail=0 ginstall $file $dir || fail=1 # Make sure the source file still exists. test -f $file || fail=1 diff --git a/tests/install/create-leading b/tests/install/create-leading index 0740ca506..012f0a00b 100755 --- a/tests/install/create-leading +++ b/tests/install/create-leading @@ -26,7 +26,6 @@ fi . $srcdir/test-lib.sh -fail=0 file=file echo foo > $file diff --git a/tests/install/d-slashdot b/tests/install/d-slashdot index 632fef5ab..95ed03879 100755 --- a/tests/install/d-slashdot +++ b/tests/install/d-slashdot @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 ginstall -d d1/. || fail=1 test -d d1 || fail=1 diff --git a/tests/install/install-C b/tests/install/install-C index a1a9d6831..1edfa544f 100755 --- a/tests/install/install-C +++ b/tests/install/install-C @@ -28,7 +28,6 @@ mode1=0644 mode2=0755 mode3=2755 -fail=0 echo test > a || framework_failure echo "\`a' -> \`b'" > out_installed_first || framework_failure diff --git a/tests/install/install-C-root b/tests/install/install-C-root index 234ebe790..b31d29d5b 100755 --- a/tests/install/install-C-root +++ b/tests/install/install-C-root @@ -30,7 +30,6 @@ u2=2 g1=1 g2=2 -fail=0 echo test > a || framework_failure echo "\`a' -> \`b'" > out_installed_first diff --git a/tests/install/install-C-selinux b/tests/install/install-C-selinux index a91d8bbf6..95aacda2f 100755 --- a/tests/install/install-C-selinux +++ b/tests/install/install-C-selinux @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh require_selinux_ -fail=0 echo test > a || framework_failure chcon -u system_u a || skip_test_ "chcon doesn't work" diff --git a/tests/install/strip-program b/tests/install/strip-program index 88072ccd1..d96d0d32b 100755 --- a/tests/install/strip-program +++ b/tests/install/strip-program @@ -31,7 +31,6 @@ sed s/b/B/ \$1 > \$1.t && mv \$1.t \$1 EOF chmod a+x b || framework_failure -fail=0 echo abc > src || fail=1 echo aBc > exp || fail=1 diff --git a/tests/install/trap b/tests/install/trap index 37da21f7c..157bb6a45 100755 --- a/tests/install/trap +++ b/tests/install/trap @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh -fail=0 # Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh. ( diff --git a/tests/ln/backup-1 b/tests/ln/backup-1 index 68c9ca22f..cc3e10e0c 100755 --- a/tests/ln/backup-1 +++ b/tests/ln/backup-1 @@ -28,7 +28,6 @@ fi touch a b || framework_failure -fail=0 ln b b~ || fail=1 ln -f --b=simple a b || fail=1 diff --git a/tests/ln/hard-backup b/tests/ln/hard-backup index 54bf9ebc8..6ff0b955d 100755 --- a/tests/ln/hard-backup +++ b/tests/ln/hard-backup @@ -25,7 +25,6 @@ fi touch f || framework_failure -fail=0 ln --backup f f 2> out && fail=1 cat <<\EOF > exp || fail=1 diff --git a/tests/ln/hard-to-sym b/tests/ln/hard-to-sym index 510b57abf..22b5923fe 100755 --- a/tests/ln/hard-to-sym +++ b/tests/ln/hard-to-sym @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # =================================================== # ensure -s silently overrides -L, -P diff --git a/tests/ln/misc b/tests/ln/misc index d42d68a27..d2c8e3ec5 100755 --- a/tests/ln/misc +++ b/tests/ln/misc @@ -27,7 +27,6 @@ t=tln-symlink d=tln-subdir ld=tln-symlink-to-subdir f=tln-file -fail=0 # Create a simple symlink with both source and destination files # in current directory. diff --git a/tests/ln/sf-1 b/tests/ln/sf-1 index bc189fd9b..df9e2336c 100755 --- a/tests/ln/sf-1 +++ b/tests/ln/sf-1 @@ -27,7 +27,6 @@ fi echo foo > a || framework_failure ln -s . b || framework_failure -fail=0 ln -sf a b > err 2>&1 && fail=1 case `cat err` in *'are the same file') ;; diff --git a/tests/ln/slash-decorated-nonexistent-dest b/tests/ln/slash-decorated-nonexistent-dest index afbbd060d..2237e304c 100755 --- a/tests/ln/slash-decorated-nonexistent-dest +++ b/tests/ln/slash-decorated-nonexistent-dest @@ -25,7 +25,6 @@ fi touch f || framework_failure -fail=0 # Before coreutils-7.6, this would succeed on Solaris 10 ln -T f no-such-file/ && fail=1 diff --git a/tests/ln/target-1 b/tests/ln/target-1 index 5496db791..f681d51ff 100755 --- a/tests/ln/target-1 +++ b/tests/ln/target-1 @@ -29,7 +29,6 @@ fi . $srcdir/test-lib.sh mkdir d || framework_failure -fail=0 ln -s --target-dir=d ../f || fail=1 Exit $fail diff --git a/tests/ls/abmon-align b/tests/ls/abmon-align index 47df97ac0..51c32aba2 100755 --- a/tests/ls/abmon-align +++ b/tests/ls/abmon-align @@ -27,7 +27,6 @@ for mon in $(seq -w 12); do touch -d"+$mon month" $mon.ts || framework_failure done -fail=0 # Note some of the following locales may be missing but if so # we should fail back to the C locale which should be aligned diff --git a/tests/ls/capability b/tests/ls/capability index c45f54241..958a8ddb6 100755 --- a/tests/ls/capability +++ b/tests/ls/capability @@ -29,7 +29,6 @@ grep '^#define HAVE_CAP 1$' $CONFIG_HEADER > /dev/null \ (setcap --help) 2>&1 |grep 'usage: setcap' > /dev/null \ || skip_test_ "setcap utility not found" -fail=0 # Don't let a different umask perturb the results. umask 22 diff --git a/tests/ls/color-clear-to-eol b/tests/ls/color-clear-to-eol index fd65ced08..aa8cf4e77 100755 --- a/tests/ls/color-clear-to-eol +++ b/tests/ls/color-clear-to-eol @@ -32,7 +32,6 @@ c_pre="$e[0m$e[${color_code}m" c_post="$e[0m$e[K\n$e[m" printf "$c_pre$long_name$c_post\n" > exp || framework_failure -fail=0 env TERM=xterm COLUMNS=80 LS_COLORS="*.foo=$color_code" TIME_STYLE=+T \ ls -og --color=always $long_name > out || fail=1 diff --git a/tests/ls/color-dtype-dir b/tests/ls/color-dtype-dir index 3ccf10eb8..526d9e9c1 100755 --- a/tests/ls/color-dtype-dir +++ b/tests/ls/color-dtype-dir @@ -33,7 +33,6 @@ mkdir d other-writable sticky || framework_failure chmod o+w other-writable || framework_failure chmod o+t sticky || framework_failure -fail=0 ls --color=always > out || fail=1 cat -A out > o1 || fail=1 diff --git a/tests/ls/dangle b/tests/ls/dangle index 687d3dfba..1f4ca2659 100755 --- a/tests/ls/dangle +++ b/tests/ls/dangle @@ -31,7 +31,6 @@ ln -s no-such d/dangle || framework_failure printf '? dangle\n' > subdir_Li_exp || framework_failure printf 'total 0\n? dangle\n' > subdir_Ls_exp || framework_failure -fail=0 # This must exit nonzero. ls -L dangle > /dev/null 2>&1 && fail=1 diff --git a/tests/ls/dired b/tests/ls/dired index a2a2ded9d..b4607e15f 100755 --- a/tests/ls/dired +++ b/tests/ls/dired @@ -25,7 +25,6 @@ fi mkdir dir || framework_failure -fail=0 LC_MESSAGES=C ls -lR --dired dir > out || fail=1 cat <<EOF > exp diff --git a/tests/ls/file-type b/tests/ls/file-type index d4b240f82..60db1d0b6 100755 --- a/tests/ls/file-type +++ b/tests/ls/file-type @@ -39,7 +39,6 @@ mkfifo fifo cd .. -fail=0 ls -F sub > out || fail=1 cat <<EOF > exp diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink index 27b2a1c52..ba2df3f70 100755 --- a/tests/ls/follow-slink +++ b/tests/ls/follow-slink @@ -34,7 +34,6 @@ ln -s ../../dir1 sub/link-to-dir || framework_failure # systems running some DJGPP-2.03 libc. ls -F link > /dev/null || framework_failure -fail=0 # When explicitly listing a broken link, the command must fail. ls -L link 2> /dev/null && fail=1 diff --git a/tests/ls/infloop b/tests/ls/infloop index b77f88cdb..d32e9782c 100755 --- a/tests/ls/infloop +++ b/tests/ls/infloop @@ -36,7 +36,6 @@ cat <<\EOF > exp-err || framework_failure ls: loop/sub: not listing already-listed directory EOF -fail=0 timeout 1 ls -RL loop 2>err > out # Ensure that ls exits with status 2 upon detecting a cycle diff --git a/tests/ls/inode b/tests/ls/inode index f911984a5..58130e236 100755 --- a/tests/ls/inode +++ b/tests/ls/inode @@ -26,7 +26,6 @@ fi touch f || framework_failure ln -s f slink || framework_failure -fail=0 # When listed explicitly: diff --git a/tests/ls/m-option b/tests/ls/m-option index 836d50ead..1c2c291e1 100755 --- a/tests/ls/m-option +++ b/tests/ls/m-option @@ -26,7 +26,6 @@ fi seq 2000 > b || framework_failure touch a || framework_failure -fail=0 # Before coreutils-5.1.1, the following would output a space after the comma. ls -w2 -m a b > out || fail=1 diff --git a/tests/ls/multihardlink b/tests/ls/multihardlink index 815222db0..cbe6330cd 100755 --- a/tests/ls/multihardlink +++ b/tests/ls/multihardlink @@ -34,7 +34,6 @@ c_end=$(printf '\033[m') c_mh=$(printf '\033[%sm' $code_mh) c_ex=$(printf '\033[%sm' $code_ex) c_png=$(printf '\033[%sm' $code_png) -fail=0 # regular file - not hard linked LS_COLORS="mh=$code_mh" ls -U1 --color=always file > out || fail=1 diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid index a29b17081..4fe0f6559 100755 --- a/tests/ls/nameless-uid +++ b/tests/ls/nameless-uid @@ -36,7 +36,6 @@ fi touch f || framework_failure chown $nameless_uid f || framework_failure -fail=0 set -- `ls -o f` || fail=1 test $3 = $nameless_uid || fail=1 diff --git a/tests/ls/no-arg b/tests/ls/no-arg index e2c7f41ac..a3421c878 100755 --- a/tests/ls/no-arg +++ b/tests/ls/no-arg @@ -34,7 +34,6 @@ out symlink EOF -fail=0 ls -1 > out || fail=1 diff --git a/tests/ls/no-cap b/tests/ls/no-cap index c551f1745..c2ddf7507 100755 --- a/tests/ls/no-cap +++ b/tests/ls/no-cap @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh require_strace_ capget -fail=0 strace -e capget ls --color=always > /dev/null 2> out || fail=1 $EGREP 'capget\(' out || skip_test_ "your ls doesn't call capget" diff --git a/tests/ls/proc-selinux-segfault b/tests/ls/proc-selinux-segfault index 362e6fa3d..37caf6c87 100755 --- a/tests/ls/proc-selinux-segfault +++ b/tests/ls/proc-selinux-segfault @@ -26,7 +26,6 @@ fi f=/proc/sys test -r $f || f=. -fail=0 ls -l $f > out || fail=1 Exit $fail diff --git a/tests/ls/readdir-mountpoint-inode b/tests/ls/readdir-mountpoint-inode index 763cab186..c0214732a 100755 --- a/tests/ls/readdir-mountpoint-inode +++ b/tests/ls/readdir-mountpoint-inode @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 mount_points=$(df --local -P 2>&1 | sed -n 's,.*[0-9]% \(/.\),\1,p') test -z "$mount_points" && skip_test_ "this test requires a non-root mount point" diff --git a/tests/ls/recursive b/tests/ls/recursive index 5a9a4dd38..28f58f323 100755 --- a/tests/ls/recursive +++ b/tests/ls/recursive @@ -27,7 +27,6 @@ fi mkdir x y a b c a/1 a/2 a/3 || framework_failure touch f a/1/I a/1/II || framework_failure -fail=0 # This first example is from Andreas Schwab's bug report. ls -R1 a b c > out || fail=1 diff --git a/tests/ls/rt-1 b/tests/ls/rt-1 index 564eb3ef5..5ebced6a3 100755 --- a/tests/ls/rt-1 +++ b/tests/ls/rt-1 @@ -31,7 +31,6 @@ touch -d "$date" c || framework_failure touch -d "$date" a || framework_failure touch -d "$date" b || framework_failure -fail=0 ls -1t a b c > out || fail=1 cat <<EOF > exp diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype index 98642b3be..cdecd710d 100755 --- a/tests/ls/stat-dtype +++ b/tests/ls/stat-dtype @@ -44,7 +44,6 @@ chmod 600 d || framework_failure mkdir -p e/a2345 e/b || framework_failure chmod 600 e || framework_failure -fail=0 ls --file-type d > out || fail=1 cat <<\EOF > exp || fail=1 diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed index c134273a4..cb31a985d 100755 --- a/tests/ls/stat-failed +++ b/tests/ls/stat-failed @@ -29,7 +29,6 @@ mkdir d || framework_failure ln -s / d/s || framework_failure chmod 600 d || framework_failure -fail=0 ls -Log d > out test $? = 1 || fail=1 diff --git a/tests/ls/stat-free-symlinks b/tests/ls/stat-free-symlinks index 579362e7e..86d871e9f 100755 --- a/tests/ls/stat-free-symlinks +++ b/tests/ls/stat-free-symlinks @@ -28,7 +28,6 @@ touch x || framework_failure chmod a+x x || framework_failure ln -s x link-to-x || framework_failure -fail=0 # ls from coreutils 6.9 would unnecessarily stat a symlink in an unusual case: # When not coloring orphan and missing entries, and without ln=target, diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent index 9f2b14925..73d6e8351 100755 --- a/tests/ls/stat-vs-dirent +++ b/tests/ls/stat-vs-dirent @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 root_dev_ino=`stat --format=%d-%i /` t=`pwd` diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash index c2dd8e7a9..704e2a398 100755 --- a/tests/ls/symlink-slash +++ b/tests/ls/symlink-slash @@ -26,7 +26,6 @@ fi mkdir dir || framework_failure ln -s dir symlink || framework_failure -fail=0 set `ls -l symlink/` # Prior to fileutils-4.0k, the following would have output `... symlink -> dir'. diff --git a/tests/ls/x-option b/tests/ls/x-option index 5079885f1..ea94d49e7 100755 --- a/tests/ls/x-option +++ b/tests/ls/x-option @@ -27,7 +27,6 @@ mkdir subdir || framework_failure touch subdir/b || framework_failure touch subdir/a || framework_failure -fail=0 # Coreutils 6.8 and 6.9 would output this in the wrong order. ls -x subdir > out || fail=1 diff --git a/tests/misc/arch b/tests/misc/arch index 04bce0e1a..4e7ab0a27 100755 --- a/tests/misc/arch +++ b/tests/misc/arch @@ -24,7 +24,6 @@ if test "$VERBOSE" = yes; then arch --version fi -fail=0 arch > out || fail=1 uname -m > exp || fail=1 diff --git a/tests/misc/cat-buf b/tests/misc/cat-buf index 11d553a2b..34567a52b 100755 --- a/tests/misc/cat-buf +++ b/tests/misc/cat-buf @@ -30,7 +30,6 @@ fi # write separately. mkfifo fifo || framework_failure -fail=0 echo 1 > exp diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc index 8c1998726..3fac2d021 100755 --- a/tests/misc/cat-proc +++ b/tests/misc/cat-proc @@ -29,7 +29,6 @@ f=/proc/cpuinfo test -f $f \ || skip_test_ "no $f" -fail=0 # Yes, parts of /proc/cpuinfo might change between cat runs. # If that happens, consider choosing a file that's less likely to change, diff --git a/tests/misc/chcon b/tests/misc/chcon index 723bfd0f3..417163d27 100755 --- a/tests/misc/chcon +++ b/tests/misc/chcon @@ -14,7 +14,6 @@ skip_if_mcstransd_is_running_ mkdir -p d/sub/s2 || framework_failure touch f g d/sub/1 d/sub/2 || framework_failure -fail=0 # Set to a specified context. # Use root:object_r:tmp_t:s0. It is special in that diff --git a/tests/misc/chcon-fail b/tests/misc/chcon-fail index a9efbff75..148549a87 100755 --- a/tests/misc/chcon-fail +++ b/tests/misc/chcon-fail @@ -9,7 +9,6 @@ fi . $srcdir/test-lib.sh -fail=0 # neither context nor file chcon 2> /dev/null && fail=1 diff --git a/tests/misc/chroot-credentials b/tests/misc/chroot-credentials index f200f14ab..c06da55d7 100755 --- a/tests/misc/chroot-credentials +++ b/tests/misc/chroot-credentials @@ -26,7 +26,6 @@ fi require_root_ -fail=0 # Verify that root credentials are kept. test $(chroot / whoami) = root || fail=1 diff --git a/tests/misc/chroot-fail b/tests/misc/chroot-fail index 877ad0aec..38fd2844f 100755 --- a/tests/misc/chroot-fail +++ b/tests/misc/chroot-fail @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh -fail=0 # These tests verify exact status of internal failure; since none of # them actually run a command, we don't need root privileges diff --git a/tests/misc/close-stdout b/tests/misc/close-stdout index fe911d8a9..fec1addc8 100755 --- a/tests/misc/close-stdout +++ b/tests/misc/close-stdout @@ -26,7 +26,6 @@ fi p=$abs_top_builddir -fail=0 # Ensure these exit successfully, even though stdout is closed, # because they generate no output. diff --git a/tests/misc/csplit b/tests/misc/csplit index e4ba20e79..bf3865e49 100755 --- a/tests/misc/csplit +++ b/tests/misc/csplit @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # csplit could get a failed assertion to 2.0.17 (echo a; echo; echo) > in diff --git a/tests/misc/date-sec b/tests/misc/date-sec index ff19408ca..c3d2f8130 100755 --- a/tests/misc/date-sec +++ b/tests/misc/date-sec @@ -26,7 +26,6 @@ fi . $srcdir/test-lib.sh -fail=0 # It would be easier simply to sleep for two seconds between two runs # of `date --date="21:04 +0100" +%S` and ensure that both outputs diff --git a/tests/misc/df-P b/tests/misc/df-P index dcfeaa5a2..99d200ed7 100755 --- a/tests/misc/df-P +++ b/tests/misc/df-P @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 df -P . > t1 || fail=1 BLOCK_SIZE=1M df -P . > t2 || fail=1 diff --git a/tests/misc/env b/tests/misc/env index fb3be2994..ab6ee76d1 100755 --- a/tests/misc/env +++ b/tests/misc/env @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh -fail=0 # Verify clearing the environment a=1 diff --git a/tests/misc/env-null b/tests/misc/env-null index 432c6594e..031fbb076 100755 --- a/tests/misc/env-null +++ b/tests/misc/env-null @@ -25,7 +25,6 @@ fi . $srcdir/test-lib.sh -fail=0 # POSIX is clear that environ may, but need not be, sorted. # Environment variable values may contain newlines, which cannot be diff --git a/tests/misc/false-status b/tests/misc/false-status index 6b80f3b9e..5562230ea 100755 --- a/tests/misc/false-status +++ b/tests/misc/false-status @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 false --version > /dev/null && fail=1 false --help > /dev/null && fail=1 diff --git a/tests/misc/fmt-long-line b/tests/misc/fmt-long-line index bcabd9946..561a7534d 100755 --- a/tests/misc/fmt-long-line +++ b/tests/misc/fmt-long-line @@ -57,7 +57,6 @@ cat <<\EOF > exp || framework_failure y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y EOF -fail=0 fmt -s in > out || fail=1 diff --git a/tests/misc/groups-dash b/tests/misc/groups-dash index b2cb3bc45..05cb6ddf8 100755 --- a/tests/misc/groups-dash +++ b/tests/misc/groups-dash @@ -26,7 +26,6 @@ require_built_ groups # Coreutils 6.9 and earlier failed to display information on first argument # if later argument was --. -fail=0 groups none -- > out 2>&1 && fail=1 echo $? >> out groups -- none -- > exp 2>&1 && fail=1 diff --git a/tests/misc/groups-version b/tests/misc/groups-version index 41e3c7167..f39fe43be 100755 --- a/tests/misc/groups-version +++ b/tests/misc/groups-version @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh require_built_ groups -fail=0 groups --version | sed 's/^groups/id/; /^$/q' > out || fail=1 id --version | sed '/^$/q' > exp || fail=1 diff --git a/tests/misc/head-c b/tests/misc/head-c index a93e2cecc..06bd1ccd6 100755 --- a/tests/misc/head-c +++ b/tests/misc/head-c @@ -25,7 +25,6 @@ fi echo abc > in || framework_failure -fail=0 (head -c1; head -c1) < in > out || fail=1 case "`cat out`" in ab) ;; diff --git a/tests/misc/head-pos b/tests/misc/head-pos index a3aba32db..a40c76214 100755 --- a/tests/misc/head-pos +++ b/tests/misc/head-pos @@ -26,7 +26,6 @@ fi (echo a; echo b) > in || framework_failure -fail=0 (head -n 1 >/dev/null; cat) < in > out || fail=1 cat <<EOF > exp b diff --git a/tests/misc/help-version b/tests/misc/help-version index da559070f..602835602 100755 --- a/tests/misc/help-version +++ b/tests/misc/help-version @@ -43,7 +43,6 @@ expected_failure_status_dir=2 expected_failure_status_ls=2 expected_failure_status_vdir=2 -fail=0 test "$built_programs" \ || { echo "$this_test: no programs built!?!" 1>&2; Exit $fail; } diff --git a/tests/misc/id-context b/tests/misc/id-context index c6c5e8920..4ccf3358b 100755 --- a/tests/misc/id-context +++ b/tests/misc/id-context @@ -24,7 +24,6 @@ fi # Require selinux - when selinux is disabled, id never prints scontext. require_selinux_ -fail=0 # Check without specified user, context string should be present. id | grep context= >/dev/null || fail=1 diff --git a/tests/misc/id-groups b/tests/misc/id-groups index dc0f54c29..83924ef77 100755 --- a/tests/misc/id-groups +++ b/tests/misc/id-groups @@ -22,7 +22,6 @@ fi . $srcdir/test-lib.sh -fail=0 id -G $(id -nu) || fail=1 Exit $fail diff --git a/tests/misc/ls-time b/tests/misc/ls-time index abdd42932..67cbab96a 100755 --- a/tests/misc/ls-time +++ b/tests/misc/ls-time @@ -46,7 +46,6 @@ touch -a -d "$u2" b || framework_failure sleep 2 touch -a -d "$u1" a || framework_failure -fail=0 # A has ctime more recent than C. set `ls -c a c` diff --git a/tests/misc/md5sum-parallel b/tests/misc/md5sum-parallel index f37631f69..625e66e47 100755 --- a/tests/misc/md5sum-parallel +++ b/tests/misc/md5sum-parallel @@ -24,7 +24,6 @@ if test "$VERBOSE" = yes; then md5sum --version fi -fail=0 (mkdir tmp && cd tmp && seq 500 | xargs touch) diff --git a/tests/misc/mknod b/tests/misc/mknod index 0f3de38ad..ccec5bcf5 100755 --- a/tests/misc/mknod +++ b/tests/misc/mknod @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 umask 777 diff --git a/tests/misc/nice b/tests/misc/nice index f85666e34..30a88fec6 100755 --- a/tests/misc/nice +++ b/tests/misc/nice @@ -56,7 +56,6 @@ else skip_test_ "this test must be run at nice level 0" fi -fail=0 while :; do test_name=$1 args=$2 diff --git a/tests/misc/nice-fail b/tests/misc/nice-fail index 7a1bbe8ec..c621ceaaa 100755 --- a/tests/misc/nice-fail +++ b/tests/misc/nice-fail @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh -fail=0 # These tests verify exact status of internal failure. nice -n 1 # missing command diff --git a/tests/misc/nl b/tests/misc/nl index 2c4703c71..a0fd10c1e 100755 --- a/tests/misc/nl +++ b/tests/misc/nl @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 echo a | nl > out || fail=1 echo b | nl -s%n >> out || fail=1 diff --git a/tests/misc/nohup b/tests/misc/nohup index 96810588e..06e9ab482 100755 --- a/tests/misc/nohup +++ b/tests/misc/nohup @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 nohup sh -c 'echo stdout; echo stderr 1>&2' 2>err || fail=1 diff --git a/tests/misc/od-N b/tests/misc/od-N index cf4185a26..df1c997bf 100755 --- a/tests/misc/od-N +++ b/tests/misc/od-N @@ -25,7 +25,6 @@ fi echo abcdefg > in || framework_failure -fail=0 (od -An -N3 -c; od -An -N3 -c) < in > out cat <<EOF > exp || fail=1 diff --git a/tests/misc/od-multiple-t b/tests/misc/od-multiple-t index 8d049ec5b..3ab313468 100755 --- a/tests/misc/od-multiple-t +++ b/tests/misc/od-multiple-t @@ -29,7 +29,6 @@ fi seq 19 > in || framework_failure test `wc -c < in` -eq 48 || framework_failure -fail=0 list='a c dC dS dI dL oC oS oI oL uC uS uI uL xC xS xI xL fF fD fL' for format1 in $list; do diff --git a/tests/misc/od-x8 b/tests/misc/od-x8 index 6cb56921a..00190484e 100755 --- a/tests/misc/od-x8 +++ b/tests/misc/od-x8 @@ -29,7 +29,6 @@ od -t x8 /dev/null >/dev/null || echo abcdefgh |tr -d '\n' > in || framework_failure -fail=0 od -An -t x8 in > out-raw || fail=1 sed 's/^ //;s/\(..\)/\1 /g;s/ $//' out-raw \ diff --git a/tests/misc/pathchk1 b/tests/misc/pathchk1 index 3e3d97c9a..4f98336ad 100755 --- a/tests/misc/pathchk1 +++ b/tests/misc/pathchk1 @@ -26,7 +26,6 @@ skip_if_root_ touch file || framework_failure -fail=0 # This should exit nonzero. Before 2.0.13, it gave a diagnostic, # but exited successfully. diff --git a/tests/misc/printenv b/tests/misc/printenv index bc51fca0b..c2bd2e424 100755 --- a/tests/misc/printenv +++ b/tests/misc/printenv @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # Without arguments, printenv behaves like env. Some shells provide # printenv as a builtin, so we must test via absolute name. diff --git a/tests/misc/printf b/tests/misc/printf index 8961b4433..14682dc7d 100755 --- a/tests/misc/printf +++ b/tests/misc/printf @@ -26,7 +26,6 @@ fi . $srcdir/test-lib.sh getlimits_ -fail=0 # Verify the 3 methods of specifying "Escape": test $("$prog" "\x1b\n\33\n\e\n" | uniq -u) && fail=1 diff --git a/tests/misc/printf-hex b/tests/misc/printf-hex index cf272f08b..36fd32663 100755 --- a/tests/misc/printf-hex +++ b/tests/misc/printf-hex @@ -26,7 +26,6 @@ fi . $srcdir/test-lib.sh -fail=0 "$prog" '\x7e3\n' > out || fail=1 cat <<\EOF > exp diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise index d50d9e859..5f1923e90 100755 --- a/tests/misc/printf-surprise +++ b/tests/misc/printf-surprise @@ -26,7 +26,6 @@ fi . $srcdir/test-lib.sh require_ulimit_ -fail=0 # Up to coreutils-6.9, "printf %.Nf 0" would encounter an ENOMEM internal # error from glibc's printf(3) function whenever N was large relative to diff --git a/tests/misc/ptx-overrun b/tests/misc/ptx-overrun index 038109d57..81147e32d 100755 --- a/tests/misc/ptx-overrun +++ b/tests/misc/ptx-overrun @@ -28,7 +28,6 @@ fi f=01234567890123456789012345678901234567890123456789 touch $f empty || framework_failure -fail=0 # Specifying a regular expression ending in a lone backslash # would cause ptx to write beyond the end of a malloc'd buffer. diff --git a/tests/misc/pwd-option b/tests/misc/pwd-option index 6c0242118..35546f781 100755 --- a/tests/misc/pwd-option +++ b/tests/misc/pwd-option @@ -35,7 +35,6 @@ test "x$PWD" = "x$base" || framework_failure cd c || framework_failure test "x$PWD" = "x$base/c" || skip_test_ "cd does not properly update \$PWD" -fail=0 env -- pwd -L > out || fail=1 printf %s\\n "$base/c" > exp || fail=1 diff --git a/tests/misc/pwd-unreadable-parent b/tests/misc/pwd-unreadable-parent index f5c7ae237..2f2e599a4 100755 --- a/tests/misc/pwd-unreadable-parent +++ b/tests/misc/pwd-unreadable-parent @@ -38,7 +38,6 @@ mkdir -p a/b || framework_failure cd a/b || framework_failure chmod a=x .. || framework_failure -fail=0 env -- pwd > exp || fail=1 readlink -ev . > out || fail=1 diff --git a/tests/misc/readlink-fp-loop b/tests/misc/readlink-fp-loop index b6d1c81b1..507c9d140 100755 --- a/tests/misc/readlink-fp-loop +++ b/tests/misc/readlink-fp-loop @@ -35,7 +35,6 @@ mkdir d || framework_failure echo 2 > d/2 || framework_failure ln -s ../s/2 d/1 || framework_failure -fail=0 # With coreutils-6.9, this would fail with ELOOP. readlink -v -e p/1 > out || fail=1 # readlink -e d/2 > exp || fail=1 diff --git a/tests/misc/runcon-no-reorder b/tests/misc/runcon-no-reorder index 85fe745b7..4aaa414e0 100755 --- a/tests/misc/runcon-no-reorder +++ b/tests/misc/runcon-no-reorder @@ -26,7 +26,6 @@ fi diag='runcon: runcon may be used only on a SELinux kernel' echo "$diag" > exp || framework_failure -fail=0 # This test works even on systems without SELinux. # On such a system it fails with the above diagnostic, which is fine. diff --git a/tests/misc/selinux b/tests/misc/selinux index 8211c80f7..a56ad0612 100755 --- a/tests/misc/selinux +++ b/tests/misc/selinux @@ -20,7 +20,6 @@ touch f || framework_failure mkdir d s1 s2 || framework_failure mkfifo p || framework_failure -fail=0 # special context that works both with and without mcstransd ctx=root:object_r:tmp_t:s0 diff --git a/tests/misc/seq-long-double b/tests/misc/seq-long-double index 6990f651a..165608660 100755 --- a/tests/misc/seq-long-double +++ b/tests/misc/seq-long-double @@ -44,7 +44,6 @@ $CC -c long.c \ a=$INTMAX_MAX b=$INTMAX_OFLOW -fail=0 seq $a $b > out || fail=1 printf "$a\n$b\n" > exp || fail=1 compare out exp || fail=1 diff --git a/tests/misc/shred-exact b/tests/misc/shred-exact index ed9d10524..e25b4c091 100755 --- a/tests/misc/shred-exact +++ b/tests/misc/shred-exact @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 for opt in --exact --zero; do echo a > a || fail=1 diff --git a/tests/misc/shred-passes b/tests/misc/shred-passes index 712c7bd67..b37392ebf 100755 --- a/tests/misc/shred-passes +++ b/tests/misc/shred-passes @@ -35,7 +35,6 @@ shred: f: removing shred: f: renamed to 0 shred: f: removed" > exp || framework_failure -fail=0 shred -v -u f 2>out || fail=1 diff --git a/tests/misc/shred-remove b/tests/misc/shred-remove index f0fd5f9c3..6ffe9bdd0 100755 --- a/tests/misc/shred-remove +++ b/tests/misc/shred-remove @@ -31,7 +31,6 @@ file=0123456789 touch $file || framework_failure chmod u-w $file || framework_failure -fail=0 # This would take so long that it appears to infloop # when using version from fileutils-4.0k. diff --git a/tests/misc/shuf b/tests/misc/shuf index 3013aaecc..a79441419 100755 --- a/tests/misc/shuf +++ b/tests/misc/shuf @@ -25,7 +25,6 @@ fi seq 100 > in || framework_failure -fail=0 shuf in >out || fail=1 # Fail if the input is the same as the output. diff --git a/tests/misc/sort-compress b/tests/misc/sort-compress index 7e319ca8e..7e4278e51 100755 --- a/tests/misc/sort-compress +++ b/tests/misc/sort-compress @@ -30,7 +30,6 @@ SORT="$abs_top_builddir/src/sort" # Ensure that $TMPDIR is valid. TMPDIR=.; export TMPDIR -fail=0 # This should force the use of temp files sort -S 1k in > out || fail=1 diff --git a/tests/misc/sort-continue b/tests/misc/sort-continue index 8b206f35c..d45eb53e8 100755 --- a/tests/misc/sort-continue +++ b/tests/misc/sort-continue @@ -31,7 +31,6 @@ for i in $(seq 31); do echo $i | tee -a in > __test.$i || framework_failure done -fail=0 ( ulimit -n 6 diff --git a/tests/misc/sort-merge-fdlimit b/tests/misc/sort-merge-fdlimit index 82305be41..3071613aa 100755 --- a/tests/misc/sort-merge-fdlimit +++ b/tests/misc/sort-merge-fdlimit @@ -27,7 +27,6 @@ require_ulimit_ mkdir in err || framework_failure -fail=0 for i in `seq 17`; do echo $i >in/$i diff --git a/tests/misc/sort-rand b/tests/misc/sort-rand index a9027d24c..071ad85a4 100755 --- a/tests/misc/sort-rand +++ b/tests/misc/sort-rand @@ -25,7 +25,6 @@ fi seq 100 > in || framework_failure -fail=0 sort --random-sort in > out || fail=1 diff --git a/tests/misc/sort-version b/tests/misc/sort-version index 32b0ed258..e046c3be1 100755 --- a/tests/misc/sort-version +++ b/tests/misc/sort-version @@ -105,7 +105,6 @@ cat > exp <<- _EOF_ string start 5.90.0 end of str _EOF_ -fail=0 sort --sort=version -o out in || fail=1 compare exp out || fail=1 Exit $fail diff --git a/tests/misc/split-a b/tests/misc/split-a index 88d225a1d..37cd3cd0f 100755 --- a/tests/misc/split-a +++ b/tests/misc/split-a @@ -41,7 +41,6 @@ done > exp || framework_failure echo split: output file suffixes exhausted \ > exp-too-short || framework_failure -fail=0 # This should fail. split -b 1 -a 1 in 2> err && fail=1 diff --git a/tests/misc/split-fail b/tests/misc/split-fail index ad38e6037..70ee0c009 100755 --- a/tests/misc/split-fail +++ b/tests/misc/split-fail @@ -26,7 +26,6 @@ getlimits_ touch in || framework_failure -fail=0 split -a 0 in 2> /dev/null || fail=1 split -b 0 in 2> /dev/null && fail=1 diff --git a/tests/misc/split-l b/tests/misc/split-l index 808a3447d..f6cf467cf 100755 --- a/tests/misc/split-l +++ b/tests/misc/split-l @@ -25,7 +25,6 @@ fi printf '1\n2\n3\n4\n5\n' > in || framework_failure -fail=0 split --lines=2 in > out || fail=1 cat <<\EOF > exp-1 1 diff --git a/tests/misc/stat-fmt b/tests/misc/stat-fmt index 67dac8baa..4ffc4c7e4 100755 --- a/tests/misc/stat-fmt +++ b/tests/misc/stat-fmt @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh -fail=0 for i in `seq 50`; do fmt=`printf "%${i}s" %` diff --git a/tests/misc/stat-hyphen b/tests/misc/stat-hyphen index f0757fe39..b9a155670 100755 --- a/tests/misc/stat-hyphen +++ b/tests/misc/stat-hyphen @@ -26,7 +26,6 @@ fi printf -- '-\n' > exp || framework_failure touch f || framework_failure -fail=0 stat --format=%n - < f > out || fail=1 stat -f - < f && fail=1 diff --git a/tests/misc/stat-slash b/tests/misc/stat-slash index cda94c544..cea8dcb16 100755 --- a/tests/misc/stat-slash +++ b/tests/misc/stat-slash @@ -35,7 +35,6 @@ directory directory EOF -fail=0 # This failed on Solaris 9 for coreutils 8.0. stat --format=%n link1 > out || fail=1 stat --format=%n link1/ >> out && fail=1 diff --git a/tests/misc/stdbuf b/tests/misc/stdbuf index 90e45d7f0..b6e52a499 100755 --- a/tests/misc/stdbuf +++ b/tests/misc/stdbuf @@ -40,7 +40,6 @@ esac # write separately. mkfifo fifo || framework_failure -fail=0 # Verify input parameter checking stdbuf -o1 true || fail=1 # verify size syntax diff --git a/tests/misc/stty b/tests/misc/stty index a7f93ca75..cb3fee533 100755 --- a/tests/misc/stty +++ b/tests/misc/stty @@ -40,7 +40,6 @@ REV_ctlecho=1 REV_echoke=1 REV_crtkill=1 REV_evenp=1 REV_parity=1 REV_oddp=1 REV_nl=1 REV_cooked=1 REV_raw=1 REV_pass8=1 REV_litout=1 REV_cbreak=1 REV_decctlq=1 REV_tabs=1 REV_lcase=1 REV_LCASE=1 -fail=0 saved_state=.saved-state stty --save > $saved_state || fail=1 diff --git a/tests/misc/stty-invalid b/tests/misc/stty-invalid index d9f077779..638024f7b 100755 --- a/tests/misc/stty-invalid +++ b/tests/misc/stty-invalid @@ -25,7 +25,6 @@ fi require_controlling_input_terminal_ trap '' TTOU # Ignore SIGTTOU -fail=0 saved_state=`stty -g` || fail=1 stty $saved_state || fail=1 diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col index c98ab15e7..5efc7dd0a 100755 --- a/tests/misc/stty-row-col +++ b/tests/misc/stty-row-col @@ -60,7 +60,6 @@ set $tests saved_size=`stty size` && test -n "$saved_size" \ || skip_test_ "can't get window size" -fail=0 while :; do test_name=$1 args=$2 diff --git a/tests/misc/su-fail b/tests/misc/su-fail index f00edc95b..473c76306 100755 --- a/tests/misc/su-fail +++ b/tests/misc/su-fail @@ -24,7 +24,6 @@ if test "$VERBOSE" = yes; then su --version fi -fail=0 # Very little that we can test without a root password su --- / true # unknown option diff --git a/tests/misc/sum-sysv b/tests/misc/sum-sysv index 918c00ee7..6a1c63e82 100755 --- a/tests/misc/sum-sysv +++ b/tests/misc/sum-sysv @@ -32,7 +32,6 @@ export LC_ALL . $srcdir/test-lib.sh -fail=0 # FYI, 16843009 is floor (2^32 / 255). diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue index d385660cf..afdc79f6d 100755 --- a/tests/misc/tac-continue +++ b/tests/misc/tac-continue @@ -54,7 +54,6 @@ fi seq 5 > in -fail=0 # Give tac a fifo command line argument. # This makes it try to create a temporary file in $TMPDIR. diff --git a/tests/misc/tee b/tests/misc/tee index 86eca7d05..7a76d64ca 100755 --- a/tests/misc/tee +++ b/tests/misc/tee @@ -26,7 +26,6 @@ fi echo line >sample || framework_failure nums=`seq 9` || framework_failure -fail=0 for n in 0 $nums; do files=`seq $n` rm -f $files diff --git a/tests/misc/tee-dash b/tests/misc/tee-dash index 5dbb5c4e3..ecf414ccf 100755 --- a/tests/misc/tee-dash +++ b/tests/misc/tee-dash @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 tee - </dev/null || fail=1 Exit $fail diff --git a/tests/misc/timeout b/tests/misc/timeout index 08734e6f2..77a42053b 100755 --- a/tests/misc/timeout +++ b/tests/misc/timeout @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # no timeout timeout 1 true || fail=1 diff --git a/tests/misc/timeout-parameters b/tests/misc/timeout-parameters index 02b63a767..c8b1eff5b 100755 --- a/tests/misc/timeout-parameters +++ b/tests/misc/timeout-parameters @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh getlimits_ -fail=0 # internal errors are 125, distinct from execution failure diff --git a/tests/misc/truncate-dangling-symlink b/tests/misc/truncate-dangling-symlink index dd63b2017..73e202138 100755 --- a/tests/misc/truncate-dangling-symlink +++ b/tests/misc/truncate-dangling-symlink @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh ln -s truncate-target t-symlink -fail=0 truncate -s0 t-symlink || fail=1 diff --git a/tests/misc/truncate-fail-diag b/tests/misc/truncate-fail-diag index 7472c2e7f..aace90ab1 100755 --- a/tests/misc/truncate-fail-diag +++ b/tests/misc/truncate-fail-diag @@ -28,7 +28,6 @@ fi . $srcdir/test-lib.sh skip_if_root_ -fail=0 d1=no diff --git a/tests/misc/truncate-fifo b/tests/misc/truncate-fifo index a521a82e9..aef44173c 100755 --- a/tests/misc/truncate-fifo +++ b/tests/misc/truncate-fifo @@ -25,7 +25,6 @@ fi mkfifo_or_skip_ "fifo" -fail=0 truncate -s0 "fifo" || fail=1 diff --git a/tests/misc/truncate-no-create-missing b/tests/misc/truncate-no-create-missing index 346e04ec6..f0ab06e7e 100755 --- a/tests/misc/truncate-no-create-missing +++ b/tests/misc/truncate-no-create-missing @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # truncate -c no-such-file should not fail. truncate -s0 -c no-such-file || fail=1 diff --git a/tests/misc/truncate-overflow b/tests/misc/truncate-overflow index 2b16f0113..afd12a5f1 100755 --- a/tests/misc/truncate-overflow +++ b/tests/misc/truncate-overflow @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh getlimits_ -fail=0 # -= overflow truncate -s-1 create-zero-len-file || fail=1 diff --git a/tests/misc/truncate-owned-by-other b/tests/misc/truncate-owned-by-other index 61cbe8b50..c7bdf61c2 100755 --- a/tests/misc/truncate-owned-by-other +++ b/tests/misc/truncate-owned-by-other @@ -35,7 +35,6 @@ chmod g+w root-owned # Ensure that the current directory is searchable by $NON_ROOT_USERNAME. chmod g+x . -fail=0 setuidgid $NON_ROOT_USERNAME env PATH="$PATH" truncate -s0 root-owned || fail=1 Exit $fail diff --git a/tests/misc/truncate-parameters b/tests/misc/truncate-parameters index 8bef6d106..ce3f8ac5f 100755 --- a/tests/misc/truncate-parameters +++ b/tests/misc/truncate-parameters @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # must specify at least 1 file truncate --size=0 && fail=1 diff --git a/tests/misc/truncate-relative b/tests/misc/truncate-relative index 9916ec615..976eeb84d 100755 --- a/tests/misc/truncate-relative +++ b/tests/misc/truncate-relative @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # mixture of relative modifiers not allowed truncate --size="+>0" file && fail=1 diff --git a/tests/misc/wc-files0 b/tests/misc/wc-files0 index 3da8fcdfa..1d1d7650c 100755 --- a/tests/misc/wc-files0 +++ b/tests/misc/wc-files0 @@ -27,7 +27,6 @@ echo 2 > 2b || framework_failure echo 2 words > 2w || framework_failure printf '2b\n2w\n' |tr '\n' '\0' > names || framework_failure -fail=0 wc --files0-from=names > out || fail=1 cat <<\EOF > exp || fail=1 diff --git a/tests/misc/xattr b/tests/misc/xattr index fcf7ceb79..ed08955f0 100755 --- a/tests/misc/xattr +++ b/tests/misc/xattr @@ -55,7 +55,6 @@ getfattr -d a >out_a || skip_test_ "failed to get xattr of file" grep -F "$xattr_pair" out_a \ || skip_test_ "failed to set xattr of file" -fail=0 # cp should not preserve xattr by default cp a b || fail=1 diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1 index 1d4cb17fb..1cb5cab44 100755 --- a/tests/mkdir/p-1 +++ b/tests/mkdir/p-1 @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 mkdir --parents "`pwd`/t" || fail=1 test -d t || fail=1 diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2 index 9a75112ef..2320da1c1 100755 --- a/tests/mkdir/p-2 +++ b/tests/mkdir/p-2 @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 mkdir --parents "`pwd`/t/u" || fail=1 test -d t/u || fail=1 diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3 index 06207b269..df1c56d32 100755 --- a/tests/mkdir/p-3 +++ b/tests/mkdir/p-3 @@ -30,7 +30,6 @@ mkdir no-access || framework_failure mkdir no-acce2s || framework_failure mkdir -p no-acce3s/d || framework_failure -fail=0 p=`pwd` (cd no-access && chmod 0 . && mkdir -p "$p/a/b" u/v) 2> /dev/null && fail=1 test -d "$p/a/b" || fail=1 diff --git a/tests/mkdir/p-slashdot b/tests/mkdir/p-slashdot index 4d2674e4b..a5b9f6691 100755 --- a/tests/mkdir/p-slashdot +++ b/tests/mkdir/p-slashdot @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 mkdir -p d1/. || fail=1 test -d d1 || fail=1 diff --git a/tests/mkdir/p-thru-slink b/tests/mkdir/p-thru-slink index 30df4fe59..e39d0b988 100755 --- a/tests/mkdir/p-thru-slink +++ b/tests/mkdir/p-thru-slink @@ -25,7 +25,6 @@ fi ln -s . slink || framework_failure -fail=0 mkdir -p slink/x || fail=1 test -d x || fail=1 diff --git a/tests/mkdir/p-v b/tests/mkdir/p-v index 5f2468e0d..0d3232285 100755 --- a/tests/mkdir/p-v +++ b/tests/mkdir/p-v @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 mkdir -pv foo/a/b/c/d >out || fail=1 diff - out <<\EOF diff --git a/tests/mkdir/parents b/tests/mkdir/parents index 69ab38c46..941177506 100755 --- a/tests/mkdir/parents +++ b/tests/mkdir/parents @@ -26,7 +26,6 @@ skip_if_setgid_ mkdir -m 700 e-dir || framework_failure -fail=0 # Make sure `mkdir -p existing-dir' succeeds # and that `mkdir existing-dir' fails. diff --git a/tests/mkdir/perm b/tests/mkdir/perm index af2bdcd63..370de2453 100755 --- a/tests/mkdir/perm +++ b/tests/mkdir/perm @@ -27,7 +27,6 @@ skip_if_setgid_ working_umask_or_skip_ -fail=0 # parent parent/dir # umask -m option resulting perm resulting perm diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux index d872cb6d1..ddd237cdb 100755 --- a/tests/mkdir/selinux +++ b/tests/mkdir/selinux @@ -33,7 +33,6 @@ require_selinux_enforcing_ c=invalid-selinux-context msg="failed to set default file creation context to \`$c':" -fail=0 # Test each of mkdir, mknod, mkfifo with "-Z invalid-context". for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1 index d1af121da..4956c20e9 100755 --- a/tests/mkdir/special-1 +++ b/tests/mkdir/special-1 @@ -26,7 +26,6 @@ fi set_mode_string=u=rwx,g=rx,o=w,-s,+t output_mode_string=drwxr-x-wT -fail=0 tmp=t mkdir -m$set_mode_string $tmp || fail=1 diff --git a/tests/mkdir/t-slash b/tests/mkdir/t-slash index 3214bf4f4..4213784df 100755 --- a/tests/mkdir/t-slash +++ b/tests/mkdir/t-slash @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh -fail=0 mkdir -p dir/ || fail=1 test -d dir || fail=1 diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly index 9c886842b..5df2de198 100755 --- a/tests/mkdir/writable-under-readonly +++ b/tests/mkdir/writable-under-readonly @@ -37,7 +37,6 @@ skip_test_ temporarily disabled # FIXME: define cleanup_ to do the umount -fail=0 # FIXME: use mktemp cd /tmp \ && dd if=/dev/zero of=1 bs=8192 count=50 \ diff --git a/tests/mv/acl b/tests/mv/acl index e9fb62679..5ad8de052 100755 --- a/tests/mv/acl +++ b/tests/mv/acl @@ -48,7 +48,6 @@ acl1=`getfacl file` || skip_partition=. test $skip_partition != none && skip_test_ "'$skip' is not on a suitable file system for this test" -fail=0 # move the access acl of a file mv file "$other_partition_tmpdir" || fail=1 acl2=`cd "$other_partition_tmpdir" && getfacl file` || framework_failure diff --git a/tests/mv/atomic b/tests/mv/atomic index 8dd22659d..ef78d5281 100755 --- a/tests/mv/atomic +++ b/tests/mv/atomic @@ -35,7 +35,6 @@ require_strace_ unlink ln -s t1 s1 || framework_failure ln -s t2 s2 || framework_failure -fail=0 strace -qe unlink mv -T s1 s2 > out 2>&1 || fail=1 $EGREP 'unlink.*"s1"' out && fail=1 diff --git a/tests/mv/atomic2 b/tests/mv/atomic2 index ae1b6e95f..5dd3f3568 100755 --- a/tests/mv/atomic2 +++ b/tests/mv/atomic2 @@ -35,7 +35,6 @@ require_strace_ unlink touch a b || framework_failure ln b b2 || framework_failure -fail=0 strace -qe unlink mv a b > out 2>&1 || fail=1 $EGREP 'unlink.*"b"' out && fail=1 diff --git a/tests/mv/backup-dir b/tests/mv/backup-dir index e70ce8571..64616440d 100755 --- a/tests/mv/backup-dir +++ b/tests/mv/backup-dir @@ -26,7 +26,6 @@ fi mkdir A B || framework_failure touch X Y || framework_failure -fail=0 # Before coreutils-6.2, the " (backup: `B.~1~')" suffix was not printed. mv --verbose --backup=numbered -T A B > out || fail=1 diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src index 7d80078f2..df6561baf 100755 --- a/tests/mv/backup-is-src +++ b/tests/mv/backup-is-src @@ -32,7 +32,6 @@ rm -f "$a" "$a2" || framework_failure echo a > "$a" || framework_failure echo a2 > "$a2" || framework_failure -fail=0 # This mv command should exit nonzero. mv --b=simple "$a2" "$a" > out 2>&1 && fail=1 diff --git a/tests/mv/childproof b/tests/mv/childproof index 2f264b45f..ff51a0924 100755 --- a/tests/mv/childproof +++ b/tests/mv/childproof @@ -32,7 +32,6 @@ mkdir a b c || framework_failure echo a > a/f || framework_failure echo b > b/f || framework_failure -fail=0 cp a/f b/f c 2> /dev/null && fail=1 test -f a/f || fail=1 diff --git a/tests/mv/diag b/tests/mv/diag index 75904d626..6e28fa463 100755 --- a/tests/mv/diag +++ b/tests/mv/diag @@ -28,7 +28,6 @@ touch f1 || framework_failure touch f2 || framework_failure touch d || framework_failure -fail=0 # These mv commands should all exit nonzero. # Too few args. This first one did fail, but with an incorrect diagnostic diff --git a/tests/mv/dir-file b/tests/mv/dir-file index 629ddb584..13d1419a4 100755 --- a/tests/mv/dir-file +++ b/tests/mv/dir-file @@ -26,7 +26,6 @@ fi mkdir -p dir/file || framework_failure > file || framework_failure -fail=0 # These should both fail, but until fileutils-4.0q only the second one did. mv dir file > /dev/null 2>&1 && fail=1 diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir index cf161dac5..24afc1ed5 100755 --- a/tests/mv/dir2dir +++ b/tests/mv/dir2dir @@ -27,7 +27,6 @@ fi mkdir -p a/t b/t || framework_failure touch a/t/f || framework_failure -fail=0 # Expect this to fail with the expected diagnostic. # For an interrim (pre-6.0) release, it would give an erroneous diff --git a/tests/mv/dup-source b/tests/mv/dup-source index 342fe4572..e7fb089de 100755 --- a/tests/mv/dup-source +++ b/tests/mv/dup-source @@ -28,7 +28,6 @@ fi . $srcdir/test-lib.sh skip_if_root_ -fail=0 for i in cp; do diff --git a/tests/mv/force b/tests/mv/force index df4397050..88851ac59 100755 --- a/tests/mv/force +++ b/tests/mv/force @@ -29,7 +29,6 @@ ff2=mvforce2 echo force-contents > $ff || framework_failure ln $ff $ff2 || framework_failure -fail=0 # This mv command should exit nonzero. mv $ff $ff > out 2>&1 && fail=1 diff --git a/tests/mv/hard-2 b/tests/mv/hard-2 index 8822700a3..1bd173e99 100755 --- a/tests/mv/hard-2 +++ b/tests/mv/hard-2 @@ -32,7 +32,6 @@ touch a || framework_failure ln a b || framework_failure ln a c || framework_failure -fail=0 # ====================================== cp --preserve=link a b c dst || fail=1 diff --git a/tests/mv/hard-3 b/tests/mv/hard-3 index c2ff815c6..fbd7cc8a6 100755 --- a/tests/mv/hard-3 +++ b/tests/mv/hard-3 @@ -45,7 +45,6 @@ touch a || framework_failure ln a x/b || framework_failure ln a c || framework_failure -fail=0 # ====================================== # This must fail -- because x/b cannot be unlinked. diff --git a/tests/mv/hard-4 b/tests/mv/hard-4 index 9a8c832ea..05fba29fc 100755 --- a/tests/mv/hard-4 +++ b/tests/mv/hard-4 @@ -25,7 +25,6 @@ fi touch a || framework_failure ln a b || framework_failure -fail=0 mv a b || fail=1 diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1 index d626f3cc0..2df2cf3ff 100755 --- a/tests/mv/hard-link-1 +++ b/tests/mv/hard-link-1 @@ -32,7 +32,6 @@ mkdir $dir || framework_failure > $dir/a || framework_failure ln $dir/a $dir/b || framework_failure -fail=0 mv $dir "$other_partition_tmpdir" || fail=1 # Display inode numbers, one per line. diff --git a/tests/mv/hard-verbose b/tests/mv/hard-verbose index db7cdb2c4..0c9198c79 100755 --- a/tests/mv/hard-verbose +++ b/tests/mv/hard-verbose @@ -26,7 +26,6 @@ fi touch x || framework_failure ln x y || framework_failure -fail=0 mv --verbose x y > out || fail=1 cat <<\EOF > exp || fail=1 diff --git a/tests/mv/i-2 b/tests/mv/i-2 index 05ced50d0..3c56e31a8 100755 --- a/tests/mv/i-2 +++ b/tests/mv/i-2 @@ -35,7 +35,6 @@ done chmod 0 b d f h || framework_failure echo y > y || framework_failure -fail=0 mv -if a b || fail=1 mv -fi c d < y >/dev/null 2>&1 || fail=1 diff --git a/tests/mv/i-3 b/tests/mv/i-3 index 738605bd0..bfb2a31e4 100755 --- a/tests/mv/i-3 +++ b/tests/mv/i-3 @@ -30,7 +30,6 @@ trap '' TTIN # Ignore SIGTTIN touch f g h i || framework_failure chmod 0 g i || framework_failure -fail=0 ls /dev/stdin >/dev/null 2>&1 \ || skip_test_ 'there is no /dev/stdin file' diff --git a/tests/mv/i-4 b/tests/mv/i-4 index bdc353c5b..8eaf2d6ae 100755 --- a/tests/mv/i-4 +++ b/tests/mv/i-4 @@ -28,7 +28,6 @@ for i in a b; do done echo y > y || framework_failure -fail=0 mv -i a b < y >/dev/null 2>&1 || fail=1 # Make sure out contains the prompt. diff --git a/tests/mv/i-5 b/tests/mv/i-5 index 0c99bac67..342e66ce1 100755 --- a/tests/mv/i-5 +++ b/tests/mv/i-5 @@ -26,7 +26,6 @@ fi mkdir a || framework_failure touch b || framework_failure -fail=0 # coreutils 6.2 mv would neglect to prompt in this case. echo n | mv -i a b 2>/dev/null || fail=1 diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no index 031e80761..7a8506408 100755 --- a/tests/mv/i-link-no +++ b/tests/mv/i-link-no @@ -31,7 +31,6 @@ ln b/FUBAR b/bar || framework_failure chmod a-w b/bar || framework_failure echo n > no || framework_failure -fail=0 mv a/bar a/foo b < no > out 2> err || fail=1 touch exp diff --git a/tests/mv/into-self b/tests/mv/into-self index 84b41eebe..f4f598a1b 100755 --- a/tests/mv/into-self +++ b/tests/mv/into-self @@ -30,7 +30,6 @@ rm -rf $dir $file || framework_failure mkdir -p $dir/a/b || framework_failure touch $file || framework_failure -fail=0 # This mv command should fail. mv $dir $file $dir > out 2>&1 && fail=1 diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2 index 1b3e6b7b3..3c3e7e2d0 100755 --- a/tests/mv/into-self-2 +++ b/tests/mv/into-self-2 @@ -30,7 +30,6 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; } file="$other_partition_tmpdir/file" symlink=symlink -fail=0 echo whatever > $file || framework_failure ln -s $file $symlink || framework_failure diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3 index e5a4f8d30..b9fa41af4 100755 --- a/tests/mv/into-self-3 +++ b/tests/mv/into-self-3 @@ -28,7 +28,6 @@ dir2=is3-dir2 mkdir $dir1 $dir2 || framework_failure -fail=0 # This mv command should exit nonzero. mv $dir1 $dir2 $dir2 > out 2>&1 && fail=1 diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4 index baef23ad8..6b29fff42 100755 --- a/tests/mv/into-self-4 +++ b/tests/mv/into-self-4 @@ -27,7 +27,6 @@ fi touch file || framework_failure ln -s file s || framework_failure -fail=0 # This must fail. mv s s 2> /dev/null && fail=1 diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd index 76a6b439a..86cfbcd78 100755 --- a/tests/mv/leak-fd +++ b/tests/mv/leak-fd @@ -48,7 +48,6 @@ sed 's,$,/f,' .dirs | xargs touch last_file=`tail -n1 .dirs`/f test -f $last_file || framework_failure -fail=0 mv * "$other_partition_tmpdir" || fail=1 test -f $last_file/f && fail=1 diff --git a/tests/mv/mv-n b/tests/mv/mv-n index f91fba0e1..448f47468 100755 --- a/tests/mv/mv-n +++ b/tests/mv/mv-n @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 # test miscellaneous combinations of -f -i -n parameters touch a b || framework_failure diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1 index 321c54e64..73f9fb4d5 100755 --- a/tests/mv/mv-special-1 +++ b/tests/mv/mv-special-1 @@ -41,7 +41,6 @@ touch $dir/a/b/c/file1 $dir/d/e/f/file2 || framework_failure # from an OpenBSD system, the above mknod fails. # It's not worth making an exception any more. -fail=0 mv --verbose $null $dir "$other_partition_tmpdir" > out || fail=1 # Make sure the files are gone. test -p $null && fail=1 diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir index 387a75f9b..2ef5f2abb 100755 --- a/tests/mv/no-target-dir +++ b/tests/mv/no-target-dir @@ -33,7 +33,6 @@ mkdir a b b/a || framework_failure mv a b || skip_test_ "your kernel's rename syscall is buggy" -fail=0 # This should succeed, since both src and dest are directories, # and the dest dir is empty. diff --git a/tests/mv/part-fail b/tests/mv/part-fail index 290864dff..3d939f1db 100755 --- a/tests/mv/part-fail +++ b/tests/mv/part-fail @@ -32,7 +32,6 @@ cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; } touch k "$other_partition_tmpdir/k" || framework_failure chmod u-w "$other_partition_tmpdir" || framework_failure -fail=0 mv -f k "$other_partition_tmpdir" 2> out && fail=1 cat <<EOF > exp diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink index 51dea2043..e158964bc 100755 --- a/tests/mv/part-hardlink +++ b/tests/mv/part-hardlink @@ -34,7 +34,6 @@ mkdir a b || framework_failure touch a/1 || framework_failure ln a/1 b/1 || framework_failure -fail=0 mv f g "$other_partition_tmpdir" || fail=1 mv a b "$other_partition_tmpdir" || fail=1 diff --git a/tests/mv/part-rename b/tests/mv/part-rename index 45b8615ec..a1a651722 100755 --- a/tests/mv/part-rename +++ b/tests/mv/part-rename @@ -29,7 +29,6 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; } mkdir foo || framework_failure -fail=0 mv foo/ "$other_partition_tmpdir/bar" || fail=1 diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink index a12a9f531..ed3e25b10 100755 --- a/tests/mv/part-symlink +++ b/tests/mv/part-symlink @@ -33,7 +33,6 @@ pwd_tmp=`pwd` # can make this test fail. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -fail=0 # Four cases: # local regular file w/symlink on another partition diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm index 41a193cc2..c6f8066c9 100755 --- a/tests/mv/partition-perm +++ b/tests/mv/partition-perm @@ -31,7 +31,6 @@ chmod a=rwx file umask 077 mv file "$other_partition_tmpdir" -fail=0 test -f file && fail=1 test -f "$other_partition_tmpdir/file" || fail=1 diff --git a/tests/mv/perm-1 b/tests/mv/perm-1 index b8c3bf3b5..88a6f4024 100755 --- a/tests/mv/perm-1 +++ b/tests/mv/perm-1 @@ -28,7 +28,6 @@ skip_if_root_ mkdir -p no-write/dir || framework_failure chmod u-w no-write || framework_failure -fail=0 mv no-write/dir . > out 2>&1 && fail=1 cat <<\EOF > exp diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart index f8855a21f..7187e8082 100755 --- a/tests/mv/sticky-to-xpart +++ b/tests/mv/sticky-to-xpart @@ -43,7 +43,6 @@ chown "$NON_ROOT_USERNAME" "$other_partition_tmpdir" || framework_failure # We have to allow $NON_ROOT_USERNAME access to ".". chmod go+x . || framework_failure -fail=0 # Ensure that $NON_ROOT_USERNAME can access the required version of mv. version=`setuidgid $NON_ROOT_USERNAME env PATH="$PATH" mv --version|sed -n '1s/.* //p'` diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink index c5fc099c9..3806f56d7 100755 --- a/tests/mv/to-symlink +++ b/tests/mv/to-symlink @@ -30,7 +30,6 @@ rem_file="$other_partition_tmpdir/file" rem_symlink="$other_partition_tmpdir/symlink" file=to-sym-$$ -fail=0 rm -f $file || framework_failure echo local > $file || framework_failure diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash index 24ab722d1..a86626a6b 100755 --- a/tests/mv/trailing-slash +++ b/tests/mv/trailing-slash @@ -28,7 +28,6 @@ fi mkdir foo || framework_failure -fail=0 mv foo/ bar || fail=1 diff --git a/tests/mv/update b/tests/mv/update index ae3127f23..cf6e471af 100755 --- a/tests/mv/update +++ b/tests/mv/update @@ -28,7 +28,6 @@ echo old > old || framework_failure touch -d yesterday old || framework_failure echo new > new || framework_failure -fail=0 for interactive in '' -i; do for cp_or_mv in cp mv; do diff --git a/tests/readlink/can-e b/tests/readlink/can-e index 58a714891..bbf81f1ff 100755 --- a/tests/readlink/can-e +++ b/tests/readlink/can-e @@ -27,7 +27,6 @@ pwd=`pwd` my_pwd=$("$abs_top_builddir/src/pwd") tmp=d -fail=0 mkdir $tmp || framework_failure cd $tmp || framework_failure @@ -41,7 +40,6 @@ ln -s subdir/missing link4 || framework_failure cd "$pwd/$tmp/removed" || framework_failure -fail=0 # Skip this test if the system doesn't let you remove the working directory. if rmdir ../removed 2>/dev/null; then v=`readlink -e .` && fail=1 diff --git a/tests/readlink/can-f b/tests/readlink/can-f index a702ba990..a2bb5fd9d 100755 --- a/tests/readlink/can-f +++ b/tests/readlink/can-f @@ -27,7 +27,6 @@ pwd=`pwd` my_pwd=$("$abs_top_builddir/src/pwd") tmp=d -fail=0 mkdir $tmp || framework_failure cd $tmp || framework_failure @@ -42,7 +41,6 @@ ln -s link5 link5 || framework_failure cd "$pwd/$tmp/removed" || framework_failure -fail=0 # Skip this test if the system doesn't let you remove the working directory. if rmdir ../removed 2>/dev/null; then v=`readlink -e .` && fail=1 diff --git a/tests/readlink/can-m b/tests/readlink/can-m index 53528c20e..80d3e2d28 100755 --- a/tests/readlink/can-m +++ b/tests/readlink/can-m @@ -27,7 +27,6 @@ pwd=`pwd` my_pwd=$("$abs_top_builddir/src/pwd") tmp=d -fail=0 mkdir $tmp || framework_failure cd $tmp || framework_failure @@ -41,7 +40,6 @@ ln -s subdir/missing link4 || framework_failure cd "$pwd/$tmp/removed" || framework_failure -fail=0 # Skip this test if the system doesn't let you remove the working directory. if rmdir ../removed 2>/dev/null; then v=`readlink -e .` && fail=1 diff --git a/tests/readlink/rl-1 b/tests/readlink/rl-1 index 7dfc8b739..3eadbbcfb 100755 --- a/tests/readlink/rl-1 +++ b/tests/readlink/rl-1 @@ -28,7 +28,6 @@ touch regfile || framework_failure ln -s regfile link1 || framework_failure ln -s missing link2 || framework_failure -fail=0 v=`readlink link1` || fail=1 test "$v" = regfile || fail=1 diff --git a/tests/rm/cycle b/tests/rm/cycle index d97154779..ffac61d29 100755 --- a/tests/rm/cycle +++ b/tests/rm/cycle @@ -28,7 +28,6 @@ mkdir -p a/b touch a/b/file chmod u-w a/b -fail=0 rm -rf a a 2>&1 | sed 's/:[^:]*$//' > out || fail=1 cat <<\EOF > exp diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink index 0ee3e8af1..4366474f2 100755 --- a/tests/rm/dangling-symlink +++ b/tests/rm/dangling-symlink @@ -29,7 +29,6 @@ fi ln -s no-file dangle ln -s / symlink -fail=0 rm ---presume-input-tty dangle symlink & pid=$! diff --git a/tests/rm/deep-1 b/tests/rm/deep-1 index 98f100a80..3585ef501 100755 --- a/tests/rm/deep-1 +++ b/tests/rm/deep-1 @@ -32,7 +32,6 @@ fi umask 022 -fail=0 k20=/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k k200=$k20$k20$k20$k20$k20$k20$k20$k20$k20$k20 diff --git a/tests/rm/deep-2 b/tests/rm/deep-2 index 20fb278d5..34c733f6e 100755 --- a/tests/rm/deep-2 +++ b/tests/rm/deep-2 @@ -41,7 +41,6 @@ $PERL \ cd .. || framework_failure echo n > no || framework_failure -fail=0 rm ---presume-input-tty -r x < no > out || fail=1 # expect empty output diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w index ee0829a99..ff8825e2e 100755 --- a/tests/rm/dir-no-w +++ b/tests/rm/dir-no-w @@ -26,7 +26,6 @@ fi mkdir --mode=0500 unwritable-dir || framework_failure -fail=0 # For rm from coreutils-5.0.1, this would prompt. rm ---presume-input-tty unwritable-dir < /dev/null > out-t 2>&1 && fail=1 diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur index 320a71837..3c6f041f8 100755 --- a/tests/rm/dir-nonrecur +++ b/tests/rm/dir-nonrecur @@ -26,7 +26,6 @@ fi mkdir d || framework_failure -fail=0 rm d 2> out && fail=1 cat <<\EOF > exp || fail=1 diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel index c69ad8889..5e59c4dcb 100755 --- a/tests/rm/dot-rel +++ b/tests/rm/dot-rel @@ -27,7 +27,6 @@ fi mkdir a b || framework_failure touch a/f b/f || framework_failure -fail=0 rm -r a b || fail=1 diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc index 779f96bda..c0a77e409 100755 --- a/tests/rm/empty-inacc +++ b/tests/rm/empty-inacc @@ -30,7 +30,6 @@ mkdir -m0 inacc || framework_failure # that is empty (hence removable) and unreadable. mkdir -m a-r -p a/unreadable -fail=0 # This would fail for e.g., coreutils-5.93. rm -rf inacc || fail=1 diff --git a/tests/rm/ext3-perf b/tests/rm/ext3-perf index ad97e1708..90ba9bb5a 100755 --- a/tests/rm/ext3-perf +++ b/tests/rm/ext3-perf @@ -72,7 +72,6 @@ echo creating a $n-entry directory took $setup_duration seconds test $threshold_seconds -lt $setup_duration \ && threshold_seconds=$setup_duration -fail=0 start=$(date +%s) timeout ${threshold_seconds}s rm -rf d; err=$? duration=$(expr $(date +%s) - $start) diff --git a/tests/rm/f-1 b/tests/rm/f-1 index b00f0a614..07a68addc 100755 --- a/tests/rm/f-1 +++ b/tests/rm/f-1 @@ -27,7 +27,6 @@ fi mkdir -p d || framework_failure -fail=0 rm -f d/no-such-file || fail=1 Exit $fail diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm index 4cfb511b7..4c4ae7436 100755 --- a/tests/rm/fail-2eperm +++ b/tests/rm/fail-2eperm @@ -32,7 +32,6 @@ mkdir a || framework_failure chmod 1777 a || framework_failure touch a/b || framework_failure -fail=0 # Try to ensure that $NON_ROOT_USERNAME can access # the required version of rm. diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces index 954bd7e1a..4481ce498 100755 --- a/tests/rm/fail-eacces +++ b/tests/rm/fail-eacces @@ -41,7 +41,6 @@ mkdir e && ok=1 test $ok = 1 || framework_failure -fail=0 rm -rf d/f 2> out && fail=1 cat <<\EOF > exp diff --git a/tests/rm/hash b/tests/rm/hash index 5f9d126a6..8629cba71 100755 --- a/tests/rm/hash +++ b/tests/rm/hash @@ -35,7 +35,6 @@ for i in 1 2 3; do done done -fail=0 rm -r t || fail=1 diff --git a/tests/rm/i-1 b/tests/rm/i-1 index be074f0fd..a7474fe62 100755 --- a/tests/rm/i-1 +++ b/tests/rm/i-1 @@ -33,7 +33,6 @@ test -f $t/a || framework_failure echo y > $t/$test.Iy echo n > $t/$test.In -fail=0 rm -i $t/a < $t/$test.In > /dev/null 2>&1 || fail=1 # The file should not have been removed. test -f $t/a || fail=1 diff --git a/tests/rm/i-never b/tests/rm/i-never index fc6b06964..35c0ac3a3 100755 --- a/tests/rm/i-never +++ b/tests/rm/i-never @@ -29,7 +29,6 @@ touch f || framework_failure chmod 0 f || framework_failure touch exp || framework_failure -fail=0 rm --interactive=never f > out || fail=1 diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r index 8efb0637c..78eb99a99 100755 --- a/tests/rm/i-no-r +++ b/tests/rm/i-no-r @@ -28,7 +28,6 @@ fi mkdir dir || framework_failure echo y > y || framework_failure -fail=0 # This must fail. rm -i dir < y > /dev/null 2>&1 && fail=1 diff --git a/tests/rm/ignorable b/tests/rm/ignorable index 747d4d275..714631e58 100755 --- a/tests/rm/ignorable +++ b/tests/rm/ignorable @@ -26,7 +26,6 @@ skip_if_root_ touch existing-non-dir || framework_failure -fail=0 # With coreutils-6.3, this would exit nonzero. It should not. # Example from Andreas Schwab. diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible index f40a342d0..b894f495d 100755 --- a/tests/rm/inaccessible +++ b/tests/rm/inaccessible @@ -32,7 +32,6 @@ skip_if_root_ p=`pwd` mkdir abs1 abs2 no-access || framework_failure -fail=0 set +x (cd no-access; chmod 0 . && rm -r "$p/abs1" rel "$p/abs2") 2> out && fail=1 diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always index bab99b1fb..842acc15e 100755 --- a/tests/rm/interactive-always +++ b/tests/rm/interactive-always @@ -32,7 +32,6 @@ echo 'n y' > $test.I || framework_failure rm -f out err || framework_failure -fail=0 # The prompt has a trailing space, and no newline, so an extra # 'echo .' is inserted after each rm to make it obvious what was asked. diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once index 7e3a75753..9c1f46df2 100755 --- a/tests/rm/interactive-once +++ b/tests/rm/interactive-once @@ -32,7 +32,6 @@ echo y > $test.Iy || framework_failure echo n > $test.In || framework_failure rm -f out err || framework_failure -fail=0 # The prompt has a trailing space, and no newline, so an extra # 'echo .' is inserted after each rm to make it obvious what was asked. diff --git a/tests/rm/ir-1 b/tests/rm/ir-1 index 6589d847d..2b0cfa3b7 100755 --- a/tests/rm/ir-1 +++ b/tests/rm/ir-1 @@ -49,7 +49,6 @@ EOF # Remove all but one of a, b, c -- I doubt that this test can portably # determine which one was removed based on order of dir entries. # This is a good argument for switching to a dejagnu-style test suite. -fail=0 rm --verbose -i -r $t < $test.I > /dev/null 2>&1 || fail=1 # $t should not have been removed. diff --git a/tests/rm/isatty b/tests/rm/isatty index 15b50b7e5..c1bb818a2 100755 --- a/tests/rm/isatty +++ b/tests/rm/isatty @@ -24,7 +24,6 @@ fi . $srcdir/test-lib.sh skip_if_root_ -fail=0 # Skip this test if there is no /dev/stdin file. ls /dev/stdin >/dev/null 2>&1 \ diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up index 0c6aefa5c..a0ba383d6 100755 --- a/tests/rm/no-give-up +++ b/tests/rm/no-give-up @@ -32,7 +32,6 @@ chown -R $NON_ROOT_USERNAME d || framework_failure # Ensure that non-root can access files in root-owned ".". chmod go=x . || framework_failure -fail=0 # This must fail, since `.' is not writable by $NON_ROOT_USERNAME. setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm -rf d 2>/dev/null && fail=1 diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system index db00a5b47..8ce6e652b 100755 --- a/tests/rm/one-file-system +++ b/tests/rm/one-file-system @@ -44,7 +44,6 @@ cat <<\EOF > exp || framework_failure rm: skipping `a/b', since it's on a different device EOF -fail=0 rm --one-file-system -rf a 2> out && fail=1 test -d $t/y || fail=1 diff --git a/tests/rm/r-1 b/tests/rm/r-1 index b4fec90be..cd484e694 100755 --- a/tests/rm/r-1 +++ b/tests/rm/r-1 @@ -35,7 +35,6 @@ removed directory: `a' removed `b' EOF -fail=0 rm --verbose -r a b > $test.O || fail=1 for d in $dirs; do diff --git a/tests/rm/r-2 b/tests/rm/r-2 index 91463f8ca..a0a49e652 100755 --- a/tests/rm/r-2 +++ b/tests/rm/r-2 @@ -38,7 +38,6 @@ EOF # Note that both the expected output (above) and the actual output lines # are sorted, because directory entries may be processed in arbitrary order. -fail=0 rm --verbose -r t/a | sort > t/O || fail=1 if test -d t/a; then diff --git a/tests/rm/r-3 b/tests/rm/r-3 index 5d078b89f..b1ad2e052 100755 --- a/tests/rm/r-3 +++ b/tests/rm/r-3 @@ -46,7 +46,6 @@ test -f 0a || framework_failure test -f by || framework_failure cd .. || framework_failure -fail=0 rm -rf t || fail=1 test -d t && fail=1 diff --git a/tests/rm/r-4 b/tests/rm/r-4 index 4f41e4598..1a607df2a 100755 --- a/tests/rm/r-4 +++ b/tests/rm/r-4 @@ -26,7 +26,6 @@ fi mkdir d || framework_failure touch d/a || framework_failure -fail=0 rm -fr d/. 2>/dev/null && fail=1 rm -fr d/./ 2>/dev/null && fail=1 rm -fr d/.//// 2>/dev/null && fail=1 diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug index bd0046083..25bcae28b 100755 --- a/tests/rm/readdir-bug +++ b/tests/rm/readdir-bug @@ -35,7 +35,6 @@ for i in `seq 1 250`; do done cd .. || framework_failure -fail=0 # On a buggy system, this would fail with the diagnostic, # "cannot remove directory `b': Directory not empty" diff --git a/tests/rm/rm1 b/tests/rm/rm1 index bcc23a2ab..8762b94d1 100755 --- a/tests/rm/rm1 +++ b/tests/rm/rm1 @@ -27,7 +27,6 @@ skip_if_root_ mkdir -p b/a/p b/c b/d || framework_failure chmod u-w b/a || framework_failure -fail=0 # This should fail. rm -rf b > out 2>&1 && fail=1 diff --git a/tests/rm/rm2 b/tests/rm/rm2 index fab6140a4..a8d11607c 100755 --- a/tests/rm/rm2 +++ b/tests/rm/rm2 @@ -29,7 +29,6 @@ mkdir -p a/1/2 b/3 || framework_failure mkdir a/2 a/3 || framework_failure chmod u-x a/1 b || framework_failure -fail=0 # Exercise two separate code paths -- though both result # in the same sort of diagnostic. diff --git a/tests/rm/rm3 b/tests/rm/rm3 index 1ba640939..9c2a18f10 100755 --- a/tests/rm/rm3 +++ b/tests/rm/rm3 @@ -34,7 +34,6 @@ mkdir d du || framework_failure chmod u-w fu du empty-u || framework_failure cd .. -fail=0 cat <<EOF > in y diff --git a/tests/rm/rm4 b/tests/rm/rm4 index e000be189..cbc226e50 100755 --- a/tests/rm/rm4 +++ b/tests/rm/rm4 @@ -26,7 +26,6 @@ skip_if_root_ mkdir dir || framework_failure -fail=0 # This should fail. rm dir > /dev/null 2>&1 && fail=1 diff --git a/tests/rm/rm5 b/tests/rm/rm5 index 85d7fef60..048f9a7d7 100755 --- a/tests/rm/rm5 +++ b/tests/rm/rm5 @@ -37,7 +37,6 @@ rm: remove directory `d/e' rm: remove directory `d' EOF -fail=0 rm -ir d < in > out 2>&1 || fail=1 diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1 index af8e2f3fe..74d039f8e 100755 --- a/tests/rm/sunos-1 +++ b/tests/rm/sunos-1 @@ -28,7 +28,6 @@ fi . $srcdir/test-lib.sh -fail=0 rm -r '' > /dev/null 2>&1 && fail=1 Exit $fail diff --git a/tests/rm/unread2 b/tests/rm/unread2 index 3b7b6f295..c1bb4c2ed 100755 --- a/tests/rm/unread2 +++ b/tests/rm/unread2 @@ -27,7 +27,6 @@ skip_if_root_ mkdir -p a/b || framework_failure chmod u-r a -fail=0 # This should fail. rm -rf a > out 2>&1 && fail=1 diff --git a/tests/rm/unread3 b/tests/rm/unread3 index 52366d42e..d26843a20 100755 --- a/tests/rm/unread3 +++ b/tests/rm/unread3 @@ -26,7 +26,6 @@ skip_if_root_ mkdir -p a/1 b c d/2 e/3 || framework_failure -fail=0 t=`pwd` cd c diff --git a/tests/rm/v-slash b/tests/rm/v-slash index 9aae56e68..5d5b151a0 100755 --- a/tests/rm/v-slash +++ b/tests/rm/v-slash @@ -26,7 +26,6 @@ fi mkdir a || framework_failure touch a/x || framework_failure -fail=0 rm --verbose -r a/// > out || fail=1 cat <<\EOF > exp || fail=1 diff --git a/tests/rmdir/fail-perm b/tests/rmdir/fail-perm index 3e25dd1e7..8f41a043a 100755 --- a/tests/rmdir/fail-perm +++ b/tests/rmdir/fail-perm @@ -27,7 +27,6 @@ fi mkdir d d/e d/e/f || framework_failure chmod a-w d || framework_failure -fail=0 # This rmdir command outputs two diagnostics. # Before coreutils-5.1.2, it would mistakenly exit successfully. diff --git a/tests/rmdir/ignore b/tests/rmdir/ignore index 01d6c81f0..80e13b048 100755 --- a/tests/rmdir/ignore +++ b/tests/rmdir/ignore @@ -26,7 +26,6 @@ fi cwd=`pwd` mkdir -p "$cwd/a/b/c" "$cwd/a/x" || framework_failure -fail=0 rmdir -p --ignore-fail-on-non-empty "$cwd/a/b/c" || fail=1 # $cwd/a/x should remain test -d "$cwd/a/x" || fail=1 diff --git a/tests/rmdir/t-slash b/tests/rmdir/t-slash index f02a6edfe..7500f432c 100755 --- a/tests/rmdir/t-slash +++ b/tests/rmdir/t-slash @@ -25,7 +25,6 @@ fi mkdir dir || framework_failure -fail=0 # Prior to coreutils-4.5.2, this would fail with the following: # rmdir: `dir': No such file or directory diff --git a/tests/sample-test b/tests/sample-test index aea6a1ac1..b1b961298 100644 --- a/tests/sample-test +++ b/tests/sample-test @@ -29,7 +29,6 @@ fi # FIXME: cleanup_() { rm -rf "$other_partition_tmpdir"; } # FIXME: . "$abs_srcdir/other-fs-tmpdir" -fail=0 FIXME > out || fail=1 cat <<\EOF > exp || fail=1 FIXME diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only index 2d38d4f0f..104ae4821 100755 --- a/tests/tail-2/append-only +++ b/tests/tail-2/append-only @@ -35,7 +35,6 @@ if test $chattr_a_works = 0; then skip_test_ "chattr +a doesn't work on this file system" fi -fail=0 for inotify in ---disable-inotify ''; do sleep 1 & diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb index 23f3c12b0..e8b150ecb 100755 --- a/tests/tail-2/big-4gb +++ b/tests/tail-2/big-4gb @@ -41,7 +41,6 @@ possibly because this system does not support large files; Consider rerunning this test on a different file system.' fi -fail=0 tail -c1 big > out || fail=1 # Append a newline. diff --git a/tests/tail-2/flush-initial b/tests/tail-2/flush-initial index e0d79fe48..71f5dc0a0 100755 --- a/tests/tail-2/flush-initial +++ b/tests/tail-2/flush-initial @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 echo line > in || fail=1 # Output should be buffered since we're writing to file # so we're depending on the flush to write out diff --git a/tests/tail-2/follow-stdin b/tests/tail-2/follow-stdin index 46e7ce80f..fc1343558 100755 --- a/tests/tail-2/follow-stdin +++ b/tests/tail-2/follow-stdin @@ -26,7 +26,6 @@ fi echo line > exp || framework_failure echo line > in || framework_failure -fail=0 timeout 1 tail -f < in > out 2> err # tail from coreutils-7.5 would fail diff --git a/tests/tail-2/infloop-1 b/tests/tail-2/infloop-1 index 72d51d975..3ef03dd5d 100755 --- a/tests/tail-2/infloop-1 +++ b/tests/tail-2/infloop-1 @@ -44,7 +44,6 @@ for i in $(seq 30); do sleep .1 done -fail=0 kill $tail_pid && fail=1 || : Exit $fail diff --git a/tests/tail-2/inotify-race b/tests/tail-2/inotify-race index 025272c02..890323988 100755 --- a/tests/tail-2/inotify-race +++ b/tests/tail-2/inotify-race @@ -27,7 +27,6 @@ fi . $srcdir/test-lib.sh -fail=0 touch file || framework_failure touch tail.out || framework_failure diff --git a/tests/tail-2/pid b/tests/tail-2/pid index 0a4b81bd3..c521b0349 100755 --- a/tests/tail-2/pid +++ b/tests/tail-2/pid @@ -26,7 +26,6 @@ getlimits_ touch empty here || framework_failure -fail=0 for inotify in ---disable-inotify ''; do # Use tail itself to create a background process to monitor, diff --git a/tests/tail-2/pipe-f b/tests/tail-2/pipe-f index b9f6ae389..8c71cea22 100755 --- a/tests/tail-2/pipe-f +++ b/tests/tail-2/pipe-f @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 echo foo | timeout 2 tail -f -c3 > out || fail=1 echo oo > exp || fail=1 diff --git a/tests/tail-2/pipe-f2 b/tests/tail-2/pipe-f2 index 406ebcc91..905d66d45 100755 --- a/tests/tail-2/pipe-f2 +++ b/tests/tail-2/pipe-f2 @@ -28,7 +28,6 @@ mkfifo_or_skip_ fifo echo 1 > fifo & echo 1 > exp || framework_failure -fail=0 timeout 1 tail -f fifo > out test $? = 124 || fail=1 diff --git a/tests/tail-2/proc-ksyms b/tests/tail-2/proc-ksyms index 61caafd2c..34bdacd86 100755 --- a/tests/tail-2/proc-ksyms +++ b/tests/tail-2/proc-ksyms @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 ksyms=/proc/ksyms if test -r $ksyms; then diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle index 514a2136b..416cb4475 100755 --- a/tests/tail-2/start-middle +++ b/tests/tail-2/start-middle @@ -26,7 +26,6 @@ fi (echo 1; echo 2) > k || framework_failure -fail=0 sh -c 'read x; tail' < k > out || fail=1 cat <<EOF > exp diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f index ddfbe6645..cf50fa295 100755 --- a/tests/tail-2/tail-n0f +++ b/tests/tail-2/tail-n0f @@ -33,7 +33,6 @@ require_proc_pid_status_ touch empty || framework_failure echo anything > nonempty || framework_failure -fail=0 for inotify in ---disable-inotify ''; do for file in empty nonempty; do diff --git a/tests/tail-2/wait b/tests/tail-2/wait index 62498d5dc..9392ade23 100755 --- a/tests/tail-2/wait +++ b/tests/tail-2/wait @@ -28,7 +28,6 @@ touch here || framework_failure touch k || framework_failure { touch unreadable && chmod a-r unreadable; } || framework_failure -fail=0 for inotify in ---disable-inotify ''; do timeout 1 tail -s0.1 -f $inotify not_here diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 4419742ea..456a30a24 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -395,3 +395,6 @@ elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then else compare() { cmp "$@"; } fi + +# Initialize; all bourne shell scripts end with "Exit $fail". +fail=0 diff --git a/tests/touch/60-seconds b/tests/touch/60-seconds index b13ad06ff..0fbcaae06 100755 --- a/tests/touch/60-seconds +++ b/tests/touch/60-seconds @@ -25,7 +25,6 @@ fi echo 60 > exp || framework_failure -fail=0 # Before coreutils-7.7, this would fail, complaining of # an `invalid date format'. Specifying 60 seconds *is* valid. diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink index f3ea29a7f..a16e015ca 100755 --- a/tests/touch/dangling-symlink +++ b/tests/touch/dangling-symlink @@ -26,7 +26,6 @@ fi rm -f touch-target t-symlink ln -s touch-target t-symlink -fail=0 # This used to infloop. touch t-symlink || fail=1 diff --git a/tests/touch/dir-1 b/tests/touch/dir-1 index 1698ab1ca..ef1543e26 100755 --- a/tests/touch/dir-1 +++ b/tests/touch/dir-1 @@ -9,6 +9,5 @@ fi . $srcdir/test-lib.sh -fail=0 touch . || fail=1 Exit $fail diff --git a/tests/touch/empty-file b/tests/touch/empty-file index 05db80cfb..310ea3037 100755 --- a/tests/touch/empty-file +++ b/tests/touch/empty-file @@ -31,7 +31,6 @@ fi DEFAULT_SLEEP_SECONDS=2 SLEEP_SECONDS=${SLEEP_SECONDS=$DEFAULT_SLEEP_SECONDS} -fail=0 # FIXME: find writable directories on other partitions # and run the test in those directories, too. diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag index 070b7273a..57f5038ef 100755 --- a/tests/touch/fail-diag +++ b/tests/touch/fail-diag @@ -29,7 +29,6 @@ dir=/$d1/such-dir # Ensure that $d1 doesn't already exist. ls -d $d1 2> /dev/null && framework_failure -fail=0 touch $dir > out 2>&1 && fail=1 cat <<EOF > exp diff --git a/tests/touch/fifo b/tests/touch/fifo index b8209a4fc..57bb5cf8f 100755 --- a/tests/touch/fifo +++ b/tests/touch/fifo @@ -25,7 +25,6 @@ fi mkfifo_or_skip_ fifo -fail=0 touch fifo || fail=1 diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing index 517ad7de6..3fc668194 100755 --- a/tests/touch/no-create-missing +++ b/tests/touch/no-create-missing @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 touch -c no-file > /dev/null 2>&1 || fail=1 touch -cm no-file > /dev/null 2>&1 || fail=1 diff --git a/tests/touch/no-dereference b/tests/touch/no-dereference index 28527e857..f10eca85e 100755 --- a/tests/touch/no-dereference +++ b/tests/touch/no-dereference @@ -27,7 +27,6 @@ ln -s nowhere dangling || framework_failure touch file || framework_failure ln -s file link || framework_failure -fail=0 # These first tests should work on every platform. # -h does not create files, but it warns. Use -c to silence warning. diff --git a/tests/touch/no-rights b/tests/touch/no-rights index 95470c0ac..3090bf025 100755 --- a/tests/touch/no-rights +++ b/tests/touch/no-rights @@ -31,7 +31,6 @@ touch -d '2000-01-02 00:00' t2 || framework_failure set x `ls -t t1 t2` test "$*" = "x t2 t1" || framework_failure -fail=0 chmod 0 t1 touch -d '2000-01-03 00:00' -c t1 || fail=1 diff --git a/tests/touch/not-owner b/tests/touch/not-owner index 92347bd30..3dd8a8086 100755 --- a/tests/touch/not-owner +++ b/tests/touch/not-owner @@ -34,7 +34,6 @@ fi skip_if_root_ -fail=0 # Before fileutils-4.1, we'd get the following misleading # diagnostic instead of `...: Permission denied'. diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other index 4ce4ec6de..e124a2e4a 100755 --- a/tests/touch/now-owned-by-other +++ b/tests/touch/now-owned-by-other @@ -34,7 +34,6 @@ chmod g+w root-owned # Ensure that the current directory is searchable by $NON_ROOT_USERNAME. chmod g+x . -fail=0 setuidgid $NON_ROOT_USERNAME env PATH="$PATH" touch -d now root-owned || fail=1 Exit $fail diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent index 988ef04ab..88a442563 100755 --- a/tests/touch/obsolescent +++ b/tests/touch/obsolescent @@ -26,7 +26,6 @@ fi _POSIX2_VERSION=199209; export _POSIX2_VERSION POSIXLY_CORRECT=1; export POSIXLY_CORRECT -fail=0 yearstart=01010000 diff --git a/tests/touch/read-only b/tests/touch/read-only index 8d1853b46..9d21dbdef 100755 --- a/tests/touch/read-only +++ b/tests/touch/read-only @@ -27,7 +27,6 @@ skip_if_root_ : > read-only || framework_failure chmod 444 read-only || framework_failure -fail=0 touch read-only || fail=1 diff --git a/tests/touch/relative b/tests/touch/relative index ad42c1a04..05704feea 100755 --- a/tests/touch/relative +++ b/tests/touch/relative @@ -26,7 +26,6 @@ fi TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure -fail=0 # Set times back by 5 days. touch --ref f --date='-5 days' f || fail=1 diff --git a/tests/touch/trailing-slash b/tests/touch/trailing-slash index 85cf48877..05c2ac742 100755 --- a/tests/touch/trailing-slash +++ b/tests/touch/trailing-slash @@ -30,7 +30,6 @@ ln -s file link1 || framework_failure mkdir dir || framework_failure ln -s dir link2 || framework_failure -fail=0 # Trailing slash can only appear on directory or symlink-to-directory. # Up through coreutils 8.0, Solaris 9 failed these tests. |