]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: factor 350 fail=0 initializations into test-lib.sh
authorJim Meyering <meyering@redhat.com>
Fri, 30 Oct 2009 09:50:21 +0000 (10:50 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 30 Oct 2009 11:50:12 +0000 (12:50 +0100)
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.

345 files changed:
tests/chgrp/basic
tests/chgrp/default-no-deref
tests/chgrp/deref
tests/chgrp/no-x
tests/chgrp/posix-H
tests/chgrp/recurse
tests/chmod/c-option
tests/chmod/equal-x
tests/chmod/equals
tests/chmod/inaccessible
tests/chmod/no-x
tests/chmod/octal
tests/chmod/setgid
tests/chmod/silent
tests/chmod/thru-dangling
tests/chmod/umask-x
tests/chmod/usage
tests/chown/basic
tests/chown/deref
tests/chown/preserve-root
tests/chown/separator
tests/cp/abuse
tests/cp/acl
tests/cp/backup-1
tests/cp/backup-dir
tests/cp/backup-is-src
tests/cp/cp-HL
tests/cp/cp-a-selinux
tests/cp/cp-deref
tests/cp/cp-i
tests/cp/cp-mv-backup
tests/cp/cp-mv-enotsup-xattr
tests/cp/cp-parents
tests/cp/deref-slink
tests/cp/dir-rm-dest
tests/cp/dir-slash
tests/cp/dir-vs-file
tests/cp/existing-perm-race
tests/cp/fail-perm
tests/cp/into-self
tests/cp/link
tests/cp/link-heap
tests/cp/link-no-deref
tests/cp/link-preserve
tests/cp/no-deref-link1
tests/cp/no-deref-link2
tests/cp/no-deref-link3
tests/cp/parent-perm
tests/cp/parent-perm-race
tests/cp/perm
tests/cp/preserve-2
tests/cp/preserve-gid
tests/cp/preserve-slink-time
tests/cp/proc-short-read
tests/cp/proc-zero-len
tests/cp/r-vs-symlink
tests/cp/reflink-auto
tests/cp/reflink-perm
tests/cp/same-file
tests/cp/slink-2-slink
tests/cp/sparse
tests/cp/special-bits
tests/cp/special-f
tests/cp/src-base-dot
tests/cp/symlink-slash
tests/cp/thru-dangling
tests/dd/direct
tests/dd/misc
tests/dd/not-rewound
tests/dd/reblock
tests/dd/skip-seek-past-dev
tests/dd/skip-seek-past-file
tests/dd/skip-seek2
tests/dd/stderr
tests/dd/unblock-sync
tests/df/total-verify
tests/df/unreadable
tests/du/2g
tests/du/8gb
tests/du/basic
tests/du/deref
tests/du/deref-args
tests/du/exclude
tests/du/fd-leak
tests/du/hard-link
tests/du/inacc-dest
tests/du/inacc-dir
tests/du/inaccessible-cwd
tests/du/long-from-unreadable
tests/du/long-sloop
tests/du/no-deref
tests/du/no-x
tests/du/one-file-system
tests/du/restore-wd
tests/du/slash
tests/du/slink
tests/du/trailing-slash
tests/du/two-args
tests/id/no-context
tests/install/basic-1
tests/install/create-leading
tests/install/d-slashdot
tests/install/install-C
tests/install/install-C-root
tests/install/install-C-selinux
tests/install/strip-program
tests/install/trap
tests/ln/backup-1
tests/ln/hard-backup
tests/ln/hard-to-sym
tests/ln/misc
tests/ln/sf-1
tests/ln/slash-decorated-nonexistent-dest
tests/ln/target-1
tests/ls/abmon-align
tests/ls/capability
tests/ls/color-clear-to-eol
tests/ls/color-dtype-dir
tests/ls/dangle
tests/ls/dired
tests/ls/file-type
tests/ls/follow-slink
tests/ls/infloop
tests/ls/inode
tests/ls/m-option
tests/ls/multihardlink
tests/ls/nameless-uid
tests/ls/no-arg
tests/ls/no-cap
tests/ls/proc-selinux-segfault
tests/ls/readdir-mountpoint-inode
tests/ls/recursive
tests/ls/rt-1
tests/ls/stat-dtype
tests/ls/stat-failed
tests/ls/stat-free-symlinks
tests/ls/stat-vs-dirent
tests/ls/symlink-slash
tests/ls/x-option
tests/misc/arch
tests/misc/cat-buf
tests/misc/cat-proc
tests/misc/chcon
tests/misc/chcon-fail
tests/misc/chroot-credentials
tests/misc/chroot-fail
tests/misc/close-stdout
tests/misc/csplit
tests/misc/date-sec
tests/misc/df-P
tests/misc/env
tests/misc/env-null
tests/misc/false-status
tests/misc/fmt-long-line
tests/misc/groups-dash
tests/misc/groups-version
tests/misc/head-c
tests/misc/head-pos
tests/misc/help-version
tests/misc/id-context
tests/misc/id-groups
tests/misc/ls-time
tests/misc/md5sum-parallel
tests/misc/mknod
tests/misc/nice
tests/misc/nice-fail
tests/misc/nl
tests/misc/nohup
tests/misc/od-N
tests/misc/od-multiple-t
tests/misc/od-x8
tests/misc/pathchk1
tests/misc/printenv
tests/misc/printf
tests/misc/printf-hex
tests/misc/printf-surprise
tests/misc/ptx-overrun
tests/misc/pwd-option
tests/misc/pwd-unreadable-parent
tests/misc/readlink-fp-loop
tests/misc/runcon-no-reorder
tests/misc/selinux
tests/misc/seq-long-double
tests/misc/shred-exact
tests/misc/shred-passes
tests/misc/shred-remove
tests/misc/shuf
tests/misc/sort-compress
tests/misc/sort-continue
tests/misc/sort-merge-fdlimit
tests/misc/sort-rand
tests/misc/sort-version
tests/misc/split-a
tests/misc/split-fail
tests/misc/split-l
tests/misc/stat-fmt
tests/misc/stat-hyphen
tests/misc/stat-slash
tests/misc/stdbuf
tests/misc/stty
tests/misc/stty-invalid
tests/misc/stty-row-col
tests/misc/su-fail
tests/misc/sum-sysv
tests/misc/tac-continue
tests/misc/tee
tests/misc/tee-dash
tests/misc/timeout
tests/misc/timeout-parameters
tests/misc/truncate-dangling-symlink
tests/misc/truncate-fail-diag
tests/misc/truncate-fifo
tests/misc/truncate-no-create-missing
tests/misc/truncate-overflow
tests/misc/truncate-owned-by-other
tests/misc/truncate-parameters
tests/misc/truncate-relative
tests/misc/wc-files0
tests/misc/xattr
tests/mkdir/p-1
tests/mkdir/p-2
tests/mkdir/p-3
tests/mkdir/p-slashdot
tests/mkdir/p-thru-slink
tests/mkdir/p-v
tests/mkdir/parents
tests/mkdir/perm
tests/mkdir/selinux
tests/mkdir/special-1
tests/mkdir/t-slash
tests/mkdir/writable-under-readonly
tests/mv/acl
tests/mv/atomic
tests/mv/atomic2
tests/mv/backup-dir
tests/mv/backup-is-src
tests/mv/childproof
tests/mv/diag
tests/mv/dir-file
tests/mv/dir2dir
tests/mv/dup-source
tests/mv/force
tests/mv/hard-2
tests/mv/hard-3
tests/mv/hard-4
tests/mv/hard-link-1
tests/mv/hard-verbose
tests/mv/i-2
tests/mv/i-3
tests/mv/i-4
tests/mv/i-5
tests/mv/i-link-no
tests/mv/into-self
tests/mv/into-self-2
tests/mv/into-self-3
tests/mv/into-self-4
tests/mv/leak-fd
tests/mv/mv-n
tests/mv/mv-special-1
tests/mv/no-target-dir
tests/mv/part-fail
tests/mv/part-hardlink
tests/mv/part-rename
tests/mv/part-symlink
tests/mv/partition-perm
tests/mv/perm-1
tests/mv/sticky-to-xpart
tests/mv/to-symlink
tests/mv/trailing-slash
tests/mv/update
tests/readlink/can-e
tests/readlink/can-f
tests/readlink/can-m
tests/readlink/rl-1
tests/rm/cycle
tests/rm/dangling-symlink
tests/rm/deep-1
tests/rm/deep-2
tests/rm/dir-no-w
tests/rm/dir-nonrecur
tests/rm/dot-rel
tests/rm/empty-inacc
tests/rm/ext3-perf
tests/rm/f-1
tests/rm/fail-2eperm
tests/rm/fail-eacces
tests/rm/hash
tests/rm/i-1
tests/rm/i-never
tests/rm/i-no-r
tests/rm/ignorable
tests/rm/inaccessible
tests/rm/interactive-always
tests/rm/interactive-once
tests/rm/ir-1
tests/rm/isatty
tests/rm/no-give-up
tests/rm/one-file-system
tests/rm/r-1
tests/rm/r-2
tests/rm/r-3
tests/rm/r-4
tests/rm/readdir-bug
tests/rm/rm1
tests/rm/rm2
tests/rm/rm3
tests/rm/rm4
tests/rm/rm5
tests/rm/sunos-1
tests/rm/unread2
tests/rm/unread3
tests/rm/v-slash
tests/rmdir/fail-perm
tests/rmdir/ignore
tests/rmdir/t-slash
tests/sample-test
tests/tail-2/append-only
tests/tail-2/big-4gb
tests/tail-2/flush-initial
tests/tail-2/follow-stdin
tests/tail-2/infloop-1
tests/tail-2/inotify-race
tests/tail-2/pid
tests/tail-2/pipe-f
tests/tail-2/pipe-f2
tests/tail-2/proc-ksyms
tests/tail-2/start-middle
tests/tail-2/tail-n0f
tests/tail-2/wait
tests/test-lib.sh
tests/touch/60-seconds
tests/touch/dangling-symlink
tests/touch/dir-1
tests/touch/empty-file
tests/touch/fail-diag
tests/touch/fifo
tests/touch/no-create-missing
tests/touch/no-dereference
tests/touch/no-rights
tests/touch/not-owner
tests/touch/now-owned-by-other
tests/touch/obsolescent
tests/touch/read-only
tests/touch/relative
tests/touch/trailing-slash

index 2c0d7fae69d9a31760b900c29ea40e3ae5d994ac..4fad176065209109cc1dde3d834a3b6c874b77f4 100755 (executable)
@@ -24,7 +24,6 @@ fi
 . $srcdir/test-lib.sh
 require_membership_in_two_groups_
 
-fail=0
 
 set _ $groups; shift
 g1=$1
index fc378dec4ea710380318f604982d57d9d341c479..dc7e9d00a8a05991cac989e91911d805d060e7a5 100755 (executable)
@@ -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
index d4f19ce71380aea8603a99ff3acb515082ea1d3c..1a20e05bf7701baf2b52add9a0a28e2eb2a4703e 100755 (executable)
@@ -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
index 3ec49e9e7dbe0121bd669c9a2bf65cd151b461c0..175c1b2b892cd252d7814346d5bda85662f1b472 100755 (executable)
@@ -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
index c24aa3f2466a740c53918ac71770bb955f2d76fc..87295d4e67318e2c98047f8d20bd656743daba53 100755 (executable)
@@ -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
 
index d29a65118c9213b6a1bc88c044b069540f1d89d2..b0f2e2701e4da3154f3c049feded61fc021edb27 100755 (executable)
@@ -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
index 8d5979a3a3c718b2eaad617041bb9db98f7a3b45..f00ef4bf85da24362f897b127bac1586018adbd5 100755 (executable)
@@ -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
index 97823e090b27b3bdf6562dbf0a5cd9601ea86290..d74dcc3be182e0da30bde735335401e787417c6a 100755 (executable)
@@ -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
index fc0243c51e6adccfbc93b332fb7f4f6fed89b436..71c2b7db7d6ca588dbeb55f4d019147f3134b52c 100755 (executable)
@@ -27,7 +27,6 @@ fi
 
 touch f || framework_failure
 
-fail=0
 
 expected_u=-rwx------
 expected_g=----rwx---
index d0d739ef4f6fe29d587204fb84b3799b4257f7ca..2ee6c01a7ad92d7525fedb5f590188037829e4a6 100755 (executable)
@@ -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
 
index 24cc01e7d2d162ef3f001311181c7336bf6735fb..82aeb5fa55ce23f0679eafbfa259de0962a1204b 100755 (executable)
@@ -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
index 36423cb2032e4d101dd2c303a674fd13eab4729a..044cf3c8a461407be4cdc731d441f594e50d88aa 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # Before coreutils-5.92, this would mistakenly succeed,
 # and act like `chmod 0 .'.
index 5fe74ee1a5d156fec6d02c47542c1a4847777ad2..4b117f875ab53e277b151a4c8b005dd36988d6f1 100755 (executable)
@@ -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
 
index e0e984680d8299c600f20f6d7ec3d718df41b1cd..9f2d08e025b40c90ee5d3d484a324f45f05ccb62 100755 (executable)
@@ -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
index 6ecf643110597899927dce6aac74ef9acdc503c0..6a7742750e2f08722b88d5d0e2e677d86288c02d 100755 (executable)
@@ -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
index 32d815be1330ace8f45150ae91abf1597c1035fb..ae0e51c9a24e7e121b2e51b752205f4ae77acee8 100755 (executable)
@@ -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
index 1f1894427db1a9c6bcf559a90d3b6c2095a0908a..9dd90ad3595ec3cc8a0225d77ceb9526a005f269 100755 (executable)
@@ -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,
index 6708da0a904c2be637da6ea8a5ccd973f6aa5ea3..95a9cd1d36b042ae48c945f5582916b7f8f386f7 100755 (executable)
@@ -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.
index 24d0f93e18443f4b85da7551d4a12483ef99f294..c609751debfc32940f93bf319f3545ee484ddcd3 100755 (executable)
@@ -26,7 +26,6 @@ fi
 
 ln -s no-such dangle || framework_failure
 
-fail=0
 
 set _ `ls -ldo dangle`; shift; user=$3
 
index d3326204758ff33f31f4f10a8ed45db539ba4892..f5c4fce3b30c5b12eca3b9154cef5c50f9646d36 100755 (executable)
@@ -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,
index 4ee285647b5a6de39aa919d9960df550272bf239..6e717f6953ac0dedac498b67baa38fa44d46121f 100755 (executable)
@@ -46,7 +46,6 @@ case $host_triplet in
   *) ;;
 esac
 
