summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rm')
-rwxr-xr-xtests/rm/cycle1
-rwxr-xr-xtests/rm/dangling-symlink1
-rwxr-xr-xtests/rm/deep-11
-rwxr-xr-xtests/rm/deep-21
-rwxr-xr-xtests/rm/dir-no-w1
-rwxr-xr-xtests/rm/dir-nonrecur1
-rwxr-xr-xtests/rm/dot-rel1
-rwxr-xr-xtests/rm/empty-inacc1
-rwxr-xr-xtests/rm/ext3-perf1
-rwxr-xr-xtests/rm/f-11
-rwxr-xr-xtests/rm/fail-2eperm1
-rwxr-xr-xtests/rm/fail-eacces1
-rwxr-xr-xtests/rm/hash1
-rwxr-xr-xtests/rm/i-11
-rwxr-xr-xtests/rm/i-never1
-rwxr-xr-xtests/rm/i-no-r1
-rwxr-xr-xtests/rm/ignorable1
-rwxr-xr-xtests/rm/inaccessible1
-rwxr-xr-xtests/rm/interactive-always1
-rwxr-xr-xtests/rm/interactive-once1
-rwxr-xr-xtests/rm/ir-11
-rwxr-xr-xtests/rm/isatty1
-rwxr-xr-xtests/rm/no-give-up1
-rwxr-xr-xtests/rm/one-file-system1
-rwxr-xr-xtests/rm/r-11
-rwxr-xr-xtests/rm/r-21
-rwxr-xr-xtests/rm/r-31
-rwxr-xr-xtests/rm/r-41
-rwxr-xr-xtests/rm/readdir-bug1
-rwxr-xr-xtests/rm/rm11
-rwxr-xr-xtests/rm/rm21
-rwxr-xr-xtests/rm/rm31
-rwxr-xr-xtests/rm/rm41
-rwxr-xr-xtests/rm/rm51
-rwxr-xr-xtests/rm/sunos-11
-rwxr-xr-xtests/rm/unread21
-rwxr-xr-xtests/rm/unread31
-rwxr-xr-xtests/rm/v-slash1
38 files changed, 0 insertions, 38 deletions
diff --git a/tests/rm/cycle b/tests/rm/cycle
index d97154779..ffac61d29 100755
--- a/tests/rm/cycle
+++ b/tests/rm/cycle
@@ -28,7 +28,6 @@ mkdir -p a/b
touch a/b/file
chmod u-w a/b
-fail=0
rm -rf a a 2>&1 | sed 's/:[^:]*$//' > out || fail=1
cat <<\EOF > exp
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink
index 0ee3e8af1..4366474f2 100755
--- a/tests/rm/dangling-symlink
+++ b/tests/rm/dangling-symlink
@@ -29,7 +29,6 @@ fi
ln -s no-file dangle
ln -s / symlink
-fail=0
rm ---presume-input-tty dangle symlink &
pid=$!
diff --git a/tests/rm/deep-1 b/tests/rm/deep-1
index 98f100a80..3585ef501 100755
--- a/tests/rm/deep-1
+++ b/tests/rm/deep-1
@@ -32,7 +32,6 @@ fi
umask 022
-fail=0
k20=/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k
k200=$k20$k20$k20$k20$k20$k20$k20$k20$k20$k20
diff --git a/tests/rm/deep-2 b/tests/rm/deep-2
index 20fb278d5..34c733f6e 100755
--- a/tests/rm/deep-2
+++ b/tests/rm/deep-2
@@ -41,7 +41,6 @@ $PERL \
cd .. || framework_failure
echo n > no || framework_failure
-fail=0
rm ---presume-input-tty -r x < no > out || fail=1
# expect empty output
diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w
index ee0829a99..ff8825e2e 100755
--- a/tests/rm/dir-no-w
+++ b/tests/rm/dir-no-w
@@ -26,7 +26,6 @@ fi
mkdir --mode=0500 unwritable-dir || framework_failure
-fail=0
# For rm from coreutils-5.0.1, this would prompt.
rm ---presume-input-tty unwritable-dir < /dev/null > out-t 2>&1 && fail=1
diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur
index 320a71837..3c6f041f8 100755
--- a/tests/rm/dir-nonrecur
+++ b/tests/rm/dir-nonrecur
@@ -26,7 +26,6 @@ fi
mkdir d || framework_failure
-fail=0
rm d 2> out && fail=1
cat <<\EOF > exp || fail=1
diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel
index c69ad8889..5e59c4dcb 100755
--- a/tests/rm/dot-rel
+++ b/tests/rm/dot-rel
@@ -27,7 +27,6 @@ fi
mkdir a b || framework_failure
touch a/f b/f || framework_failure
-fail=0
rm -r a b || fail=1
diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc
index 779f96bda..c0a77e409 100755
--- a/tests/rm/empty-inacc
+++ b/tests/rm/empty-inacc
@@ -30,7 +30,6 @@ mkdir -m0 inacc || framework_failure
# that is empty (hence removable) and unreadable.
mkdir -m a-r -p a/unreadable
-fail=0
# This would fail for e.g., coreutils-5.93.
rm -rf inacc || fail=1
diff --git a/tests/rm/ext3-perf b/tests/rm/ext3-perf
index ad97e1708..90ba9bb5a 100755
--- a/tests/rm/ext3-perf
+++ b/tests/rm/ext3-perf
@@ -72,7 +72,6 @@ echo creating a $n-entry directory took $setup_duration seconds
test $threshold_seconds -lt $setup_duration \
&& threshold_seconds=$setup_duration
-fail=0
start=$(date +%s)
timeout ${threshold_seconds}s rm -rf d; err=$?
duration=$(expr $(date +%s) - $start)
diff --git a/tests/rm/f-1 b/tests/rm/f-1
index b00f0a614..07a68addc 100755
--- a/tests/rm/f-1
+++ b/tests/rm/f-1
@@ -27,7 +27,6 @@ fi
mkdir -p d || framework_failure
-fail=0
rm -f d/no-such-file || fail=1
Exit $fail
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm
index 4cfb511b7..4c4ae7436 100755
--- a/tests/rm/fail-2eperm
+++ b/tests/rm/fail-2eperm
@@ -32,7 +32,6 @@ mkdir a || framework_failure
chmod 1777 a || framework_failure
touch a/b || framework_failure
-fail=0
# Try to ensure that $NON_ROOT_USERNAME can access
# the required version of rm.
diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces
index 954bd7e1a..4481ce498 100755
--- a/tests/rm/fail-eacces
+++ b/tests/rm/fail-eacces
@@ -41,7 +41,6 @@ mkdir e &&
ok=1
test $ok = 1 || framework_failure
-fail=0
rm -rf d/f 2> out && fail=1
cat <<\EOF > exp
diff --git a/tests/rm/hash b/tests/rm/hash
index 5f9d126a6..8629cba71 100755
--- a/tests/rm/hash
+++ b/tests/rm/hash
@@ -35,7 +35,6 @@ for i in 1 2 3; do
done
done
-fail=0
rm -r t || fail=1
diff --git a/tests/rm/i-1 b/tests/rm/i-1
index be074f0fd..a7474fe62 100755
--- a/tests/rm/i-1
+++ b/tests/rm/i-1
@@ -33,7 +33,6 @@ test -f $t/a || framework_failure
echo y > $t/$test.Iy
echo n > $t/$test.In
-fail=0
rm -i $t/a < $t/$test.In > /dev/null 2>&1 || fail=1
# The file should not have been removed.
test -f $t/a || fail=1
diff --git a/tests/rm/i-never b/tests/rm/i-never
index fc6b06964..35c0ac3a3 100755
--- a/tests/rm/i-never
+++ b/tests/rm/i-never
@@ -29,7 +29,6 @@ touch f || framework_failure
chmod 0 f || framework_failure
touch exp || framework_failure
-fail=0
rm --interactive=never f > out || fail=1
diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r
index 8efb0637c..78eb99a99 100755
--- a/tests/rm/i-no-r
+++ b/tests/rm/i-no-r
@@ -28,7 +28,6 @@ fi
mkdir dir || framework_failure
echo y > y || framework_failure
-fail=0
# This must fail.
rm -i dir < y > /dev/null 2>&1 && fail=1
diff --git a/tests/rm/ignorable b/tests/rm/ignorable
index 747d4d275..714631e58 100755
--- a/tests/rm/ignorable
+++ b/tests/rm/ignorable
@@ -26,7 +26,6 @@ skip_if_root_
touch existing-non-dir || framework_failure
-fail=0
# With coreutils-6.3, this would exit nonzero. It should not.
# Example from Andreas Schwab.
diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible
index f40a342d0..b894f495d 100755
--- a/tests/rm/inaccessible
+++ b/tests/rm/inaccessible
@@ -32,7 +32,6 @@ skip_if_root_
p=`pwd`
mkdir abs1 abs2 no-access || framework_failure
-fail=0
set +x
(cd no-access; chmod 0 . && rm -r "$p/abs1" rel "$p/abs2") 2> out && fail=1
diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always
index bab99b1fb..842acc15e 100755
--- a/tests/rm/interactive-always
+++ b/tests/rm/interactive-always
@@ -32,7 +32,6 @@ echo 'n
y' > $test.I || framework_failure
rm -f out err || framework_failure
-fail=0
# The prompt has a trailing space, and no newline, so an extra
# 'echo .' is inserted after each rm to make it obvious what was asked.
diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once
index 7e3a75753..9c1f46df2 100755
--- a/tests/rm/interactive-once
+++ b/tests/rm/interactive-once
@@ -32,7 +32,6 @@ echo y > $test.Iy || framework_failure
echo n > $test.In || framework_failure
rm -f out err || framework_failure
-fail=0
# The prompt has a trailing space, and no newline, so an extra
# 'echo .' is inserted after each rm to make it obvious what was asked.
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1
index 6589d847d..2b0cfa3b7 100755
--- a/tests/rm/ir-1
+++ b/tests/rm/ir-1
@@ -49,7 +49,6 @@ EOF
# Remove all but one of a, b, c -- I doubt that this test can portably
# determine which one was removed based on order of dir entries.
# This is a good argument for switching to a dejagnu-style test suite.
-fail=0
rm --verbose -i -r $t < $test.I > /dev/null 2>&1 || fail=1
# $t should not have been removed.
diff --git a/tests/rm/isatty b/tests/rm/isatty
index 15b50b7e5..c1bb818a2 100755
--- a/tests/rm/isatty
+++ b/tests/rm/isatty
@@ -24,7 +24,6 @@ fi
. $srcdir/test-lib.sh
skip_if_root_
-fail=0
# Skip this test if there is no /dev/stdin file.
ls /dev/stdin >/dev/null 2>&1 \
diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up
index 0c6aefa5c..a0ba383d6 100755
--- a/tests/rm/no-give-up
+++ b/tests/rm/no-give-up
@@ -32,7 +32,6 @@ chown -R $NON_ROOT_USERNAME d || framework_failure
# Ensure that non-root can access files in root-owned ".".
chmod go=x . || framework_failure
-fail=0
# This must fail, since `.' is not writable by $NON_ROOT_USERNAME.
setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm -rf d 2>/dev/null && fail=1
diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system
index db00a5b47..8ce6e652b 100755
--- a/tests/rm/one-file-system
+++ b/tests/rm/one-file-system
@@ -44,7 +44,6 @@ cat <<\EOF > exp || framework_failure
rm: skipping `a/b', since it's on a different device
EOF
-fail=0
rm --one-file-system -rf a 2> out && fail=1
test -d $t/y || fail=1
diff --git a/tests/rm/r-1 b/tests/rm/r-1
index b4fec90be..cd484e694 100755
--- a/tests/rm/r-1
+++ b/tests/rm/r-1
@@ -35,7 +35,6 @@ removed directory: `a'
removed `b'
EOF
-fail=0
rm --verbose -r a b > $test.O || fail=1
for d in $dirs; do
diff --git a/tests/rm/r-2 b/tests/rm/r-2
index 91463f8ca..a0a49e652 100755
--- a/tests/rm/r-2
+++ b/tests/rm/r-2
@@ -38,7 +38,6 @@ EOF
# Note that both the expected output (above) and the actual output lines
# are sorted, because directory entries may be processed in arbitrary order.
-fail=0
rm --verbose -r t/a | sort > t/O || fail=1
if test -d t/a; then
diff --git a/tests/rm/r-3 b/tests/rm/r-3
index 5d078b89f..b1ad2e052 100755
--- a/tests/rm/r-3
+++ b/tests/rm/r-3
@@ -46,7 +46,6 @@ test -f 0a || framework_failure
test -f by || framework_failure
cd .. || framework_failure
-fail=0
rm -rf t || fail=1
test -d t && fail=1
diff --git a/tests/rm/r-4 b/tests/rm/r-4
index 4f41e4598..1a607df2a 100755
--- a/tests/rm/r-4
+++ b/tests/rm/r-4
@@ -26,7 +26,6 @@ fi
mkdir d || framework_failure
touch d/a || framework_failure
-fail=0
rm -fr d/. 2>/dev/null && fail=1
rm -fr d/./ 2>/dev/null && fail=1
rm -fr d/.//// 2>/dev/null && fail=1
diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug
index bd0046083..25bcae28b 100755
--- a/tests/rm/readdir-bug
+++ b/tests/rm/readdir-bug
@@ -35,7 +35,6 @@ for i in `seq 1 250`; do
done
cd .. || framework_failure
-fail=0
# On a buggy system, this would fail with the diagnostic,
# "cannot remove directory `b': Directory not empty"
diff --git a/tests/rm/rm1 b/tests/rm/rm1
index bcc23a2ab..8762b94d1 100755
--- a/tests/rm/rm1
+++ b/tests/rm/rm1
@@ -27,7 +27,6 @@ skip_if_root_
mkdir -p b/a/p b/c b/d || framework_failure
chmod u-w b/a || framework_failure
-fail=0
# This should fail.
rm -rf b > out 2>&1 && fail=1
diff --git a/tests/rm/rm2 b/tests/rm/rm2
index fab6140a4..a8d11607c 100755
--- a/tests/rm/rm2
+++ b/tests/rm/rm2
@@ -29,7 +29,6 @@ mkdir -p a/1/2 b/3 || framework_failure
mkdir a/2 a/3 || framework_failure
chmod u-x a/1 b || framework_failure
-fail=0
# Exercise two separate code paths -- though both result
# in the same sort of diagnostic.
diff --git a/tests/rm/rm3 b/tests/rm/rm3
index 1ba640939..9c2a18f10 100755
--- a/tests/rm/rm3
+++ b/tests/rm/rm3
@@ -34,7 +34,6 @@ mkdir d du || framework_failure
chmod u-w fu du empty-u || framework_failure
cd ..
-fail=0
cat <<EOF > in
y
diff --git a/tests/rm/rm4 b/tests/rm/rm4
index e000be189..cbc226e50 100755
--- a/tests/rm/rm4
+++ b/tests/rm/rm4
@@ -26,7 +26,6 @@ skip_if_root_
mkdir dir || framework_failure
-fail=0
# This should fail.
rm dir > /dev/null 2>&1 && fail=1
diff --git a/tests/rm/rm5 b/tests/rm/rm5
index 85d7fef60..048f9a7d7 100755
--- a/tests/rm/rm5
+++ b/tests/rm/rm5
@@ -37,7 +37,6 @@ rm: remove directory `d/e'
rm: remove directory `d'
EOF
-fail=0
rm -ir d < in > out 2>&1 || fail=1
diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1
index af8e2f3fe..74d039f8e 100755
--- a/tests/rm/sunos-1
+++ b/tests/rm/sunos-1
@@ -28,7 +28,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
rm -r '' > /dev/null 2>&1 && fail=1
Exit $fail
diff --git a/tests/rm/unread2 b/tests/rm/unread2
index 3b7b6f295..c1bb4c2ed 100755
--- a/tests/rm/unread2
+++ b/tests/rm/unread2
@@ -27,7 +27,6 @@ skip_if_root_
mkdir -p a/b || framework_failure
chmod u-r a
-fail=0
# This should fail.
rm -rf a > out 2>&1 && fail=1
diff --git a/tests/rm/unread3 b/tests/rm/unread3
index 52366d42e..d26843a20 100755
--- a/tests/rm/unread3
+++ b/tests/rm/unread3
@@ -26,7 +26,6 @@ skip_if_root_
mkdir -p a/1 b c d/2 e/3 || framework_failure
-fail=0
t=`pwd`
cd c
diff --git a/tests/rm/v-slash b/tests/rm/v-slash
index 9aae56e68..5d5b151a0 100755
--- a/tests/rm/v-slash
+++ b/tests/rm/v-slash
@@ -26,7 +26,6 @@ fi
mkdir a || framework_failure
touch a/x || framework_failure
-fail=0
rm --verbose -r a/// > out || fail=1
cat <<\EOF > exp || fail=1