From 3c88587b2eadee11413f4207abbbf13af07c438d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 30 Oct 2009 10:50:21 +0100 Subject: [PATCH] tests: factor 350 fail=0 initializations into test-lib.sh Run this command to remove the factored-out "fail=0" lines. perl -ni -e '/^fail=0$/ or print' $(g grep -l '^fail=0$') * tests/test-lib.sh: Initialize fail=0 here, not in 300+ scripts. * tests/...: nearly all bourne shell scripts Suggested by Eric Blake. --- tests/chgrp/basic | 1 - tests/chgrp/default-no-deref | 1 - tests/chgrp/deref | 1 - tests/chgrp/no-x | 1 - tests/chgrp/posix-H | 1 - tests/chgrp/recurse | 1 - tests/chmod/c-option | 1 - tests/chmod/equal-x | 1 - tests/chmod/equals | 1 - tests/chmod/inaccessible | 1 - tests/chmod/no-x | 1 - tests/chmod/octal | 1 - tests/chmod/setgid | 1 - tests/chmod/silent | 1 - tests/chmod/thru-dangling | 1 - tests/chmod/umask-x | 1 - tests/chmod/usage | 1 - tests/chown/basic | 1 - tests/chown/deref | 1 - tests/chown/preserve-root | 1 - tests/chown/separator | 1 - tests/cp/abuse | 1 - tests/cp/acl | 1 - tests/cp/backup-1 | 1 - tests/cp/backup-dir | 1 - tests/cp/backup-is-src | 1 - tests/cp/cp-HL | 1 - tests/cp/cp-a-selinux | 1 - tests/cp/cp-deref | 1 - tests/cp/cp-i | 1 - tests/cp/cp-mv-backup | 1 - tests/cp/cp-mv-enotsup-xattr | 1 - tests/cp/cp-parents | 1 - tests/cp/deref-slink | 1 - tests/cp/dir-rm-dest | 1 - tests/cp/dir-slash | 1 - tests/cp/dir-vs-file | 1 - tests/cp/existing-perm-race | 1 - tests/cp/fail-perm | 1 - tests/cp/into-self | 1 - tests/cp/link | 1 - tests/cp/link-heap | 1 - tests/cp/link-no-deref | 1 - tests/cp/link-preserve | 1 - tests/cp/no-deref-link1 | 1 - tests/cp/no-deref-link2 | 1 - tests/cp/no-deref-link3 | 1 - tests/cp/parent-perm | 1 - tests/cp/parent-perm-race | 1 - tests/cp/perm | 1 - tests/cp/preserve-2 | 1 - tests/cp/preserve-gid | 1 - tests/cp/preserve-slink-time | 1 - tests/cp/proc-short-read | 1 - tests/cp/proc-zero-len | 1 - tests/cp/r-vs-symlink | 1 - tests/cp/reflink-auto | 1 - tests/cp/reflink-perm | 1 - tests/cp/same-file | 1 - tests/cp/slink-2-slink | 1 - tests/cp/sparse | 1 - tests/cp/special-bits | 1 - tests/cp/special-f | 1 - tests/cp/src-base-dot | 1 - tests/cp/symlink-slash | 1 - tests/cp/thru-dangling | 1 - tests/dd/direct | 1 - tests/dd/misc | 1 - tests/dd/not-rewound | 1 - tests/dd/reblock | 1 - tests/dd/skip-seek-past-dev | 1 - tests/dd/skip-seek-past-file | 1 - tests/dd/skip-seek2 | 1 - tests/dd/stderr | 1 - tests/dd/unblock-sync | 1 - tests/df/total-verify | 1 - tests/df/unreadable | 1 - tests/du/2g | 1 - tests/du/8gb | 1 - tests/du/basic | 1 - tests/du/deref | 1 - tests/du/deref-args | 1 - tests/du/exclude | 1 - tests/du/fd-leak | 1 - tests/du/hard-link | 1 - tests/du/inacc-dest | 1 - tests/du/inacc-dir | 1 - tests/du/inaccessible-cwd | 1 - tests/du/long-from-unreadable | 1 - tests/du/long-sloop | 1 - tests/du/no-deref | 1 - tests/du/no-x | 1 - tests/du/one-file-system | 1 - tests/du/restore-wd | 1 - tests/du/slash | 1 - tests/du/slink | 1 - tests/du/trailing-slash | 1 - tests/du/two-args | 1 - tests/id/no-context | 1 - tests/install/basic-1 | 1 - tests/install/create-leading | 1 - tests/install/d-slashdot | 1 - tests/install/install-C | 1 - tests/install/install-C-root | 1 - tests/install/install-C-selinux | 1 - tests/install/strip-program | 1 - tests/install/trap | 1 - tests/ln/backup-1 | 1 - tests/ln/hard-backup | 1 - tests/ln/hard-to-sym | 1 - tests/ln/misc | 1 - tests/ln/sf-1 | 1 - tests/ln/slash-decorated-nonexistent-dest | 1 - tests/ln/target-1 | 1 - tests/ls/abmon-align | 1 - tests/ls/capability | 1 - tests/ls/color-clear-to-eol | 1 - tests/ls/color-dtype-dir | 1 - tests/ls/dangle | 1 - tests/ls/dired | 1 - tests/ls/file-type | 1 - tests/ls/follow-slink | 1 - tests/ls/infloop | 1 - tests/ls/inode | 1 - tests/ls/m-option | 1 - tests/ls/multihardlink | 1 - tests/ls/nameless-uid | 1 - tests/ls/no-arg | 1 - tests/ls/no-cap | 1 - tests/ls/proc-selinux-segfault | 1 - tests/ls/readdir-mountpoint-inode | 1 - tests/ls/recursive | 1 - tests/ls/rt-1 | 1 - tests/ls/stat-dtype | 1 - tests/ls/stat-failed | 1 - tests/ls/stat-free-symlinks | 1 - tests/ls/stat-vs-dirent | 1 - tests/ls/symlink-slash | 1 - tests/ls/x-option | 1 - tests/misc/arch | 1 - tests/misc/cat-buf | 1 - tests/misc/cat-proc | 1 - tests/misc/chcon | 1 - tests/misc/chcon-fail | 1 - tests/misc/chroot-credentials | 1 - tests/misc/chroot-fail | 1 - tests/misc/close-stdout | 1 - tests/misc/csplit | 1 - tests/misc/date-sec | 1 - tests/misc/df-P | 1 - tests/misc/env | 1 - tests/misc/env-null | 1 - tests/misc/false-status | 1 - tests/misc/fmt-long-line | 1 - tests/misc/groups-dash | 1 - tests/misc/groups-version | 1 - tests/misc/head-c | 1 - tests/misc/head-pos | 1 - tests/misc/help-version | 1 - tests/misc/id-context | 1 - tests/misc/id-groups | 1 - tests/misc/ls-time | 1 - tests/misc/md5sum-parallel | 1 - tests/misc/mknod | 1 - tests/misc/nice | 1 - tests/misc/nice-fail | 1 - tests/misc/nl | 1 - tests/misc/nohup | 1 - tests/misc/od-N | 1 - tests/misc/od-multiple-t | 1 - tests/misc/od-x8 | 1 - tests/misc/pathchk1 | 1 - tests/misc/printenv | 1 - tests/misc/printf | 1 - tests/misc/printf-hex | 1 - tests/misc/printf-surprise | 1 - tests/misc/ptx-overrun | 1 - tests/misc/pwd-option | 1 - tests/misc/pwd-unreadable-parent | 1 - tests/misc/readlink-fp-loop | 1 - tests/misc/runcon-no-reorder | 1 - tests/misc/selinux | 1 - tests/misc/seq-long-double | 1 - tests/misc/shred-exact | 1 - tests/misc/shred-passes | 1 - tests/misc/shred-remove | 1 - tests/misc/shuf | 1 - tests/misc/sort-compress | 1 - tests/misc/sort-continue | 1 - tests/misc/sort-merge-fdlimit | 1 - tests/misc/sort-rand | 1 - tests/misc/sort-version | 1 - tests/misc/split-a | 1 - tests/misc/split-fail | 1 - tests/misc/split-l | 1 - tests/misc/stat-fmt | 1 - tests/misc/stat-hyphen | 1 - tests/misc/stat-slash | 1 - tests/misc/stdbuf | 1 - tests/misc/stty | 1 - tests/misc/stty-invalid | 1 - tests/misc/stty-row-col | 1 - tests/misc/su-fail | 1 - tests/misc/sum-sysv | 1 - tests/misc/tac-continue | 1 - tests/misc/tee | 1 - tests/misc/tee-dash | 1 - tests/misc/timeout | 1 - tests/misc/timeout-parameters | 1 - tests/misc/truncate-dangling-symlink | 1 - tests/misc/truncate-fail-diag | 1 - tests/misc/truncate-fifo | 1 - tests/misc/truncate-no-create-missing | 1 - tests/misc/truncate-overflow | 1 - tests/misc/truncate-owned-by-other | 1 - tests/misc/truncate-parameters | 1 - tests/misc/truncate-relative | 1 - tests/misc/wc-files0 | 1 - tests/misc/xattr | 1 - tests/mkdir/p-1 | 1 - tests/mkdir/p-2 | 1 - tests/mkdir/p-3 | 1 - tests/mkdir/p-slashdot | 1 - tests/mkdir/p-thru-slink | 1 - tests/mkdir/p-v | 1 - tests/mkdir/parents | 1 - tests/mkdir/perm | 1 - tests/mkdir/selinux | 1 - tests/mkdir/special-1 | 1 - tests/mkdir/t-slash | 1 - tests/mkdir/writable-under-readonly | 1 - tests/mv/acl | 1 - tests/mv/atomic | 1 - tests/mv/atomic2 | 1 - tests/mv/backup-dir | 1 - tests/mv/backup-is-src | 1 - tests/mv/childproof | 1 - tests/mv/diag | 1 - tests/mv/dir-file | 1 - tests/mv/dir2dir | 1 - tests/mv/dup-source | 1 - tests/mv/force | 1 - tests/mv/hard-2 | 1 - tests/mv/hard-3 | 1 - tests/mv/hard-4 | 1 - tests/mv/hard-link-1 | 1 - tests/mv/hard-verbose | 1 - tests/mv/i-2 | 1 - tests/mv/i-3 | 1 - tests/mv/i-4 | 1 - tests/mv/i-5 | 1 - tests/mv/i-link-no | 1 - tests/mv/into-self | 1 - tests/mv/into-self-2 | 1 - tests/mv/into-self-3 | 1 - tests/mv/into-self-4 | 1 - tests/mv/leak-fd | 1 - tests/mv/mv-n | 1 - tests/mv/mv-special-1 | 1 - tests/mv/no-target-dir | 1 - tests/mv/part-fail | 1 - tests/mv/part-hardlink | 1 - tests/mv/part-rename | 1 - tests/mv/part-symlink | 1 - tests/mv/partition-perm | 1 - tests/mv/perm-1 | 1 - tests/mv/sticky-to-xpart | 1 - tests/mv/to-symlink | 1 - tests/mv/trailing-slash | 1 - tests/mv/update | 1 - tests/readlink/can-e | 2 -- tests/readlink/can-f | 2 -- tests/readlink/can-m | 2 -- tests/readlink/rl-1 | 1 - tests/rm/cycle | 1 - tests/rm/dangling-symlink | 1 - tests/rm/deep-1 | 1 - tests/rm/deep-2 | 1 - tests/rm/dir-no-w | 1 - tests/rm/dir-nonrecur | 1 - tests/rm/dot-rel | 1 - tests/rm/empty-inacc | 1 - tests/rm/ext3-perf | 1 - tests/rm/f-1 | 1 - tests/rm/fail-2eperm | 1 - tests/rm/fail-eacces | 1 - tests/rm/hash | 1 - tests/rm/i-1 | 1 - tests/rm/i-never | 1 - tests/rm/i-no-r | 1 - tests/rm/ignorable | 1 - tests/rm/inaccessible | 1 - tests/rm/interactive-always | 1 - tests/rm/interactive-once | 1 - tests/rm/ir-1 | 1 - tests/rm/isatty | 1 - tests/rm/no-give-up | 1 - tests/rm/one-file-system | 1 - tests/rm/r-1 | 1 - tests/rm/r-2 | 1 - tests/rm/r-3 | 1 - tests/rm/r-4 | 1 - tests/rm/readdir-bug | 1 - tests/rm/rm1 | 1 - tests/rm/rm2 | 1 - tests/rm/rm3 | 1 - tests/rm/rm4 | 1 - tests/rm/rm5 | 1 - tests/rm/sunos-1 | 1 - tests/rm/unread2 | 1 - tests/rm/unread3 | 1 - tests/rm/v-slash | 1 - tests/rmdir/fail-perm | 1 - tests/rmdir/ignore | 1 - tests/rmdir/t-slash | 1 - tests/sample-test | 1 - tests/tail-2/append-only | 1 - tests/tail-2/big-4gb | 1 - tests/tail-2/flush-initial | 1 - tests/tail-2/follow-stdin | 1 - tests/tail-2/infloop-1 | 1 - tests/tail-2/inotify-race | 1 - tests/tail-2/pid | 1 - tests/tail-2/pipe-f | 1 - tests/tail-2/pipe-f2 | 1 - tests/tail-2/proc-ksyms | 1 - tests/tail-2/start-middle | 1 - tests/tail-2/tail-n0f | 1 - tests/tail-2/wait | 1 - tests/test-lib.sh | 3 +++ tests/touch/60-seconds | 1 - tests/touch/dangling-symlink | 1 - tests/touch/dir-1 | 1 - tests/touch/empty-file | 1 - tests/touch/fail-diag | 1 - tests/touch/fifo | 1 - tests/touch/no-create-missing | 1 - tests/touch/no-dereference | 1 - tests/touch/no-rights | 1 - tests/touch/not-owner | 1 - tests/touch/now-owned-by-other | 1 - tests/touch/obsolescent | 1 - tests/touch/read-only | 1 - tests/touch/relative | 1 - tests/touch/trailing-slash | 1 - 345 files changed, 3 insertions(+), 347 deletions(-) diff --git a/tests/chgrp/basic b/tests/chgrp/basic index 2c0d7fa..4fad176 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 fc378de..dc7e9d0 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 d4f19ce..1a20e05 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 3ec49e9..175c1b2 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 c24aa3f..87295d4 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 d29a651..b0f2e27 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 8d5979a..f00ef4b 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 97823e0..d74dcc3 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 fc0243c..71c2b7d 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 d0d739e..2ee6c01 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 24cc01e..82aeb5f 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 36423cb..044cf3c 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 5fe74ee..4b117f8 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 e0e9846..9f2d08e 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 6ecf643..6a77427 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 32d815b..ae0e51c 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 1f18944..9dd90ad 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 6708da0..95a9cd1 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 24d0f93..c609751 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 d332620..f5c4fce 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 4ee2856..6e717f6 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 e9086b8..42f6692 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 059a1e1..2f87428 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 cc19f93..7374595 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 9f0d0d7..a82d213 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 f226382..bf03e59 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 17fff79..88f10e9 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 b1359c0..82bf4ae 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 5868fa2..3e3dab4 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 67f8a56..59f60dd 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 59d03a3..c43734e 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 8f3020b..620560b 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 da04c45..1ba585f 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 d37cb11..0a8872d 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 c5429d7..aecc41b 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 0c1e282..df41c17 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 7e5e9d0..341536a 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 e7166a7..0299e1e 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 f470665..0a4b253 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 cd87232..84a0096 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 d9cf4f8..416e64e 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 d9379b5..c0f36bf 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 d71a114..aa57067 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 fcaef2d..b07a9d9 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 86164ec..a362471 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 f323d6b..1f70bec 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 353e3ce..c1af544 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 fe13041..5da5ea7 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 186e7b2..674824b 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 7cc6f41..0f15725 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 f2739a3..9549fd1 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 1f3f10b..5b932af 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 407b772..f9afc86 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 e06143c..93e21bd 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 9103d8a..f71db61 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 4b4e635..b88dc1e 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 5e39b72..949acb4 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 0c75246..7e4c907 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 d5deb68..79b599a 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 ed755bc..1225af2 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 9683a9e..cb1734b 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 eaacd14..d7829f3 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 c2641db..65816a1 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 1b0ee7a..6ed9c26 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 a821e7e..1e4e94c 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 b2a5d74..6331839 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 7e80bee..05c487f 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 07a019a..53562d1 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 056d961..101e375 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 5d6e95b..244345a 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 c9abfc0..f11542a 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 937f99e..6bbf505 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 8bf0c85..ce57b6b 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 a6c8fba..5c903c8 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 4112e0e..4b213c1 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 7b6273d..dbedb87 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 8e60028..d5df537 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 4981efb..4dc9fe0 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 1812d16..a9779c6 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 5714e57..38253bd 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 cb23cc1..3d7fe03 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 ce02807..7ed7d40 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 15dd9a6..12c1ef4 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 c280b88..fd53f1f 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 d9dd247..fe4ae19 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 3373195..fe65fca 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 030a40a..dde7903 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 05f9b2f..0f36b0c 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 68ec613..c87d3b5 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 f624419..99f7a15 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 9ea8df3..9b29270 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 986689a..3d24572 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 0f95fe9..1d395c4 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 cbe147a..fcaf1f3 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 aac1718..826a70f 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 3653067..45bd17e 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 997bc05..1024463 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 f59ca73..e5ddb2b 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 f875ee0..0e42e3a 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 7fdb739..a09be63 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 0740ca5..012f0a0 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 632fef5..95ed038 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 a1a9d68..1edfa54 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 234ebe7..b31d29d 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 a91d8bb..95aacda 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 88072cc..d96d0d3 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 37da21f..157bb6a 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 68c9ca2..cc3e10e 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 54bf9eb..6ff0b95 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 510b57a..22b5923 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 d42d68a..d2c8e3e 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 bc189fd..df9e233 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 afbbd06..2237e30 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 5496db7..f681d51 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 47df97a..51c32ab 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 c45f542..958a8dd 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 fd65ced..aa8cf4e 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 3ccf10e..526d9e9 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 687d3df..1f4ca26 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 a2a2ded..b4607e1 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 < exp diff --git a/tests/ls/file-type b/tests/ls/file-type index d4b240f..60db1d0 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 < exp diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink index 27b2a1c..ba2df3f 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 b77f88c..d32e978 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 f911984..58130e2 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 836d50e..1c2c291 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 815222d..cbe6330 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 a29b170..4fe0f65 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 e2c7f41..a3421c8 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 c551f17..c2ddf75 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 362e6fa..37caf6c 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 763cab1..c021473 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 5a9a4dd..28f58f3 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 564eb3e..5ebced6 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 < exp diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype index 98642b3..cdecd71 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 c134273..cb31a98 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 579362e..86d871e 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 9f2b149..73d6e83 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 c2dd8e7..704e2a3 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 5079885..ea94d49 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 04bce0e..4e7ab0a 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 11d553a..34567a5 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 8c19987..3fac2d0 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 723bfd0..417163d 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 a9efbff..148549a 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 f200f14..c06da55 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 877ad0a..38fd284 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 fe911d8..fec1add 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 e4ba20e..bf3865e 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 ff19408..c3d2f81 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 dcfeaa5..99d200e 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 fb3be29..ab6ee76 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 432c659..031fbb0 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 6b80f3b..5562230 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 bcabd99..561a753 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 b2cb3bc..05cb6dd 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 41e3c71..f39fe43 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 a93e2ce..06bd1cc 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 a3aba32..a40c762 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 < exp b diff --git a/tests/misc/help-version b/tests/misc/help-version index da55907..6028356 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 c6c5e89..4ccf335 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 dc0f54c..83924ef 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 abdd429..67cbab9 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 f37631f..625e66e 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 0f3de38..ccec5bc 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 f85666e..30a88fe 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 7a1bbe8..c621cea 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 2c4703c..a0fd10c 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 9681058..06e9ab4 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 cf4185a..df1c997 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 < exp || fail=1 diff --git a/tests/misc/od-multiple-t b/tests/misc/od-multiple-t index 8d049ec..3ab3134 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 6cb5692..0019048 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 3e3d97c..4f98336 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 bc51fca..c2bd2e4 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 8961b44..14682dc 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 cf272f0..36fd326 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 d50d9e8..5f1923e 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 038109d..81147e3 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 6c02421..35546f7 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 f5c7ae2..2f2e599 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 b6d1c81..507c9d1 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 85fe745..4aaa414 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 8211c80..a56ad06 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 6990f65..1656086 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 ed9d105..e25b4c0 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 712c7bd..b37392e 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 f0fd5f9..6ffe9bd 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 3013aae..a794414 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 7e319ca..7e4278e 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 8b206f3..d45eb53 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 82305be..3071613 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 a9027d2..071ad85 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 32b0ed2..e046c3b 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 88d225a..37cd3cd 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 ad38e60..70ee0c0 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 808a344..f6cf467 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 67dac8b..4ffc4c7 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 f0757fe..b9a1556 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 cda94c5..cea8dcb 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 90e45d7..b6e52a4 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 a7f93ca..cb3fee5 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 d9f0777..638024f 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 c98ab15..5efc7dd 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 f00edc9..473c763 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 918c00e..6a1c63e 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 d385660..afdc79f 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 86eca7d..7a76d64 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 5dbb5c4..ecf414c 100755 --- a/tests/misc/tee-dash +++ b/tests/misc/tee-dash @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh -fail=0 tee - 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 fcf7ceb..ed08955 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 1d4cb17..1cb5cab 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 9a75112..2320da1 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 06207b2..df1c56d 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 4d2674e..a5b9f66 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 30df4fe..e39d0b9 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 5f2468e..0d32322 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 69ab38c..9411775 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 af2bdcd..370de24 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 d872cb6..ddd237c 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 d1af121..4956c20 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 3214bf4..4213784 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 9c88684..5df2de1 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 e9fb626..5ad8de0 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 8dd2265..ef78d52 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 ae1b6e9..5dd3f35 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 e70ce85..6461644 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 7d80078..df6561b 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 2f264b4..ff51a09 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 75904d6..6e28fa4 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 629ddb5..13d1419 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 cf161da..24afc1e 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 342fe45..e7fb089 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 df43970..88851ac 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 8822700..1bd173e 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 c2ff815..fbd7cc8 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 9a8c832..05fba29 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 d626f3c..2df2cf3 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 db7cdb2..0c9198c 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 05ced50..3c56e31 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 738605b..bfb2a31 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 bdc353c..8eaf2d6 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 0c99bac..342e66c 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 031e807..7a85064 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 84b41ee..f4f598a 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 1b3e6b7..3c3e7e2 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 e5a4f8d..b9fa41a 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 baef23a..6b29fff 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 76a6b43..86cfbcd 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 f91fba0..448f474 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 321c54e..73f9fb4 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 387a75f..2ef5f2a 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 290864d..3d939f1 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 < exp diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink index 51dea20..e158964 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 45b8615..a1a6517 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 a12a9f5..ed3e25b 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 41a193c..c6f8066 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 b8c3bf3..88a6f40 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 f8855a2..7187e80 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 c5fc099..3806f56 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 24ab722..a86626a 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 ae3127f..cf6e471 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 58a7148..bbf81f1 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 a702ba9..a2bb5fd 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 53528c2..80d3e2d 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 7dfc8b7..3eadbbc 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 d971547..ffac61d 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 0ee3e8a..4366474 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 98f100a..3585ef5 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 20fb278..34c733f 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 ee0829a..ff8825e 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 320a718..3c6f041 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 c69ad88..5e59c4d 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 779f96b..c0a77e4 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 ad97e17..90ba9bb 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 b00f0a6..07a68ad 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 4cfb511..4c4ae74 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 954bd7e..4481ce4 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 5f9d126..8629cba 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 be074f0..a7474fe 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 fc6b069..35c0ac3 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 8efb063..78eb99a 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 747d4d2..714631e 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 f40a342..b894f49 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 bab99b1..842acc1 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 7e3a757..9c1f46d 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 6589d84..2b0cfa3 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 15b50b7..c1bb818 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 0c6aefa..a0ba383 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 db00a5b..8ce6e65 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 b4fec90..cd484e6 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 91463f8..a0a49e6 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 5d078b8..b1ad2e0 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 4f41e45..1a607df 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 bd00460..25bcae2 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 bcc23a2..8762b94 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 fab6140..a8d1160 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 1ba6409..9c2a18f 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 < in y diff --git a/tests/rm/rm4 b/tests/rm/rm4 index e000be1..cbc226e 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 85d7fef..048f9a7 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 af8e2f3..74d039f 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 3b7b6f2..c1bb4c2 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 52366d4..d26843a 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 9aae56e..5d5b151 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 3e25dd1..8f41a04 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 01d6c81..80e13b0 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 f02a6ed..7500f43 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 aea6a1a..b1b9612 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 2d38d4f..104ae48 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 23f3c12..e8b150e 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 e0d79fe..71f5dc0 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 46e7ce8..fc13435 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 72d51d9..3ef03dd 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 025272c..8903239 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 0a4b81b..c521b03 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 b9f6ae3..8c71cea 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 406ebcc..905d66d 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 61caafd2..34bdacd 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 514a213..416cb44 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 < exp diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f index ddfbe66..cf50fa2 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 62498d5..9392ade 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 4419742..456a30a 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 b13ad06..0fbcaae 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 f3ea29a..a16e015 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 1698ab1..ef1543e 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 05db80c..310ea30 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 070b727..57f5038 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 < exp diff --git a/tests/touch/fifo b/tests/touch/fifo index b8209a4..57bb5cf 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 517ad7d..3fc6681 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 28527e8..f10eca8 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 95470c0..3090bf0 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 92347bd..3dd8a80 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 4ce4ec6..e124a2e 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 988ef04..88a4425 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 8d1853b..9d21dbd 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 ad42c1a..05704fe 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 85cf488..05c2ac7 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. -- 2.7.4