-fail=0
 
 chown '' . || fail=1
 
index e9086b8f592a1eb73fd2f131c72160333708c874..42f6692056f05bc33cbdf532c6110828c60e94d0 100755 (executable)
@@ -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
index 059a1e10c4b8b6919cf474d8f215ce2fb5635201..2f8742880a1a052f00b32d1e9877d72f7f58593d 100755 (executable)
@@ -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
 
index cc19f938c1a8d670b33294e2903207002d79cc7f..73745956b8c4a76fdce957fabf5833a84d054cf8 100755 (executable)
@@ -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
index 9f0d0d7199c6282ad656901f084d1c3a723bb1f2..a82d213e20e97f893a2c848974047d0702119770 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 mkdir x y || framework_failure
 
-fail=0
 
 cp -a x y || fail=1
 
index f226382d0977f22e999f50b0d80dd0749be35868..bf03e590aa3a6483c4f809269d98a56f659bd874 100755 (executable)
@@ -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
 
index 17fff79b94b7d38accd025438136e5b0bb15a35a..88f10e9cd2f6032fe4f753d0e28a0ad85bf810cb 100755 (executable)
@@ -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
index b1359c098d5caf43d82a1300d3f999eb32424e54..82bf4ae3096b9fa61160efc2e9fee76e0e1b1472 100755 (executable)
@@ -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.
index 5868fa207e75c5cdde2b4690be6c52a955d66db4..3e3dab4222bd92f7b55125b32c9cc191983137d2 100755 (executable)
@@ -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'
index 67f8a565214b09e8abbe080989faba952191921c..59f60dd4c1384cea62010e9e7692b0a0b4665a85 100755 (executable)
@@ -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
index 59d03a3ef803bbc9e21699e2279f84c74d9c6782..c43734ef12617438a775d7fa53daeb71fa36493c 100755 (executable)
@@ -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
index 8f3020becc2fbf30990aa689cb27d6c4e04843f5..620560b264079efd4d12a9d53290fc1dc6f322e6 100755 (executable)
@@ -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
index da04c451fe2afc8f8fbe22fb84de5c2775f1586b..1ba585fe0ce00e0b6eb4329a947b785a6ea8ef7b 100755 (executable)
@@ -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.
index d37cb1152716e3cae406ce0a5273764690f742aa..0a8872d899450ac66a6eacc4fd9ecbca4983f0b9 100755 (executable)
@@ -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
index c5429d72c5796f29cb4fddb90e83313e749aaab0..aecc41bad38d8b499bd82677660250eb8319b175 100755 (executable)
@@ -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
 
index 0c1e282a930a5f1b71e8ae3be785ca9c5b0013ea..df41c178304aa857739482e4475d0f5484cf6f07 100755 (executable)
@@ -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.
index 7e5e9d0015b379130501e8343dc02d0db99e4ce3..341536aa92fe43637172de17d183a44e59579c40 100755 (executable)
@@ -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
index e7166a7171dd664790050533456c971e1256cd77..0299e1e9cc2c7ac79ceaef61d28c9023ef7a53f2 100755 (executable)
@@ -28,7 +28,6 @@ set _ $groups; shift
 g1=$1
 g2=$2
 
-fail=0
 
 umask 077
 mkfifo fifo ||
index f4706650463a4227a74a236eafaf18f03455f87b..0a4b25323fd52e5f57fd1dc6599168eb46682135 100755 (executable)
@@ -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
index cd8723236deadeeb4658125903aed29616f252f4..84a0096f81c9d7769684374c79cf8033af3c441e 100755 (executable)
@@ -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
index d9cf4f8279bca80a3cbc0bfaa632458c4e4a74ac..416e64ea833b7a7c4310721ca1876586300e7906 100755 (executable)
@@ -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
index d9379b52e9367f8df63368d2c6ff061b7a375662..c0f36bf868c50f71086a4eff075a123e202146ff 100755 (executable)
@@ -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
index d71a114e1a78af1cdce58e6a6233c08c83a59f57..aa570671b89e9247d4a7407b6a64f7647c202a74 100755 (executable)
@@ -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.
index fcaef2d8e3d9b2b7e1d5bf20b2802adb50688829..b07a9d9b278ac413d4a41381dab94b809217813f 100755 (executable)
@@ -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/.*,,'`
index 86164ecc0b56db023fb72205570b526fa07aae96..a362471ba5ca8ed33e1d4dc895f401f9d22c6139 100755 (executable)
@@ -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
index f323d6bd1333d413051e6589d8383e2de7f06ce4..1f70bec13ff5806b6b81ad583e81f77404dbb661 100755 (executable)
@@ -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
index 353e3ce05a76e30e3abda1821a8f2224128dee78..c1af5448e571d80ef5cb4e7d3f01d675340af004 100755 (executable)
@@ -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
index fe130410563b439cff5a036660bf534057f7a348..5da5ea7c6587e243041773e1e3d6d669dae88e8f 100755 (executable)
@@ -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/,
index 186e7b2fb2cfab8d625bb0419ce3b56468c8a96d..674824bbeb323665bef6b45527ca0e0bee550646 100755 (executable)
@@ -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
index 7cc6f419ebe671de54ad9063490bcc42d07585bd..0f157258716122ec53dab5daf68b418de7e3443e 100755 (executable)
@@ -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.
index f2739a3e6cebc0c46b496fa119f498be6485e1bd..9549fd17619ece6e838e2a659db20d5e4edd897c 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 touch f || framework_failure
 
-fail=0
 
 cp --preserve=mode,links f g || fail=1
 
