summaryrefslogtreecommitdiff
path: root/tests/mv
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mv')
-rwxr-xr-xtests/mv/acl1
-rwxr-xr-xtests/mv/atomic1
-rwxr-xr-xtests/mv/atomic21
-rwxr-xr-xtests/mv/backup-dir1
-rwxr-xr-xtests/mv/backup-is-src1
-rwxr-xr-xtests/mv/childproof1
-rwxr-xr-xtests/mv/diag1
-rwxr-xr-xtests/mv/dir-file1
-rwxr-xr-xtests/mv/dir2dir1
-rwxr-xr-xtests/mv/dup-source1
-rwxr-xr-xtests/mv/force1
-rwxr-xr-xtests/mv/hard-21
-rwxr-xr-xtests/mv/hard-31
-rwxr-xr-xtests/mv/hard-41
-rwxr-xr-xtests/mv/hard-link-11
-rwxr-xr-xtests/mv/hard-verbose1
-rwxr-xr-xtests/mv/i-21
-rwxr-xr-xtests/mv/i-31
-rwxr-xr-xtests/mv/i-41
-rwxr-xr-xtests/mv/i-51
-rwxr-xr-xtests/mv/i-link-no1
-rwxr-xr-xtests/mv/into-self1
-rwxr-xr-xtests/mv/into-self-21
-rwxr-xr-xtests/mv/into-self-31
-rwxr-xr-xtests/mv/into-self-41
-rwxr-xr-xtests/mv/leak-fd1
-rwxr-xr-xtests/mv/mv-n1
-rwxr-xr-xtests/mv/mv-special-11
-rwxr-xr-xtests/mv/no-target-dir1
-rwxr-xr-xtests/mv/part-fail1
-rwxr-xr-xtests/mv/part-hardlink1
-rwxr-xr-xtests/mv/part-rename1
-rwxr-xr-xtests/mv/part-symlink1
-rwxr-xr-xtests/mv/partition-perm1
-rwxr-xr-xtests/mv/perm-11
-rwxr-xr-xtests/mv/sticky-to-xpart1
-rwxr-xr-xtests/mv/to-symlink1
-rwxr-xr-xtests/mv/trailing-slash1
-rwxr-xr-xtests/mv/update1
39 files changed, 0 insertions, 39 deletions
diff --git a/tests/mv/acl b/tests/mv/acl
index e9fb62679..5ad8de052 100755
--- a/tests/mv/acl
+++ b/tests/mv/acl
@@ -48,7 +48,6 @@ acl1=`getfacl file` || skip_partition=.
test $skip_partition != none &&
skip_test_ "'$skip' is not on a suitable file system for this test"
-fail=0
# move the access acl of a file
mv file "$other_partition_tmpdir" || fail=1
acl2=`cd "$other_partition_tmpdir" && getfacl file` || framework_failure
diff --git a/tests/mv/atomic b/tests/mv/atomic
index 8dd22659d..ef78d5281 100755
--- a/tests/mv/atomic
+++ b/tests/mv/atomic
@@ -35,7 +35,6 @@ require_strace_ unlink
ln -s t1 s1 || framework_failure
ln -s t2 s2 || framework_failure
-fail=0
strace -qe unlink mv -T s1 s2 > out 2>&1 || fail=1
$EGREP 'unlink.*"s1"' out && fail=1
diff --git a/tests/mv/atomic2 b/tests/mv/atomic2
index ae1b6e95f..5dd3f3568 100755
--- a/tests/mv/atomic2
+++ b/tests/mv/atomic2
@@ -35,7 +35,6 @@ require_strace_ unlink
touch a b || framework_failure
ln b b2 || framework_failure
-fail=0
strace -qe unlink mv a b > out 2>&1 || fail=1
$EGREP 'unlink.*"b"' out && fail=1
diff --git a/tests/mv/backup-dir b/tests/mv/backup-dir
index e70ce8571..64616440d 100755
--- a/tests/mv/backup-dir
+++ b/tests/mv/backup-dir
@@ -26,7 +26,6 @@ fi
mkdir A B || framework_failure
touch X Y || framework_failure
-fail=0
# Before coreutils-6.2, the " (backup: `B.~1~')" suffix was not printed.
mv --verbose --backup=numbered -T A B > out || fail=1
diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src
index 7d80078f2..df6561baf 100755
--- a/tests/mv/backup-is-src
+++ b/tests/mv/backup-is-src
@@ -32,7 +32,6 @@ rm -f "$a" "$a2" || framework_failure
echo a > "$a" || framework_failure
echo a2 > "$a2" || framework_failure
-fail=0
# This mv command should exit nonzero.
mv --b=simple "$a2" "$a" > out 2>&1 && fail=1
diff --git a/tests/mv/childproof b/tests/mv/childproof
index 2f264b45f..ff51a0924 100755
--- a/tests/mv/childproof
+++ b/tests/mv/childproof
@@ -32,7 +32,6 @@ mkdir a b c || framework_failure
echo a > a/f || framework_failure
echo b > b/f || framework_failure
-fail=0
cp a/f b/f c 2> /dev/null && fail=1
test -f a/f || fail=1
diff --git a/tests/mv/diag b/tests/mv/diag
index 75904d626..6e28fa463 100755
--- a/tests/mv/diag
+++ b/tests/mv/diag
@@ -28,7 +28,6 @@ touch f1 || framework_failure
touch f2 || framework_failure
touch d || framework_failure
-fail=0
# These mv commands should all exit nonzero.
# Too few args. This first one did fail, but with an incorrect diagnostic
diff --git a/tests/mv/dir-file b/tests/mv/dir-file
index 629ddb584..13d1419a4 100755
--- a/tests/mv/dir-file
+++ b/tests/mv/dir-file
@@ -26,7 +26,6 @@ fi
mkdir -p dir/file || framework_failure
> file || framework_failure
-fail=0
# These should both fail, but until fileutils-4.0q only the second one did.
mv dir file > /dev/null 2>&1 && fail=1
diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir
index cf161dac5..24afc1ed5 100755
--- a/tests/mv/dir2dir
+++ b/tests/mv/dir2dir
@@ -27,7 +27,6 @@ fi
mkdir -p a/t b/t || framework_failure
touch a/t/f || framework_failure
-fail=0
# Expect this to fail with the expected diagnostic.
# For an interrim (pre-6.0) release, it would give an erroneous
diff --git a/tests/mv/dup-source b/tests/mv/dup-source
index 342fe4572..e7fb089de 100755
--- a/tests/mv/dup-source
+++ b/tests/mv/dup-source
@@ -28,7 +28,6 @@ fi
. $srcdir/test-lib.sh
skip_if_root_
-fail=0
for i in cp; do
diff --git a/tests/mv/force b/tests/mv/force
index df4397050..88851ac59 100755
--- a/tests/mv/force
+++ b/tests/mv/force
@@ -29,7 +29,6 @@ ff2=mvforce2
echo force-contents > $ff || framework_failure
ln $ff $ff2 || framework_failure
-fail=0
# This mv command should exit nonzero.
mv $ff $ff > out 2>&1 && fail=1
diff --git a/tests/mv/hard-2 b/tests/mv/hard-2
index 8822700a3..1bd173e99 100755
--- a/tests/mv/hard-2
+++ b/tests/mv/hard-2
@@ -32,7 +32,6 @@ touch a || framework_failure
ln a b || framework_failure
ln a c || framework_failure
-fail=0
# ======================================
cp --preserve=link a b c dst || fail=1
diff --git a/tests/mv/hard-3 b/tests/mv/hard-3
index c2ff815c6..fbd7cc8a6 100755
--- a/tests/mv/hard-3
+++ b/tests/mv/hard-3
@@ -45,7 +45,6 @@ touch a || framework_failure
ln a x/b || framework_failure
ln a c || framework_failure
-fail=0
# ======================================
# This must fail -- because x/b cannot be unlinked.
diff --git a/tests/mv/hard-4 b/tests/mv/hard-4
index 9a8c832ea..05fba29fc 100755
--- a/tests/mv/hard-4
+++ b/tests/mv/hard-4
@@ -25,7 +25,6 @@ fi
touch a || framework_failure
ln a b || framework_failure
-fail=0
mv a b || fail=1
diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1
index d626f3cc0..2df2cf3ff 100755
--- a/tests/mv/hard-link-1
+++ b/tests/mv/hard-link-1
@@ -32,7 +32,6 @@ mkdir $dir || framework_failure
> $dir/a || framework_failure
ln $dir/a $dir/b || framework_failure
-fail=0
mv $dir "$other_partition_tmpdir" || fail=1
# Display inode numbers, one per line.
diff --git a/tests/mv/hard-verbose b/tests/mv/hard-verbose
index db7cdb2c4..0c9198c79 100755
--- a/tests/mv/hard-verbose
+++ b/tests/mv/hard-verbose
@@ -26,7 +26,6 @@ fi
touch x || framework_failure
ln x y || framework_failure
-fail=0
mv --verbose x y > out || fail=1
cat <<\EOF > exp || fail=1
diff --git a/tests/mv/i-2 b/tests/mv/i-2
index 05ced50d0..3c56e31a8 100755
--- a/tests/mv/i-2
+++ b/tests/mv/i-2
@@ -35,7 +35,6 @@ done
chmod 0 b d f h || framework_failure
echo y > y || framework_failure
-fail=0
mv -if a b || fail=1
mv -fi c d < y >/dev/null 2>&1 || fail=1
diff --git a/tests/mv/i-3 b/tests/mv/i-3
index 738605bd0..bfb2a31e4 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -30,7 +30,6 @@ trap '' TTIN # Ignore SIGTTIN
touch f g h i || framework_failure
chmod 0 g i || framework_failure
-fail=0
ls /dev/stdin >/dev/null 2>&1 \
|| skip_test_ 'there is no /dev/stdin file'
diff --git a/tests/mv/i-4 b/tests/mv/i-4
index bdc353c5b..8eaf2d6ae 100755
--- a/tests/mv/i-4
+++ b/tests/mv/i-4
@@ -28,7 +28,6 @@ for i in a b; do
done
echo y > y || framework_failure
-fail=0
mv -i a b < y >/dev/null 2>&1 || fail=1
# Make sure out contains the prompt.
diff --git a/tests/mv/i-5 b/tests/mv/i-5
index 0c99bac67..342e66ce1 100755
--- a/tests/mv/i-5
+++ b/tests/mv/i-5
@@ -26,7 +26,6 @@ fi
mkdir a || framework_failure
touch b || framework_failure
-fail=0
# coreutils 6.2 mv would neglect to prompt in this case.
echo n | mv -i a b 2>/dev/null || fail=1
diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no
index 031e80761..7a8506408 100755
--- a/tests/mv/i-link-no
+++ b/tests/mv/i-link-no
@@ -31,7 +31,6 @@ ln b/FUBAR b/bar || framework_failure
chmod a-w b/bar || framework_failure
echo n > no || framework_failure
-fail=0
mv a/bar a/foo b < no > out 2> err || fail=1
touch exp
diff --git a/tests/mv/into-self b/tests/mv/into-self
index 84b41eebe..f4f598a1b 100755
--- a/tests/mv/into-self
+++ b/tests/mv/into-self
@@ -30,7 +30,6 @@ rm -rf $dir $file || framework_failure
mkdir -p $dir/a/b || framework_failure
touch $file || framework_failure
-fail=0
# This mv command should fail.
mv $dir $file $dir > out 2>&1 && fail=1
diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2
index 1b3e6b7b3..3c3e7e2d0 100755
--- a/tests/mv/into-self-2
+++ b/tests/mv/into-self-2
@@ -30,7 +30,6 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; }
file="$other_partition_tmpdir/file"
symlink=symlink
-fail=0
echo whatever > $file || framework_failure
ln -s $file $symlink || framework_failure
diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3
index e5a4f8d30..b9fa41af4 100755
--- a/tests/mv/into-self-3
+++ b/tests/mv/into-self-3
@@ -28,7 +28,6 @@ dir2=is3-dir2
mkdir $dir1 $dir2 || framework_failure
-fail=0
# This mv command should exit nonzero.
mv $dir1 $dir2 $dir2 > out 2>&1 && fail=1
diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4
index baef23ad8..6b29fff42 100755
--- a/tests/mv/into-self-4
+++ b/tests/mv/into-self-4
@@ -27,7 +27,6 @@ fi
touch file || framework_failure
ln -s file s || framework_failure
-fail=0
# This must fail.
mv s s 2> /dev/null && fail=1
diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd
index 76a6b439a..86cfbcd78 100755
--- a/tests/mv/leak-fd
+++ b/tests/mv/leak-fd
@@ -48,7 +48,6 @@ sed 's,$,/f,' .dirs | xargs touch
last_file=`tail -n1 .dirs`/f
test -f $last_file || framework_failure
-fail=0
mv * "$other_partition_tmpdir" || fail=1
test -f $last_file/f && fail=1
diff --git a/tests/mv/mv-n b/tests/mv/mv-n
index f91fba0e1..448f47468 100755
--- a/tests/mv/mv-n
+++ b/tests/mv/mv-n
@@ -23,7 +23,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
# test miscellaneous combinations of -f -i -n parameters
touch a b || framework_failure
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1
index 321c54e64..73f9fb4d5 100755
--- a/tests/mv/mv-special-1
+++ b/tests/mv/mv-special-1
@@ -41,7 +41,6 @@ touch $dir/a/b/c/file1 $dir/d/e/f/file2 || framework_failure
# from an OpenBSD system, the above mknod fails.
# It's not worth making an exception any more.
-fail=0
mv --verbose $null $dir "$other_partition_tmpdir" > out || fail=1
# Make sure the files are gone.
test -p $null && fail=1
diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir
index 387a75f9b..2ef5f2abb 100755
--- a/tests/mv/no-target-dir
+++ b/tests/mv/no-target-dir
@@ -33,7 +33,6 @@ mkdir a b b/a || framework_failure
mv a b ||
skip_test_ "your kernel's rename syscall is buggy"
-fail=0
# This should succeed, since both src and dest are directories,
# and the dest dir is empty.
diff --git a/tests/mv/part-fail b/tests/mv/part-fail
index 290864dff..3d939f1db 100755
--- a/tests/mv/part-fail
+++ b/tests/mv/part-fail
@@ -32,7 +32,6 @@ cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; }
touch k "$other_partition_tmpdir/k" || framework_failure
chmod u-w "$other_partition_tmpdir" || framework_failure
-fail=0
mv -f k "$other_partition_tmpdir" 2> out && fail=1
cat <<EOF > exp
diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink
index 51dea2043..e158964bc 100755
--- a/tests/mv/part-hardlink
+++ b/tests/mv/part-hardlink
@@ -34,7 +34,6 @@ mkdir a b || framework_failure
touch a/1 || framework_failure
ln a/1 b/1 || framework_failure
-fail=0
mv f g "$other_partition_tmpdir" || fail=1
mv a b "$other_partition_tmpdir" || fail=1
diff --git a/tests/mv/part-rename b/tests/mv/part-rename
index 45b8615ec..a1a651722 100755
--- a/tests/mv/part-rename
+++ b/tests/mv/part-rename
@@ -29,7 +29,6 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; }
mkdir foo || framework_failure
-fail=0
mv foo/ "$other_partition_tmpdir/bar" || fail=1
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index a12a9f531..ed3e25b10 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -33,7 +33,6 @@ pwd_tmp=`pwd`
# can make this test fail.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-fail=0
# Four cases:
# local regular file w/symlink on another partition
diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm
index 41a193cc2..c6f8066c9 100755
--- a/tests/mv/partition-perm
+++ b/tests/mv/partition-perm
@@ -31,7 +31,6 @@ chmod a=rwx file
umask 077
mv file "$other_partition_tmpdir"
-fail=0
test -f file && fail=1
test -f "$other_partition_tmpdir/file" || fail=1
diff --git a/tests/mv/perm-1 b/tests/mv/perm-1
index b8c3bf3b5..88a6f4024 100755
--- a/tests/mv/perm-1
+++ b/tests/mv/perm-1
@@ -28,7 +28,6 @@ skip_if_root_
mkdir -p no-write/dir || framework_failure
chmod u-w no-write || framework_failure
-fail=0
mv no-write/dir . > out 2>&1 && fail=1
cat <<\EOF > exp
diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart
index f8855a21f..7187e8082 100755
--- a/tests/mv/sticky-to-xpart
+++ b/tests/mv/sticky-to-xpart
@@ -43,7 +43,6 @@ chown "$NON_ROOT_USERNAME" "$other_partition_tmpdir" || framework_failure
# We have to allow $NON_ROOT_USERNAME access to ".".
chmod go+x . || framework_failure
-fail=0
# Ensure that $NON_ROOT_USERNAME can access the required version of mv.
version=`setuidgid $NON_ROOT_USERNAME env PATH="$PATH" mv --version|sed -n '1s/.* //p'`
diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink
index c5fc099c9..3806f56d7 100755
--- a/tests/mv/to-symlink
+++ b/tests/mv/to-symlink
@@ -30,7 +30,6 @@ rem_file="$other_partition_tmpdir/file"
rem_symlink="$other_partition_tmpdir/symlink"
file=to-sym-$$
-fail=0
rm -f $file || framework_failure
echo local > $file || framework_failure
diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash
index 24ab722d1..a86626a6b 100755
--- a/tests/mv/trailing-slash
+++ b/tests/mv/trailing-slash
@@ -28,7 +28,6 @@ fi
mkdir foo || framework_failure
-fail=0
mv foo/ bar || fail=1
diff --git a/tests/mv/update b/tests/mv/update
index ae3127f23..cf6e471af 100755
--- a/tests/mv/update
+++ b/tests/mv/update
@@ -28,7 +28,6 @@ echo old > old || framework_failure
touch -d yesterday old || framework_failure
echo new > new || framework_failure
-fail=0
for interactive in '' -i; do
for cp_or_mv in cp mv; do