index 1f3f10b884e64d0bafbe42ec4b7bdecd747a4ec5..5b932af60175597ed225aaadef71f1ef08ecf32d 100755 (executable)
@@ -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
index 407b77272fb15acb8fbe5d19c9cd9b541ca1b81f..f9afc861872db80ef1ce62d8111594851ed07372 100755 (executable)
@@ -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
index e06143c9f744178cf3b9178f8a5f397541279019..93e21bdc19a9ddd81d8cfb76734473f5603ff820 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 kall=/proc/kallsyms
 
 test -r $kall || skip_test_ "your system lacks $kall"
index 9103d8a0aa01a725c37c354c5f7be3e3cf3b05f5..f71db612a45bc3a279beb9a677bce7575ab373c0 100755 (executable)
@@ -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.
index 4b4e635861df53f3244d1c24823988897fc76abc..b88dc1e15b68b1c8e2f29fd9ba0e8ceef748d55a 100755 (executable)
@@ -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
index 5e39b72652240d8b90ddc4bed1c023c2c661c402..949acb48cd90b7e0b432aa32196d19f6cb2f5a92 100755 (executable)
@@ -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
 
index 0c752467c06984148362b424a8dc7e58372ea62b..7e4c9073e386534bf48b8511583637b00ea84fcf 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 : > time_check
 : > file
index d5deb6857043af20ca55f082d384423ba6fac159..79b599ab2213e1a9198b67014606162b135b61a9 100755 (executable)
@@ -220,7 +220,6 @@ cat <<\EOF | sed "$remove_these_sed" > $expected
 
 EOF
 
-fail=0
 
 compare $expected $actual 1>&2 || fail=1
 
index ed755bc1352858e7ce4e4bbac16a784d7cc78e2e..1225af2c52df94c0ab66b88df6c043d4d28b15d9 100755 (executable)
@@ -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
 
index 9683a9e33c89b4a926d39182e17ee664ab93b5be..cb1734bf20df18495c8d1406b53daa24ff463e54 100755 (executable)
@@ -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
 
index eaacd14753668a9b178efd0491c365c6e258ffff..d7829f346fe97892c2975b742b16bcb85f5b02e0 100755 (executable)
@@ -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
index c2641dbbeae4386f8d42b5f9eac448e4229f0b08..65816a13c0fd3ab2b64d205ed260b84731a07226 100755 (executable)
@@ -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
index 1b0ee7ada2d8ff1ee507524288a8efe23d86fd09..6ed9c26be88363243d52e5debb41badb4987811a 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 mkdir x y || framework_failure
 
-fail=0
 
 cd y
 cp --verbose -ab ../x/. . > out 2>&1 || fail=1
index a821e7ec05ea0946f6a09f9c00e301ccf0ddc705..1e4e94c3d579f3e511e2e5e5d9906c537616673e 100755 (executable)
@@ -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`
 
index b2a5d744981721ab0c1bc12ba027e1e2811c5d88..6331839849b3a7d3734515bf765c46aaafd74315 100755 (executable)
@@ -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
index 7e80bee152cd8e2abaef1915e3e99413b2d9a21b..05c487f6f920f9c96de03f8ba425bb83849731b2 100755 (executable)
@@ -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
index 07a019a49f37bc00994c54e764b4aae5a2ac3831..53562d1dd5ba55d75112436ebf9ba42aa02687a9 100755 (executable)
@@ -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
index 056d961cde02eb66aa44a012dead492546efc459..101e37564921b0a3143144db4a3d89f20d82cce8 100755 (executable)
@@ -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
index 5d6e95b1f32858534d0f5c911076c10f54a318b4..244345a4a24c08850e135094c341c14736597829 100755 (executable)
@@ -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
index c9abfc01fde891b3bf3f760af51f67119e0458e8..f11542a2d04d158a1702742a357e9bf13eea725f 100755 (executable)
@@ -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.
index 937f99e17ac32f6e564c83d060b956ded7fcf631..6bbf505f531cba0d5ea4ea97e089c1ed07638e73 100755 (executable)
@@ -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
 
index 8bf0c851deb74f38020681653e37358ad320a9ae..ce57b6b24efd3259289ed66fe3cf69fcd2089a5b 100755 (executable)
@@ -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
index a6c8fba4ed206db8eedd111dc43a545204f8a32e..5c903c8d5071ca1f80e60f55d5a81410c42947de 100755 (executable)
@@ -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.
index 4112e0e28a697c8286a79363edf84e1feb90816b..4b213c1f9b622182dc8088cd6e62adc80f08f4a8 100755 (executable)
@@ -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
index 7b6273d2da93685f7d34f4b31c40cabac9d9196d..dbedb874055dd2abc6923cbaedbe3aceaffa59c3 100755 (executable)
@@ -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
 
index 8e600286044aca8b199d6a81ec096d1a024f595b..d5df5371d61bcff9b3b714fd3a76af15dbeb02ce 100755 (executable)
@@ -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
index 4981efba86e7bbbcecf6c9aef18e8661ef7937f3..4dc9fe03dc4fa73a06991c3e26af9cc5499a0891 100755 (executable)
@@ -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.
index 1812d16a9bf8c6eac9e36bbab5c7aa9ed83a8ff6..a9779c62a1dba83a87e4210d38241db77572331f 100755 (executable)
@@ -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
index 5714e57205f03851229f4d3b287f76874c5b44ab..38253bd04ec3cbd768ae60ea2b819b8b1b6a8e86 100755 (executable)
@@ -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`
 
index cb23cc12424f7b6287fe4d54893ffaebc3a2d6d2..3d7fe031d3adf4e78a691bc98fb93dc264df6612 100755 (executable)
@@ -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
index ce02807fc9bd081692911363fbf8b1fae1fdfdac..7ed7d40da0061c07768b806a52951d4cf0df06c2 100755 (executable)
@@ -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.
index 15dd9a6ca24975bdbf4674af5e33c6d917de5a44..12c1ef428f76e4d2b11a3f1045c7eab50770d5d8 100755 (executable)
@@ -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
index c280b884edbe85f89864855e2def042837298e2f..fd53f1f521f94659d2fff537a2025f612559c7bb 100755 (executable)
@@ -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
index d9dd247d0bda92f9f1e49610e714b2317aa37abe..fe4ae19bce407e989e6cc9dc5eb26c0c41de4138 100755 (executable)
@@ -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,
index 3373195834bc6a98fce0490256a877f60a3ae7db..fe65fca028ba5993ea4a582150ab3127be12595f 100755 (executable)
@@ -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.
index 030a40a22a21fe4a80a4819d295d613e33b8a9ad..dde7903225663e5f977abc15f578dfe1db5e62be 100755 (executable)
@@ -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
index 05f9b2f9c2113bac5f4a92b28780980fde0be41d..0f36b0c681dcfc8aae1c73c2627896fc793a17a7 100755 (executable)
@@ -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
 
index 68ec613620231f07526f842af32808ba72a35eba..c87d3b516b2e4a47fe958749453738cf5249ed84 100755 (executable)
@@ -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
index f62441970e5aed415630452e1838b74c4ffca195..99f7a1578d2b524c5388f0d7683fe539ab1ac8d0 100755 (executable)
@@ -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:
index 9ea8df3283f650cab59dafab7bb73510b952abaa..9b2927012c139537f24d137bc3f583bec6af3ce7 100755 (executable)
@@ -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
index 986689a687e73a514ce9dfd1b9e2e02ddaee7cc1..3d24572bb27a4012aee5d6875f17e4e0b2c01c07 100755 (executable)
@@ -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
index 0f95fe9d3a81bb463d9ce89f552621abc22bcfb3..1d395c42ea21f43436bcb5ee066cad5d361e816e 100755 (executable)
@@ -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
index cbe147abfc1e648c32dfd470b551dff6808cc043..fcaf1f3f1f59ba9404dc1d63eab6a7111bdfa428 100755 (executable)
@@ -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
index aac17183d6052d150fe1e0f786c90d618e138cf3..826a70f669df92a28129821f6f9ddefd252b977f 100755 (executable)
@@ -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
index 3653067d6a738ed44b293aa936470a93ccb8065f..45bd17e46d86f5f19812c1dcad3f16f23e8b1ee3 100755 (executable)
@@ -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`
index 997bc057df8bcf882ef84aa8da7097261cbf28c2..10244630b4f66d47e521fd1585c660baed27cd4f 100755 (executable)
@@ -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
index f59ca73988fbdb6c3b432752d1109d02427363d2..e5ddb2b53b84af06f2b375f894ffdaa4a39f788b 100755 (executable)
@@ -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
 
index f875ee0bc9d89364feb006c210254d7518716195..0e42e3a2277903143bf55db2801e39b03f364026 100755 (executable)
@@ -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
index 7fdb7398b97304d0d65cb37d7e004c170947d1c6..a09be6318a77ead212138b12c561f4fda2f9613e 100755 (executable)
@@ -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
index 0740ca50659b7fbe4e2aef9a4faacffdba9411db..012f0a00b27759fb4fb2bb6d9f25bd32a5068428 100755 (executable)
@@ -26,7 +26,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 file=file
 echo foo > $file
index 632fef5ab2ef0f40b1ecee0023d0fce86f711572..95ed0387926d172e61ece21a1ecfd84a336d0233 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 ginstall -d d1/. || fail=1
 test -d d1 || fail=1
index a1a9d6831109538a2150a1c184ef48c22b8e62f4..1edfa544ffcb16eda9c4029d53502797cf46417b 100755 (executable)
@@ -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
index 234ebe790e14ff51887b1d363ad2432b21bbc300..b31d29d5b799cde968708981717236ae71ddeefd 100755 (executable)
@@ -30,7 +30,6 @@ u2=2
 g1=1
 g2=2
 
-fail=0
 
 echo test > a || framework_failure
 echo "\`a' -> \`b'" > out_installed_first
index a91d8bbf65862ac82706409e156dab26e7346c6d..95aacda2fde9b0bf2e23e32dd03bd4de41bfa839 100755 (executable)
@@ -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"
index 88072ccd1527624fdba5fca3383ae42f12d33f40..d96d0d32b37bf7738749c0a31ee815c20233ed60 100755 (executable)
@@ -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
index 37da21f7c25c2ff3eaa69f3cee2415873d7194d9..157bb6a4537e683aa5baa983a96da153bb763106 100755 (executable)
@@ -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.
 (
index 68c9ca22f2fdbc468e91ffe5f939972048cd0b8d..cc3e10e0cb3016ced72fd40f5f152af64c630d1f 100755 (executable)
@@ -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
 
index 54bf9ebc8b69b248443a26dfffed2c61aed7b7a7..6ff0b955d7f7c39af1056932584c0a226c8e0bdd 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 touch f || framework_failure
 
-fail=0
 
 ln --backup f f 2> out && fail=1
 cat <<\EOF > exp || fail=1
index 510b57abfe0d97fc2abde38726b816b5c8fabfa5..22b5923fec2e9226e7c1d9851c9fd82f514b893b 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # ===================================================
 # ensure -s silently overrides -L, -P
index d42d68a27e9ce3901bf616f4514ee112a191c6c2..d2c8e3ec5ac00ae90f54ed1c605edd079ad95649 100755 (executable)
@@ -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.
index bc189fd9b24ac21de0b5122e0e5b610582bd2ffc..df9e2336c55a07a67da22046a2c4db109e01ddf4 100755 (executable)
@@ -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') ;;
index afbbd060df5ab639158fa83f2d92995bf9620e64..2237e304c2cb82ed051e7e5df435276136119c96 100755 (executable)
@@ -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
index 5496db7910aea353d337e9efc2b7744ea136dfe6..f681d51fffc863bee9fb917264dec9c01e8732b4 100755 (executable)
@@ -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
index 47df97ac0696b80258cfe1d2e3b6473c7a042bd5..51c32aba21548735fa15b79ac924c209048a45ff 100755 (executable)
@@ -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
index c45f54241197e9b4ea08bb931e724c9e32de4223..958a8ddb6eab5419bff432dc3bf35555c6c2b24f 100755 (executable)
@@ -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
index fd65ced083b45c3a5698d591f644c5994baea3fd..aa8cf4e77e04a7e482a934bec4cebdc7eb15cd6f 100755 (executable)
@@ -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
 
index 3ccf10eb8b273200c01e7039923f5f0acbeae70d..526d9e9c18245c4ad96a7d4e4101b389d26c0d7b 100755 (executable)
@@ -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
index 687d3dfba0159c4fa09ea240929027d658e29b9c..1f4ca2659ccbaa633ed6579aa8137c448d196535 100755 (executable)
@@ -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
index a2a2ded9ddfad1e296ec25a7a9e17f4b39d31a0f..b4607e15f64d1d53345d7b4debb6c46cb9e39ff2 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 mkdir dir || framework_failure
 
-fail=0
 
 LC_MESSAGES=C ls -lR --dired dir > out || fail=1
 cat <<EOF > exp
index d4b240f82eef40c6a9ab57a9f8f039d82e6cf6c4..60db1d0b628ae74b6bdd55229d83eec38e1c6c32 100755 (executable)
@@ -39,7 +39,6 @@ mkfifo fifo
 cd ..
 
 
-fail=0
 
 ls -F sub > out || fail=1
 cat <<EOF > exp
index 27b2a1c529f603a3e836206561d8e0d3c6904f3a..ba2df3f707ef5981f1102d01fb79e6ad426ab47c 100755 (executable)
@@ -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
index b77f88cdb6370a30b47494edb0696e68a2909461..d32e9782c693ce8fe6de3afbb77a2adce6bf19a2 100755 (executable)
@@ -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
index f911984a5a553fcbc10e4ade3fa8dfb36cdd2a44..58130e236de07cfbf47b6a60ab2f0125b356b894 100755 (executable)
@@ -26,7 +26,6 @@ fi
 touch f || framework_failure
 ln -s f slink || framework_failure
 
-fail=0
 
 # When listed explicitly:
 
index 836d50ead1b401d23277d86dcb888f1f815eab64..1c2c291e1fe704f45921ee81ba83f1af74089fed 100755 (executable)
@@ -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
index 815222db0cf015e0c491e5664134a35c9492f9c8..cbe6330cdd1b7be6d788c33d15e3f7c063633438 100755 (executable)
@@ -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
index a29b170819781e676063cdc3a29c1c03b35b11f8..4fe0f6559567bfe6ebb35b114e4c300e51d2f0d4 100755 (executable)
@@ -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
index e2c7f41ac553c906de5a6c9ad7577510306b22c7..a3421c878e62c77fba0f790435562adf3df1167b 100755 (executable)
@@ -34,7 +34,6 @@ out
 symlink
 EOF
 
-fail=0
 
 ls -1 > out || fail=1
 
index c551f1745fa63a6d52d6b3fe1ba018d7a977e5b0..c2ddf750717204a1bb3da0992b77057d3c331305 100755 (executable)
@@ -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"
 
index 362e6fa3dccc3c374b0cd033a173aa51acbf6b07..37caf6c87184e4d43d1c1230b34e11ee1ca19966 100755 (executable)
@@ -26,7 +26,6 @@ fi
 f=/proc/sys
 test -r $f || f=.
 
-fail=0
 ls -l $f > out || fail=1
 
 Exit $fail
index 763cab1868ab54774be377149b79ec8546fafe45..c0214732aff890b8045c35b78337b5ba3eaf421e 100755 (executable)
@@ -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"
index 5a9a4dd38609f6ac39f3a4eb9363ca96041368e3..28f58f3238f2df0fd3f171724b5d04c1c6573913 100755 (executable)
@@ -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
index 564eb3ef580bc9dfb9eb01a5719c483c2d54264e..5ebced6a34338e4a9740586f0acca9c10272a9a9 100755 (executable)
@@ -31,7 +31,6 @@ touch -d "$date" c || framework_failure
 touch -d "$date" a || framework_failure
 touch -d "$date" b || framework_failure
 
-fail=0
 
 ls -1t a b c > out || fail=1
 cat <<EOF > exp
index 98642b3beda76edc154a2721a29b57aba43ea9ba..cdecd710d86dcec2f4a8a85b36fe9eb03dcf973b 100755 (executable)
@@ -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
index c134273a407e8676ac6c08c03aa0aa7b7ae3e7b7..cb31a985d49527653efd5067880b1190af04d3bb 100755 (executable)
@@ -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
index 579362e7e88247b9501804ca0f53e4e7628db38e..86d871e9f6848ab7916add959ce31883d866b089 100755 (executable)
@@ -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,
index 9f2b14925ce6e4d4084611f42e324f096ea6c486..73d6e83510adb2cfb4ae5935735ef181560493a4 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 root_dev_ino=`stat --format=%d-%i /`
 t=`pwd`
index c2dd8e7a9d80ca52148f9235894947c24c20399c..704e2a398d99b1723c3e831e6829da9943e3463e 100755 (executable)
@@ -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'.
index 5079885f131c5e5bdf2d2bd81f93930ce566b075..ea94d49e766f222710ffbda54f76a43b32a2fced 100755 (executable)
@@ -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
index 04bce0e1a3ea43814cac6234d07ea6f550fc6bfe..4e7ab0a2786a3bb4b89b7164ad7eb45eca4fa5d8 100755 (executable)
@@ -24,7 +24,6 @@ if test "$VERBOSE" = yes; then
   arch --version
 fi
 
-fail=0
 
 arch > out || fail=1
 uname -m > exp || fail=1
index 11d553a2bcfc35c7dcf44298a6dece6ae28fd5de..34567a52b6bf7bc476839fa936463d903fba194f 100755 (executable)
@@ -30,7 +30,6 @@ fi
 # write separately.
 mkfifo fifo || framework_failure
 
-fail=0
 
 echo 1 > exp
 
index 8c1998726f8562117d5e9740877e1d179925866e..3fac2d021b8d20ef49410139e0c87fbfb7a8cb29 100755 (executable)
@@ -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,
index 723bfd0f3637a8261ac7a0d03c1da5585f178a68..417163d27be57fd79dc61c1c4e02fdc73e86c79b 100755 (executable)
@@ -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
index a9efbff7510b6a6eeecf39b97488c4d04a449e2b..148549a87720f7bdc334f0171db092242f4d9349 100755 (executable)
@@ -9,7 +9,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # neither context nor file
 chcon 2> /dev/null && fail=1
index f200f14ab0112990b3939bd11e853f1d53d424a1..c06da55d74bdf75d395370ad0c5e6851d23d06a6 100755 (executable)
@@ -26,7 +26,6 @@ fi
 
 require_root_
 
-fail=0
 
 # Verify that root credentials are kept.
 test $(chroot / whoami) = root || fail=1
index 877ad0aecb6ab33bab176c18aee9f67929e4ec65..38fd2844fdce40cc1f3c7f965d618cb730d52592 100755 (executable)
@@ -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
index fe911d8a961737479e538923561f78605ff5491b..fec1addc80273b656be0d5a284671189f29e3437 100755 (executable)
@@ -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.
index e4ba20e79fd89d01ca58434a651cadd8487b7db2..bf3865e49781dec2ececb7d54f8c5a1b72a77c76 100755 (executable)
@@ -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
index ff19408caed0a893c824728939e95af12591c0f0..c3d2f81309a56b99560aea55a9e1d9d0341b2750 100755 (executable)
@@ -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
index dcfeaa5a28a8655922b5139de12a2eb0634aa7ff..99d200ed7f902b4fd1da4788fb7c05b0e13029ed 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
               df -P . > t1 || fail=1
 BLOCK_SIZE=1M df -P . > t2 || fail=1
index fb3be2994aead9426cbe6043f3cd24f66556bbce..ab6ee76d1a4b4be0791a329f57adce1b6ce13310 100755 (executable)
@@ -24,7 +24,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # Verify clearing the environment
 a=1
index 432c6594e5d073a3e8155b010e3832ca0868505b..031fbb0763872e901cee83c92df67bdb127e6c0d 100755 (executable)
@@ -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
index 6b80f3b9efc77e8181713c2d8f62f6f805facea6..5562230ea742c605fa1e42fb90b93c4325117c20 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 false --version > /dev/null && fail=1
 false --help > /dev/null && fail=1
 
index bcabd99469e2685de2b4a3ff7623924957c434fb..561a7534d2af89db65aace789f66ac4b2677835c 100755 (executable)
@@ -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
 
index b2cb3bc45bf851cc66a10919033e8a292e221abd..05cb6ddf88d4d69b40bf53360532ad060b7d3535 100755 (executable)
@@ -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
index 41e3c7167cdeaaf10a674934404e04da9d60bf3e..f39fe43be953a1cdf682681117f3d4bbd81af020 100755 (executable)
@@ -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
 
index a93e2ceccb04e1a290f6e33dd5ee8709564cae15..06bd1ccd6e163590d543a0e57e86e4004b9f6c52 100755 (executable)
@@ -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) ;;
index a3aba32dbc8466fca62ebc99f796a2d1c537a586..a40c76214dd6f97c0b1e747a735b320360ac1a7b 100755 (executable)
@@ -26,7 +26,6 @@ fi
 
 (echo a; echo b) > in || framework_failure
 
-fail=0
 (head -n 1 >/dev/null; cat) < in > out || fail=1
 cat <<EOF > exp
 b
index da559070f263d50a8a6b9da6853496418c38a6c1..60283560224d7a89e1084b2813fa1e0bb90472d3 100755 (executable)
@@ -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; }
index c6c5e8920881a5d750c376d517eabbf2a1a54461..4ccf3358b4aef4f7055449c0ef8551714fc9e7a8 100755 (executable)
@@ -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
index dc0f54c2946c1a546eaf9fca80acf301ee79ac46..83924ef77c969bcff4a507a22d7f1c4ee71f88f7 100755 (executable)
@@ -22,7 +22,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 id -G $(id -nu) || fail=1
 
 Exit $fail
index abdd42932eaa3d9ff413b82707cf85578b900f88..67cbab96add50b6733324c7bab06ac2e47ff79c9 100755 (executable)
@@ -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`
index f37631f69f48b33248f96276dc583da53866220d..625e66e47a96568ad93f83b339a860967ab1e6a8 100755 (executable)
@@ -24,7 +24,6 @@ if test "$VERBOSE" = yes; then
   md5sum --version
 fi
 
-fail=0
 
 (mkdir tmp && cd tmp && seq 500 | xargs touch)
 
index 0f3de38ad8c7fe3f4f1328e9552f0be48d9457f4..ccec5bcf5b8aa88033afa0725b609319e56a5bfe 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 umask 777
 
index f85666e34f653b35a671858f9d27a150c6b2a287..30a88fec662caeefc64b871eb2ca6131d3ba0b7f 100755 (executable)
@@ -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
index 7a1bbe8ecea1ec1e73db4215e6f6eab94c60d7a6..c621ceaaa39bae5a13e64e042e248d7e7e7e3c4c 100755 (executable)
@@ -24,7 +24,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # These tests verify exact status of internal failure.
 nice -n 1 # missing command
index 2c4703c71223e87b234c8e43bae80dfbd4299329..a0fd10c1e8751c0f1eab2cf4c396b7dbbd28c124 100755 (executable)
@@ -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
index 96810588eeae0b0a57fcc048c4c2b50344a8d801..06e9ab48250cbcdc1d53a7b5bf776d04dd422384 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 nohup sh -c 'echo stdout; echo stderr 1>&2' 2>err || fail=1
 
index cf4185a2674c750833cdc52ed5661d69ee36e461..df1c997bfacb9c1fbc8517c7c5c4e7962e6a97bc 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 echo abcdefg > in || framework_failure
 
-fail=0
 
 (od -An -N3 -c; od -An -N3 -c) < in > out
 cat <<EOF > exp || fail=1
index 8d049ec5b25f6e5b07d0f92f53ffdfef83c21c47..3ab313468b2dfdb3e75ba5125a42624d1d02adf4 100755 (executable)
@@ -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
index 6cb56921a21c1a180fa680961d872c29d6f43ab1..00190484e0c7474c1ab64ec4e522d086dd0dfcdb 100755 (executable)
@@ -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 \
index 3e3d97c9a124f562165cd5710f9a71900a03287c..4f98336ad3a6bdaba3dad9736a6040205f8a306d 100755 (executable)
@@ -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.
index bc51fca0b0797bcf92a59d6ca80d542bfe0a4d8c..c2bd2e424d0bc7350bec1c1a44a7fe5ed7b4e060 100755 (executable)
@@ -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.
index 8961b4433932bb4fb06d826a0471bb3da01b7b5c..14682dc7d1e36dd3b91dbbfb9c30c4338a0a8199 100755 (executable)
@@ -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
index cf272f08b60216e2a7ed4cdfb6a4e3bce810ad51..36fd32663f4ec76277401b434a70e4ae41c40a59 100755 (executable)
@@ -26,7 +26,6 @@ fi
 . $srcdir/test-lib.sh
 
 
-fail=0
 
 "$prog" '\x7e3\n' > out || fail=1
 cat <<\EOF > exp
index d50d9e85921e60bfd3832c0f5e1491593b19c174..5f1923e90ba09fc7cc2d824beb986d665a068060 100755 (executable)
@@ -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
index 038109d5755df5fec7040165b6c4c1d7e53785f6..81147e32d29e5cdc8ddd9fab328daccd7077f562 100755 (executable)
@@ -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.
index 6c024211804dd60f12a86410175b14582d2d3172..35546f78190f953ef9c5ed1cc8c88aacbfb9c876 100755 (executable)
@@ -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
 
index f5c7ae2378017563f6857dcdbbf4ddcbf1101a58..2f2e599a428485309bd1a46aa7b177897b31dcf0 100755 (executable)
@@ -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
 
index b6d1c81b187c5408cc286a47b50e9fbc2ac2b03d..507c9d1404db83171cab38808bea768e03eb5c94 100755 (executable)
@@ -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
index 85fe745b70ff4728004dfb16766ab3cdddcae3b6..4aaa414e0fe647f26028143673f452dc7c6f76b9 100755 (executable)
@@ -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.
index 8211c80f7179c3d675744903e3c0b73695f19af5..a56ad0612a7547d2b11aafe3d979050792992438 100755 (executable)
@@ -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
index 6990f651a6c5b8a11495f4fb8f225ba3133b5b24..16560866073c84cc9c6c346bee9cbd010b15f8ef 100755 (executable)
@@ -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
index ed9d10524d81043ad0185a375a3511861acdb7c9..e25b4c09154b74d5a85154a7e5b83f20104a3730 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 for opt in --exact --zero; do
   echo a > a || fail=1
index 712c7bd670aba43cad4f8c1334c49a2e066d9ee7..b37392ebfcb85025aadd3e4c2a1b26f356982176 100755 (executable)
@@ -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
 
index f0fd5f9c381c361426d1ebb8480557f5e0d69bcc..6ffe9bdd0a20f23fb2be6333679460f693c4a011 100755 (executable)
@@ -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.
index 3013aaecc4a3827838d33370b23f76f18e4a61f3..a79441419ead5f5c3bb6efbeb26fb8ee586fd6cd 100755 (executable)
@@ -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.
index 7e319ca8e73e6e4fb1409d96c24c02e9ba1a46ab..7e4278e51e3bb3ceaa2e9755f064685c9ec171be 100755 (executable)
@@ -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
index 8b206f35cb81a4701c7ad16b0376bc235fa0a7d6..d45eb53e8b835a95930639f7a08df8ccc8ebcf5c 100755 (executable)
@@ -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
index 82305be4121117c549cf5760906c161ed8088b05..3071613aabac987a78015628f8dc70521a1d85ee 100755 (executable)
@@ -27,7 +27,6 @@ require_ulimit_
 
 mkdir in err || framework_failure
 
-fail=0
 
 for i in `seq 17`; do
   echo $i >in/$i
index a9027d24c5063d4f82b185b5cbe32eeaafe1fd49..071ad85a44ef490da1b80e504669e1fc73ff038a 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 seq 100 > in || framework_failure
 
-fail=0
 
 sort --random-sort in > out || fail=1
 
index 32b0ed25845dfc290b5a7303b41a794c130caf00..e046c3be19c2943aeeae6636c3b12076e0f40824 100755 (executable)
@@ -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
index 88d225a1d07c2e89677b7ea9841366bd6c7ff0ce..37cd3cd0feafc5f24bb880e0ddaf68aae6938a37 100755 (executable)
@@ -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
index ad38e6037f016d0bfc4935249d29ae116fc842c9..70ee0c009daa32378fd9af59fc33634802041645 100755 (executable)
@@ -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
index 808a3447d5598ae63ad9fbbe1dbc004755f69897..f6cf467cfb1054eeb07b8c3e252e9602b395a8a1 100755 (executable)
@@ -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
index 67dac8baacc0dc18f1d4bafc5d65c7c670f2e528..4ffc4c7e4d79defc3aa71aced19f78ac06c13699 100755 (executable)
@@ -24,7 +24,6 @@ fi
 . $srcdir/test-lib.sh
 
 
-fail=0
 
 for i in `seq 50`; do
   fmt=`printf "%${i}s" %`
index f0757fe3974189130a114c7471cc4feee98e12ae..b9a15567008672c0e019fd38f87a809ac33f3959 100755 (executable)
@@ -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
 
index cda94c544db3fcacde0a2107f8e90e518ec3fdf2..cea8dcb16a5e5caf4cc79fec42bed39fd71a880c 100755 (executable)
@@ -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
index 90e45d7f09766720ea772e02d6793b4495938f05..b6e52a4993c353b316f1a76514ebf485a5979704 100755 (executable)
@@ -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
index a7f93ca75e991340de2e51bb22bad232e8057aee..cb3fee533a3b455d081028e8abe0925095de1859 100755 (executable)
@@ -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
index d9f077779fa5bd1018ef697b1222695c79ac5f34..638024f7b6e91b1acf1ca0d7459eb7d39d95cbc6 100755 (executable)
@@ -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
index c98ab15e7d06b10a208d3d4437d5328f27b1d6eb..5efc7dd0a15c30624788db50d6b2e33fccbc0e9b 100755 (executable)
@@ -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
index f00edc95b61f8fc42a4ebc55e4aacb7885a83f52..473c76306db6040323d6cef99d0f64831cf05b3a 100755 (executable)
@@ -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
index 918c00ee7e56e503fa8dfcb9c7dd20b9301a497f..6a1c63e82b2106eeb7b29c79e9b90f5ecdd201e7 100755 (executable)
@@ -32,7 +32,6 @@ export LC_ALL
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # FYI, 16843009 is floor (2^32 / 255).
 
index d385660cf891de9d756fb1cbb146c980efc49493..afdc79f6dee8e6f231e6949b7dbbb771ec2f0e6d 100755 (executable)
@@ -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.
index 86eca7d052bdab9ac0ed2edd7bb6f93a4a135e5d..7a76d64ca6b8b490602a5045d805cb3295d41d0d 100755 (executable)
@@ -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
index 5dbb5c4e37bf76d3f08b0a8e6279f8fecce648fd..ecf414ccfa0b5faa8c7cad069288a331ecb3b230 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 tee - </dev/null || fail=1
 
 Exit $fail
index 08734e6f29fc641ebc15b93dc600cb7d9ade322b..77a42053b3e7ceb59fbf39b44bbd3735a133cd4f 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # no timeout
 timeout 1 true || fail=1
index 02b63a767f8955154597c3418df0339c08fc31c1..c8b1eff5bd31e39662f53f72917d0c2d9167754c 100755 (executable)
@@ -24,7 +24,6 @@ fi
 . $srcdir/test-lib.sh
 getlimits_
 
-fail=0
 
 # internal errors are 125, distinct from execution failure
 
index dd63b20174b16d15b67c7f27a5b2782eb83e153a..73e2021389c0332b7a87094a94d5bd5ac2b2800d 100755 (executable)
@@ -24,7 +24,6 @@ fi
 . $srcdir/test-lib.sh
 
 ln -s truncate-target t-symlink
-fail=0
 
 truncate -s0 t-symlink || fail=1
 
index 7472c2e7ffe126a1c5752fa163b266762578525e..aace90ab1789de76dcdd1a015bbf54c1568e139d 100755 (executable)
@@ -28,7 +28,6 @@ fi
 . $srcdir/test-lib.sh
 skip_if_root_
 
-fail=0
 
 d1=no
 
index a521a82e9b6c7402d902e706b5bd4325a9cb2d3e..aef44173c466bbc1c276ead257b10f92c970ef45 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 mkfifo_or_skip_ "fifo"
 
-fail=0
 
 truncate -s0 "fifo" || fail=1
 
index 346e04ec6ce37b00ff93a5352053419c97106d6e..f0ab06e7e054166d911c992a10ee2a399378c032 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # truncate -c no-such-file should not fail.
 truncate -s0 -c no-such-file || fail=1
index 2b16f011386efdb95edf7973a35fe1d7ffb8d9cb..afd12a5f143583d2a0186c9ba29a3491b3255ff0 100755 (executable)
@@ -24,7 +24,6 @@ fi
 . $srcdir/test-lib.sh
 getlimits_
 
-fail=0
 
 # -= overflow
 truncate -s-1 create-zero-len-file || fail=1
index 61cbe8b50f239a18dc0decafb196a0a2834f38c5..c7bdf61c247805cfea82244058e33175399bd4ff 100755 (executable)
@@ -35,7 +35,6 @@ chmod g+w root-owned
 # Ensure that the current directory is searchable by $NON_ROOT_USERNAME.
 chmod g+x .
 
-fail=0
 setuidgid $NON_ROOT_USERNAME env PATH="$PATH" truncate -s0 root-owned || fail=1
 
 Exit $fail
index 8bef6d106f256967b108cc0981c722187901db11..ce3f8ac5f090a400c689a9a19b0e90eb415a9d8d 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # must specify at least 1 file
 truncate --size=0 && fail=1
index 9916ec615a939185563e7b98d819241aae950f6f..976eeb84dec66f578eac1c3c5848be08fca1b5f7 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # mixture of relative modifiers not allowed
 truncate --size="+>0" file && fail=1
index 3da8fcdfaefd40fa04d782bd8c4fdd242ec97aa7..1d1d7650c4716da33b3e7d12a50de228e9280796 100755 (executable)
@@ -27,7 +27,6 @@ echo 2 > 2b || framework_failure
 echo 2 words > 2w || framework_failure
 printf '2b\n2w\n' |tr '\n' '\0' > names || framework_failure
 
-fail=0
 
 wc --files0-from=names > out || fail=1
 cat <<\EOF > exp || fail=1
index fcf7ceb79afc955f1fda25637a91af236a678c4d..ed08955f07ed9264dee4718cda74d151ebc002c8 100755 (executable)
@@ -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
index 1d4cb17fb041500e408885ef500488cc5a695099..1cb5cab4401560cf71207835a4a32c86b40a7a79 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 mkdir --parents "`pwd`/t" || fail=1
 test -d t || fail=1
 
index 9a75112ef538c3544bfd70c5da833adf6b9d7db9..2320da1c132c6a34a880d09b1a774a801ffe798e 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 mkdir --parents "`pwd`/t/u" || fail=1
 test -d t/u || fail=1
 
index 06207b2698f57bb983b3dcc8715341300b9462d7..df1c56d3272970996c175bc9c00d45fb53fe8a60 100755 (executable)
@@ -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
index 4d2674e4b8baca0386385200c4c1710fd3ced134..a5b9f6691621ba0edc9e24d1b369a0f08ca3b487 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 mkdir -p d1/. || fail=1
 test -d d1 || fail=1
index 30df4fe5953e16bff5e44493e963b1108d395fb1..e39d0b9883b7806fe36b44a29acb4cfeac2704f4 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 ln -s . slink || framework_failure
 
-fail=0
 mkdir -p slink/x || fail=1
 test -d x || fail=1
 
index 5f2468e0d04fc5af5a2f5729052f67dc53f62689..0d3232285d550f8ed2c7c4c6b7accfdacb5655e5 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 mkdir -pv foo/a/b/c/d >out || fail=1
 
 diff - out <<\EOF
index 69ab38c4639734b4d60e24804e5e9075b03d4443..941177506262da732e54ba9e01cfbf8b167ea12a 100755 (executable)
@@ -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.
index af2bdcd63e39d183a60bd9d50a27ca758c931802..370de245314f4f5360c831115cd610caab264050 100755 (executable)
@@ -27,7 +27,6 @@ skip_if_setgid_
 
 working_umask_or_skip_
 
-fail=0
 
 #                         parent        parent/dir
 # umask   -m option   resulting perm  resulting perm
index d872cb6d1bc023ab845c7d91e8dffdf15d5027f7..ddd237cdb0ae157f2ce28658c6902afbb9057803 100755 (executable)
@@ -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
index d1af121da2e68a90ee36b3a05abe8afdcefa438d..4956c20e9784d995b713dc0f489165c3f405aca3 100755 (executable)
@@ -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
 
index 3214bf4f425f396ee05efe111c5fbf0f66b35944..4213784df11e23e1a8ac095459fa206ba8a96812 100755 (executable)
@@ -24,7 +24,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 mkdir -p dir/ || fail=1
 test -d dir || fail=1
index 9c886842bbb95742aa4f6bc7e83c1fd614035b57..5df2de198a205e504a6b37b045727e80dd846522 100755 (executable)
@@ -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 \
index e9fb626798270c9555a44ac2f4b9edfb73985280..5ad8de05210d6b4e1966a2c0c547e373610bfc5c 100755 (executable)
@@ -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
index 8dd22659da90299631eae9baa09de8585ede2005..ef78d5281a9503c5e04319bc82410318fb485a3b 100755 (executable)
@@ -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
index ae1b6e95fce3042956aefd13d1ee2df8df5e6117..5dd3f3568ce030eb3b10087d835bee8bc4f330bd 100755 (executable)
@@ -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
index e70ce85715daf4cebe8c3465ba2ab2ecb1fcc64c..64616440d09219dcc861f7066e09c981b6205b8d 100755 (executable)
@@ -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
index 7d80078f2f27d3dfbf45d91f329a26eb0a63ff4c..df6561bafa8ec2395ba0136f45178e3b35ab3c12 100755 (executable)
@@ -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
 
index 2f264b45f559c78027baf541e6da9bc14e83e39c..ff51a09247cf0db47ea71a9c6ad241275bcdf87b 100755 (executable)
@@ -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
index 75904d626154bc6d518c7345a26d88f299f31f41..6e28fa463672f7ae03f5dbbc4e7d0bd390723689 100755 (executable)
@@ -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
index 629ddb584fc61a12878fdb5d643253871895c8e4..13d1419a433acac5458e0dd40009bd0559fbbf47 100755 (executable)
@@ -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
index cf161dac5964d3843c46c7178317a1a7bb7970b5..24afc1ed51bbd868fd354b91542aec8f89ea0f40 100755 (executable)
@@ -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
index 342fe45721da0977fd1681d96698c2dfdc059f67..e7fb089dec59287ea51e31fd9a7f170da2b466ad 100755 (executable)
@@ -28,7 +28,6 @@ fi
 . $srcdir/test-lib.sh
 skip_if_root_
 
-fail=0
 
 for i in cp; do
 
index df43970503e738db6b78c2b5dc5543a9161c52cd..88851ac59c61e8415045be4daa391050a90c414a 100755 (executable)
@@ -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
 
index 8822700a330b52228857a31d0132adf5fdd48002..1bd173e994daa284bb6f6fe2d83265cc402d6931 100755 (executable)
@@ -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
index c2ff815c67db2b1825e380ebd7b0d57f780ccbb6..fbd7cc8a6a9c22ebd0827b58aad6a58f49af6116 100755 (executable)
@@ -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.
index 9a8c832ead0558e6eda0b4546f733dd301c210e1..05fba29fcce7dfa55aba61a4c803b735342013d6 100755 (executable)
@@ -25,7 +25,6 @@ fi
 touch a || framework_failure
 ln a b || framework_failure
 
-fail=0
 
 mv a b || fail=1
 
index d626f3cc05e5def552f669f2ce2ca91a75e74493..2df2cf3ff9de051ca8a0fd0264b13f1bdf91d8b0 100755 (executable)
@@ -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.
index db7cdb2c4849bdd6c2f9f8d692eae8aeda4ba15c..0c9198c79d199775b58eca4183bff35f22bd3193 100755 (executable)
@@ -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
index 05ced50d0d1cb01336cc54139a96d2e6162c1e89..3c56e31a8b1dcd2b6f662552a2e444f1cdeef316 100755 (executable)
@@ -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
 
index 738605bd0a66975e6b95f46d097377019122e065..bfb2a31e44438ee58866ceda555568d012c78538 100755 (executable)
@@ -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'
index bdc353c5beba50a925617012e195b81426fa3d97..8eaf2d6aee57e9a06c9e809a5e6630c53294c2e6 100755 (executable)
@@ -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.
index 0c99bac67a78d3c18861b79de313236bd255974f..342e66ce11480e35eeee811ce7674b70162fc826 100755 (executable)
@@ -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
index 031e80761b081bcc1888ef8468c3aaa14307dfed..7a8506408910bdab781632e6d6c34158245a908a 100755 (executable)
@@ -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
index 84b41eebecd88fde05dec8165a5a5393c5a572d1..f4f598a1be306470e884331f5c5c18c926fdc81c 100755 (executable)
@@ -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
index 1b3e6b7b3d77da56c3f2626dc30879b04b7763ff..3c3e7e2d022ea59da708ef625949257f4c0f1abd 100755 (executable)
@@ -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
index e5a4f8d30874de3594131a16650329b34ef4dc7e..b9fa41af4c89c93d050ca8f1faad2a85a9ffaeeb 100755 (executable)
@@ -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
 
index baef23ad89c9e197036c6a3953f12f3f09c8c51c..6b29fff4283d87926cc5460441da840673304d6a 100755 (executable)
@@ -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
index 76a6b439a8ac360b473fcd4fc1d8390ec67ea92b..86cfbcd782268a4adc460229a670904e1d994f2c 100755 (executable)
@@ -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
index f91fba0e1a69fcae7a72e2311e99b7fee7e5c089..448f474687cff7db9e583c888442b67cf1968571 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 # test miscellaneous combinations of -f -i -n parameters
 touch a b || framework_failure
index 321c54e64f9cad4aaa1b2fc4169f1f55e4a7889d..73f9fb4d587ed32d2a8f345dc35a7f410ac46170 100755 (executable)
@@ -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
index 387a75f9b48f945a59d499f2debf80f3c2804522..2ef5f2abb5025fa9929ba7d7842b786cc08dc9f6 100755 (executable)
@@ -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.
index 290864dff8a1bc35c2cb0f674dd6717fb742ba56..3d939f1db89365336ac6406b15ca4f92f96591cd 100755 (executable)
@@ -32,7 +32,6 @@ cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; }
 touch k "$other_partition_tmpdir/k" || framework_failure
 chmod u-w "$other_partition_tmpdir" || framework_failure
 
-fail=0
 
 mv -f k "$other_partition_tmpdir" 2> out && fail=1
 cat <<EOF > exp
index 51dea204363964021ccdc11192923b724220e614..e158964bcd50107ff62685b162d72e683b19db18 100755 (executable)
@@ -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
index 45b8615ecdcf5864dbc2b02c50820106c00e0ac7..a1a651722cb651a953a262fa180456c1c20e3ca1 100755 (executable)
@@ -29,7 +29,6 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; }
 
 mkdir foo || framework_failure
 
-fail=0
 
 mv foo/ "$other_partition_tmpdir/bar" || fail=1
 
index a12a9f531e91bd165391ade81fd460a2d356a06d..ed3e25b109edbbc0922645cf832de1f486121156 100755 (executable)
@@ -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
index 41a193cc2c150be55a5c518297d7bc3a1a02cfbc..c6f8066c982f2a1e1c389d938618a2a6deafcb47 100755 (executable)
@@ -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
 
index b8c3bf3b5296f04900ff2084d9ee42f1231c1e6d..88a6f40245680b907e8aafb544f5eadbe2d56c1e 100755 (executable)
@@ -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
index f8855a21fd13997c926e7757442d22209ef783bc..7187e8082e612b9a2e1031accee32175557ed72e 100755 (executable)
@@ -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'`
index c5fc099c9a7aa3e862ff1c5fda515eb328a4918e..3806f56d7edd5b6dd295b96c86e26d904b10abc1 100755 (executable)
@@ -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
index 24ab722d19811e67f0e0081ac3d516628f102efa..a86626a6b128711c2d828659a4869bbbedb429f8 100755 (executable)
@@ -28,7 +28,6 @@ fi
 
 mkdir foo || framework_failure
 
-fail=0
 
 mv foo/ bar || fail=1
 
index ae3127f23d615689184d91a3d9b5cb3f813044bf..cf6e471af6e5e63fb8374ec9e9cba0b65b277290 100755 (executable)
@@ -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
index 58a714891a06fae434f88017b287eeb831d0a3be..bbf81f1ffca5a710b10c6b013dfd2361ef9c9b2f 100755 (executable)
@@ -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
index a702ba990f89e7ebe82040283d69690f1b8631b6..a2bb5fd9d5638c9c084d91f3356fac82e48923af 100755 (executable)
@@ -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
index 53528c20ea85b8d908c30eb746ba862af1ee40a9..80d3e2d2813c6afd3fdf7f432990e37083abaa96 100755 (executable)
@@ -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
index 7dfc8b73922d5ca3587949f9c486f9274845055a..3eadbbcfbe943df4d88ad9667bef850d0617786f 100755 (executable)
@@ -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
index d9715477906a42e7f6dbea1be17d40f9e34d1831..ffac61d2981b5a6c3957c5cbe32429cbdd39a6ed 100755 (executable)
@@ -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
index 0ee3e8af1cb97fd16b8f63f4e083d20aea55967e..4366474f282fe5938b98af25b187deb3a8b4dabb 100755 (executable)
@@ -29,7 +29,6 @@ fi
 ln -s no-file dangle
 ln -s / symlink
 
-fail=0
 
 rm ---presume-input-tty dangle symlink &
 pid=$!
index 98f100a80cfa815c54e3f61f20d9ae77fa81ff0f..3585ef50183d1df203fa8034d927183956166058 100755 (executable)
@@ -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
index 20fb278d5dbf922691a8fbbe0a422d87293786af..34c733f6e0fbd80c0cfa77420a6f71573b89ebe2 100755 (executable)
@@ -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
index ee0829a9987df0bfcb20ae3ded182ba8659fa6d9..ff8825e2ee438928383e72677b96080346084187 100755 (executable)
@@ -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
index 320a71837ba95bf0877172d60a47da0139b6a7ec..3c6f041f830c487c170b8cd45c51571b87592420 100755 (executable)
@@ -26,7 +26,6 @@ fi
 
 mkdir d || framework_failure
 
-fail=0
 
 rm d 2> out && fail=1
 cat <<\EOF > exp || fail=1
index c69ad8889c0b8c32daa4f060d8e7a9d1d4737ab8..5e59c4dcbe6fa83727eec06f009962612941c0af 100755 (executable)
@@ -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
 
index 779f96bda21e2da3ad5dccdda355b01a5b4d62d4..c0a77e40922fe380f7dcd4b6c2f9dcb6b5614116 100755 (executable)
@@ -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
index ad97e1708ebe5b7f187d01edd8c9afa330d3a371..90ba9bb5a017c65fca78f92ec8f66422330eac12 100755 (executable)
@@ -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)
index b00f0a61412405fba4321b44263f9638da751eea..07a68addcc0cffb11616714e363ad8af6529f5e3 100755 (executable)
@@ -27,7 +27,6 @@ fi
 
 mkdir -p d || framework_failure
 
-fail=0
 rm -f d/no-such-file || fail=1
 
 Exit $fail
index 4cfb511b7b1efad59c9c618575fa694c8096a2af..4c4ae7436a6c6deb74a5b0f4fbd948a18648b793 100755 (executable)
@@ -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.
index 954bd7e1a4484bcb7cba3e7993290debc327556c..4481ce4982df03bfcd87f77e78c480abd1d0e29d 100755 (executable)
@@ -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
index 5f9d126a6b30f20d01c5be459a34d58048d7b94b..8629cba71548e343f27f7cea072a32061f593f9a 100755 (executable)
@@ -35,7 +35,6 @@ for i in 1 2 3; do
   done
 done
 
-fail=0
 
 rm -r t || fail=1
 
index be074f0fd2d692d19236a89822743c6c5dc5d6da..a7474fe628524e7808ac897b6cd6d23d49d2c2ac 100755 (executable)
@@ -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
index fc6b06964ca26a22a1259f59553170f8d7ab5d09..35c0ac3a344ef48a6544a57fb705709c2ed7272d 100755 (executable)
@@ -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
 
index 8efb0637cb91a121cef0d9bda37a8b5ead2df594..78eb99a99d028a67e8081f9630bc921df8aae8b4 100755 (executable)
@@ -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
index 747d4d2754c05d5f7f31b5437ae3b520c96285f2..714631e5866c9e38cbe3a91d3d667be1f8183d71 100755 (executable)
@@ -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.
index f40a342d0d32776afb0bfbe4690fa9935e8c2d1a..b894f495db4b33eb2956d807235e78946ff1e921 100755 (executable)
@@ -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
index bab99b1fb64b42b699906f9113b34df9aea91cd7..842acc15e8ed3e42ef9a102b0c6e68c6cea2be09 100755 (executable)
@@ -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.
index 7e3a7575355ff6fd063bfc322f083f585f285547..9c1f46df2cd99f0240ad732b4806ca922fe6a83e 100755 (executable)
@@ -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.
index 6589d847d3320555b9cf3d0aa38a9341e6d33eeb..2b0cfa3b7ae3d1350b9afa740424d1da71565837 100755 (executable)
@@ -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.
index 15b50b7e5cb9ff8da2e24ec42cb94aca30cc71ad..c1bb818a2ad1e78b6bbacc6ab710f8d5d988a1e8 100755 (executable)
@@ -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 \
index 0c6aefa5c28816c542d1f1ec1071ad15750d02b0..a0ba383d629018912a2289f861869295bcc3d177 100755 (executable)
@@ -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
index db00a5b47d51a6d02863fa1cb46b7796c0047436..8ce6e652b808470049443f51481c31fb164cf443 100755 (executable)
@@ -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
index b4fec90be8cc186c91a2c4d8c0bcb55607d2e618..cd484e694f649c2e2db16fd81241d19980bb25cc 100755 (executable)
@@ -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
index 91463f8ca9a3eeeb4ed097b94bf30919c90e5872..a0a49e652fc56be863e9a076cd3a4e260f92e399 100755 (executable)
@@ -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
index 5d078b89f435e85e642afc60fec2c260a8904743..b1ad2e052514331904b3b38203894d8f1ab7d879 100755 (executable)
@@ -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
 
index 4f41e45986590ebc126ecc05d9f85fa2a8473fce..1a607df2a6ed97d395a9966154175ca2206acbb9 100755 (executable)
@@ -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
index bd00460834d65fb8910516e4fd0faccefc9d3422..25bcae28b1067e339ff08c3e81b290b05e999363 100755 (executable)
@@ -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"
index bcc23a2ab1a18828438a17135b715528d3bde2e0..8762b94d1178afec6251ae79f2a011860a8d34b8 100755 (executable)
@@ -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
index fab6140a4ab8ef7ffcec9c973609f9ae4c24cfdb..a8d11607c7fd59c610a3b5411c237b4807511245 100755 (executable)
@@ -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.
index 1ba64093905805128a113752b233a004bae467d0..9c2a18f10e81f3d44cbea141edc672bdb966b0ae 100755 (executable)
@@ -34,7 +34,6 @@ mkdir d du || framework_failure
 chmod u-w fu du empty-u || framework_failure
 cd ..
 
-fail=0
 
 cat <<EOF > in
 y
index e000be18995e1b06a9f660d7ff9bd1d5c378fb57..cbc226e50367f5411ce3bed9766b226019361276 100755 (executable)
@@ -26,7 +26,6 @@ skip_if_root_
 
 mkdir dir || framework_failure
 
-fail=0
 
 # This should fail.
 rm dir > /dev/null 2>&1 && fail=1
index 85d7fef608f6317e40ac7f9f2dfd758879c433c1..048f9a7d72053526392f070f02677d75deb2dc95 100755 (executable)
@@ -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
 
index af8e2f3fe2d461d222fb7477fd2891d9f150bb53..74d039f8ea7dd9841cffd620d789e59b50424b61 100755 (executable)
@@ -28,7 +28,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 rm -r '' > /dev/null 2>&1 && fail=1
 
 Exit $fail
index 3b7b6f29565c6c10dd5f9baa369f91d293194967..c1bb4c2ed23550c6bbfb786c082bcf4a7bdb3a98 100755 (executable)
@@ -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
index 52366d42ef6e4f9b4b93791a7fba94737b6d0636..d26843a20a71ddaf2159ed703f083228428ab7e0 100755 (executable)
@@ -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
index 9aae56e68df97ba731452f568c491dd2f4d5c42c..5d5b151a01c28c16f3e9fc9a64f706b2280d0252 100755 (executable)
@@ -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
index 3e25dd1e78ededfecf46e61d774ad01b2222a93b..8f41a043a4583408584ef54fdfcdc58a3ba6cea4 100755 (executable)
@@ -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.
index 01d6c81f0d78f5a9c7d5578b107c370e3bca2926..80e13b04879d416b8b1d9ed017e08557ccaaa166 100755 (executable)
@@ -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
index f02a6edfe2362b554f78b8491bde00ad4cdefa8f..7500f432c27aa406ef82d19333e78b104906a1ad 100755 (executable)
@@ -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
index aea6a1ac19929078ba7a5db057a63aeb689c5eb7..b1b9612989866b630f2e78b0aafbe67fd7e2c235 100644 (file)
@@ -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
index 2d38d4f0f61a63800642029f35b1f2855627d780..104ae4821e9c0d23eb422d04309449583e3f2642 100755 (executable)
@@ -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 &
index 23f3c12b0e6f5a646e0c666e8db52be8104fb2db..e8b150ecbff0dca31aae32d9f039995344b85e55 100755 (executable)
@@ -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.
index e0d79fe48072dbf4833eebc2bc6aec1e6175d18a..71f5dc0a0e3185ed2f69a5c1fc69fb3edffda1f4 100755 (executable)
@@ -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
index 46e7ce80f7c860cedd7f78939e3fa778394bdaf6..fc134355867f14996cf9497da64f1272df67ba4e 100755 (executable)
@@ -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
index 72d51d975832ed4ac216fc6dee5ea73f0baf3166..3ef03dd5dd64227cd00fe3ea5e7e784cd8e8aba2 100755 (executable)
@@ -44,7 +44,6 @@ for i in $(seq 30); do
     sleep .1
 done
 
-fail=0
 kill $tail_pid && fail=1 || :
 
 Exit $fail
index 025272c02014839145b7488a9a8b295675d4c7e0..890323988c07b89629760b81b7e1ec16b3365250 100755 (executable)
@@ -27,7 +27,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 touch file || framework_failure
 touch tail.out || framework_failure
index 0a4b81bd3f0591ebbbb212eaf5854c5cfb4560df..c521b0349613005b95692a8556e1a5a9812f5a28 100755 (executable)
@@ -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,
index b9f6ae3896b0715b03fa35aaaa9afa6a16c76300..8c71cea22c198bfaff0f9a66e4d4a09e1fe979b1 100755 (executable)
@@ -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
 
index 406ebcc9186713af9bc57280cdc29bbdbcd0139e..905d66d45e90be13b42699d8e3546bfd178fa88c 100755 (executable)
@@ -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
 
index 61caafd2c0dbd2eadfb2b0642d72437f402e41cb..34bdacd869ebb70923f36911be9315588f54216c 100755 (executable)
@@ -23,7 +23,6 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 
 ksyms=/proc/ksyms
 if test -r $ksyms; then
index 514a2136b6ffb5cb2e5dfd5004f45e922c6c0959..416cb4475c8e7b5a6b9a880adbe16c892a9d9bbd 100755 (executable)
@@ -26,7 +26,6 @@ fi
 
 (echo 1; echo 2) > k || framework_failure
 
-fail=0
 
 sh -c 'read x; tail' < k > out || fail=1
 cat <<EOF > exp
index ddfbe664579f4f09f054b3ba4642d6dcbfe035a5..cf50fa2954012a0a3f737df16967fe8533e6cd16 100755 (executable)
@@ -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
index 62498d5dce588c0d2c48b439d646e9dbb1290a74..9392ade2331cdbde9e70f0bdbcb21e4ed85e95e9 100755 (executable)
@@ -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
index 4419742eac1e4e4b2e0b9dc98d3783174b26d2aa..456a30a24843a10bfc5bfc1671cd908da1505eed 100644 (file)
@@ -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
index b13ad06ffd6da56551f7e008629bac51a0325f5a..0fbcaae063c73363aa595afacb3a7c1957734a2e 100755 (executable)
@@ -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.
index f3ea29a7f1189ad4532327e2a0225fa1664acb45..a16e015ca043427bd80266cc05806ca3898bd297 100755 (executable)
@@ -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
index 1698ab1ca653d9c81d1f32ac371385996e381a96..ef1543e26e18971c217d61e09f89f9a1eb3f4bc8 100755 (executable)
@@ -9,6 +9,5 @@ fi
 
 . $srcdir/test-lib.sh
 
-fail=0
 touch . || fail=1
 Exit $fail
index 05db80cfb7ab88ff5f10c337baecbae0835672e7..310ea3037a5d5bf2ecccca298698336928ac2d21 100755 (executable)
@@ -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.
index 070b7273ae5bb69883cee68aa370b35c95788729..57f5038efcdd7b940b32d664ae2d3396726c2a65 100755 (executable)
@@ -29,7 +29,6 @@ dir=/$d1/such-dir
 # Ensure that $d1 doesn't already exist.
 ls -d $d1 2> /dev/null && framework_failure
 
-fail=0
 
 touch $dir > out 2>&1 && fail=1
 cat <<EOF > exp
index b8209a4fcac5ef5e64fb1e555c84062c7d09d503..57bb5cf8f582e4aa4fb36c3844316d1befb81c69 100755 (executable)
@@ -25,7 +25,6 @@ fi
 
 mkfifo_or_skip_ fifo
 
-fail=0
 
 touch fifo || fail=1
 
index 517ad7de64ffef1a6b4a342c19736230869a9b94..3fc66819486db230a9ea78669eeb1483ca5c7183 100755 (executable)
@@ -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
index 28527e8572f40cfc20d9c35805f3b1530469c813..f10eca85eeb3439cd8d05a282bcaafc0fbf2237d 100755 (executable)
@@ -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.
index 95470c0acf25ec99048b98640571785b0668d83c..3090bf02585e013fd5f839ac583aa0841eb437bf 100755 (executable)
@@ -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
index 92347bd3066edf3ae653b26eba49e4a02f83874d..3dd8a80867432cc486091886d4cbdd13290f9ed0 100755 (executable)
@@ -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'.
index 4ce4ec6defb262bf13f317097c257bca834b8d43..e124a2e4a46693bf79c449e227239a39792c1466 100755 (executable)
@@ -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
index 988ef04ab95433c437864d102cdc5813785a88cf..88a442563621a38a9acbc1f572d551b429bd0bbf 100755 (executable)
@@ -26,7 +26,6 @@ fi
 _POSIX2_VERSION=199209; export _POSIX2_VERSION
 POSIXLY_CORRECT=1; export POSIXLY_CORRECT
 
-fail=0
 
 yearstart=01010000
 
index 8d1853b46e27c0e32de93283be303b6a03c735b3..9d21dbdef7afb16a224d4667ca3298a58db79126 100755 (executable)
@@ -27,7 +27,6 @@ skip_if_root_
 : > read-only || framework_failure
 chmod 444 read-only || framework_failure
 
-fail=0
 
 touch read-only || fail=1
 
index ad42c1a049ffdaf71ab9b52466cbaea7d413ca0d..05704feead1ebccc497bb505db6e4bbe1dc4a0ae 100755 (executable)
@@ -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
index 85cf48877fbf3c0fa28c436fbcaf0ad6e5f55193..05c2ac742c24b0f94d7671c219e184ec9d532d56 100755 (executable)
@@ -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.