summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rm')
-rw-r--r--tests/rm/Makefile.am47
-rwxr-xr-xtests/rm/cycle6
-rwxr-xr-xtests/rm/dangling-symlink4
-rwxr-xr-xtests/rm/deep-14
-rwxr-xr-xtests/rm/deep-22
-rwxr-xr-xtests/rm/dir-no-w6
-rwxr-xr-xtests/rm/dir-nonrecur6
-rwxr-xr-xtests/rm/dot-rel4
-rwxr-xr-xtests/rm/empty-inacc4
-rwxr-xr-xtests/rm/empty-name4
-rwxr-xr-xtests/rm/f-14
-rwxr-xr-xtests/rm/fail-2eperm6
-rwxr-xr-xtests/rm/fail-eacces6
-rwxr-xr-xtests/rm/fail-eperm4
-rwxr-xr-xtests/rm/hash6
-rwxr-xr-xtests/rm/i-14
-rwxr-xr-xtests/rm/i-never4
-rwxr-xr-xtests/rm/i-no-r4
-rwxr-xr-xtests/rm/ignorable4
-rwxr-xr-xtests/rm/inaccessible4
-rwxr-xr-xtests/rm/interactive-always6
-rwxr-xr-xtests/rm/interactive-once6
-rwxr-xr-xtests/rm/ir-14
-rwxr-xr-xtests/rm/isatty6
-rwxr-xr-xtests/rm/no-give-up4
-rwxr-xr-xtests/rm/one-file-system6
-rwxr-xr-xtests/rm/r-16
-rwxr-xr-xtests/rm/r-26
-rwxr-xr-xtests/rm/r-34
-rwxr-xr-xtests/rm/r-44
-rwxr-xr-xtests/rm/readdir-bug4
-rwxr-xr-xtests/rm/rm16
-rwxr-xr-xtests/rm/rm26
-rwxr-xr-xtests/rm/rm36
-rwxr-xr-xtests/rm/rm46
-rwxr-xr-xtests/rm/rm56
-rwxr-xr-xtests/rm/sunos-14
-rwxr-xr-xtests/rm/unread26
-rwxr-xr-xtests/rm/unread34
-rwxr-xr-xtests/rm/unreadable4
-rwxr-xr-xtests/rm/v-slash6
41 files changed, 98 insertions, 145 deletions
diff --git a/tests/rm/Makefile.am b/tests/rm/Makefile.am
deleted file mode 100644
index d7a09d94d..000000000
--- a/tests/rm/Makefile.am
+++ /dev/null
@@ -1,47 +0,0 @@
-# Make coreutils tests for "rm". -*-Makefile-*-
-
-# Copyright (C) 1997-1998, 2000-2008 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-TESTS = \
- deep-2 \
- deep-1 \
- hash \
- dangling-symlink \
- v-slash \
- i-never \
- fail-eacces \
- one-file-system \
- ignorable \
- readdir-bug \
- empty-inacc \
- dir-nonrecur \
- dot-rel \
- inaccessible \
- unread3 \
- no-give-up \
- dir-no-w \
- empty-name \
- fail-2eperm \
- cycle i-no-r fail-eperm \
- rm1 rm2 rm3 rm4 rm5 \
- unread2 r-1 r-2 r-3 r-4 i-1 ir-1 f-1 sunos-1 \
- unreadable \
- interactive-always interactive-once \
- isatty
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/rm/cycle b/tests/rm/cycle
index 9f7bfcc79..acaa14e35 100755
--- a/tests/rm/cycle
+++ b/tests/rm/cycle
@@ -1,7 +1,7 @@
#!/bin/sh
# rm (coreutils-4.5.4) could be tricked into mistakenly reporting a cycle.
-# Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/b
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink
index 12d07312a..8292ed7e4 100755
--- a/tests/rm/dangling-symlink
+++ b/tests/rm/dangling-symlink
@@ -4,7 +4,7 @@
# But for fileutils-4.1.9, it would do the former and
# for fileutils-4.1.10 the latter.
-# Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s no-file dangle
ln -s / symlink
diff --git a/tests/rm/deep-1 b/tests/rm/deep-1
index a0f72e82c..25239d606 100755
--- a/tests/rm/deep-1
+++ b/tests/rm/deep-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "rm" with a deep hierarchy.
-# Copyright (C) 1997, 2002-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2002-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
umask 022
diff --git a/tests/rm/deep-2 b/tests/rm/deep-2
index d5e1b572c..277a0b664 100755
--- a/tests/rm/deep-2
+++ b/tests/rm/deep-2
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Root can run this test, but it always succeeds, since for root, all
# files are writable, and write_protected_non_symlink never reaches
diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w
index 2ed6926bf..4f5b32590 100755
--- a/tests/rm/dir-no-w
+++ b/tests/rm/dir-no-w
@@ -2,7 +2,7 @@
# rm (without -r) must give a diagnostic for any directory.
# It must not prompt, even if that directory is unwritable.
-# Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir --mode=0500 unwritable-dir || framework_failure
diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur
index b912e6362..817edfd58 100755
--- a/tests/rm/dir-nonrecur
+++ b/tests/rm/dir-nonrecur
@@ -2,7 +2,7 @@
# Ensure that `rm dir' (i.e., without --recursive) gives a reasonable
# diagnostic when failing.
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir d || framework_failure
diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel
index f31e6f04c..256abcba1 100755
--- a/tests/rm/dot-rel
+++ b/tests/rm/dot-rel
@@ -2,7 +2,7 @@
# Use rm -r to remove two non-empty dot-relative directories.
# This would have failed between 2004-10-18 and 2004-10-21.
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir a b || framework_failure
touch a/f b/f || framework_failure
diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc
index 32772e755..d0b661f7c 100755
--- a/tests/rm/empty-inacc
+++ b/tests/rm/empty-inacc
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that rm -rf removes an empty-and-inaccessible directory.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -m0 inacc || framework_failure
diff --git a/tests/rm/empty-name b/tests/rm/empty-name
index a250985c9..85cf1ed4d 100755
--- a/tests/rm/empty-name
+++ b/tests/rm/empty-name
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure that rm -r '' fails.
-# Copyright (C) 1998, 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2003, 2005, 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
# but relative to `/' rather than relative to the current directory.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
diff --git a/tests/rm/f-1 b/tests/rm/f-1
index 750d66038..5d80d8517 100755
--- a/tests/rm/f-1
+++ b/tests/rm/f-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "rm -f" with a nonexistent file.
-# Copyright (C) 1997, 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p d || framework_failure
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm
index 66efbce29..90a1ce943 100755
--- a/tests/rm/fail-2eperm
+++ b/tests/rm/fail-2eperm
@@ -2,7 +2,7 @@
# Like fail-eperm, but the failure must be for a file encountered
# while trying to remove the containing directory with the sticky bit set.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
# The containing directory must be owned by the user who eventually runs rm.
diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces
index d49764c53..7e13a789a 100755
--- a/tests/rm/fail-eacces
+++ b/tests/rm/fail-eacces
@@ -4,7 +4,7 @@
# With the symlink, rm from coreutils-6.9 would fail with a misleading
# ELOOP diagnostic.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,8 +24,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
ok=0
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm
index e9e2108ec..57b33e8f7 100755
--- a/tests/rm/fail-eperm
+++ b/tests/rm/fail-eperm
@@ -3,7 +3,7 @@
# Ensure that rm gives the expected diagnostic when failing to remove a file
# owned by some other user in a directory with the sticky bit set.
-# Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ delete @ENV{qw(BASH_ENV CDPATH ENV PATH)};
$ENV{IFS} = '';
my @dir_list = qw(/tmp /var/tmp /usr/tmp);
-my $rm = '../../src/rm';
+my $rm = '../src/rm';
# Find a directory with the sticky bit set.
my $found_dir;
diff --git a/tests/rm/hash b/tests/rm/hash
index 0261eef2c..0b2b6c57c 100755
--- a/tests/rm/hash
+++ b/tests/rm/hash
@@ -3,7 +3,7 @@
# Before then, rm would fail occasionally, sometimes via
# a failed assertion, others with a seg fault.
-# Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,14 +18,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. $srcdir/../expensive
+. $top_srcdir/tests/expensive
if test "$VERBOSE" = yes; then
set -x
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Create a hierarchy with 3*26 leaf directories, each at depth 153.
echo "$0: creating 78 trees, each of depth 153; this will take a while..." >&2
diff --git a/tests/rm/i-1 b/tests/rm/i-1
index b0d939c2a..15fd94f97 100755
--- a/tests/rm/i-1
+++ b/tests/rm/i-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "rm -i".
-# Copyright (C) 1997-1998, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-1998, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
t=t
mkdir -p $t || framework_failure
diff --git a/tests/rm/i-never b/tests/rm/i-never
index 16edcf6f7..24035f3c8 100755
--- a/tests/rm/i-never
+++ b/tests/rm/i-never
@@ -2,7 +2,7 @@
# Ensure that rm --interactive=never works does not prompt, even for
# an unwritable file.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
touch f || framework_failure
diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r
index 0c2e898d2..d2b2c1062 100755
--- a/tests/rm/i-no-r
+++ b/tests/rm/i-no-r
@@ -3,7 +3,7 @@
# recurse into directory DIR. rm -i (without -r) must fail in that case.
# Fixed in coreutils-4.5.2.
-# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
echo y > y || framework_failure
diff --git a/tests/rm/ignorable b/tests/rm/ignorable
index a3fe1dcaf..0473a2039 100755
--- a/tests/rm/ignorable
+++ b/tests/rm/ignorable
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that rm -f existing-non-dir/anything exits successfully
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
touch existing-non-dir || framework_failure
diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible
index 2175a7d6b..e00093654 100755
--- a/tests/rm/inaccessible
+++ b/tests/rm/inaccessible
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# Skip this test if your system has neither the openat-style functions
# nor /proc/self/fd support with which to emulate them.
diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always
index f085ec169..a20c87955 100755
--- a/tests/rm/interactive-always
+++ b/tests/rm/interactive-always
@@ -1,7 +1,7 @@
#!/bin/sh
# Test the --interactive[=WHEN] changes added to coreutils 6.0
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch file1-1 file1-2 file2-1 file2-2 file3-1 file3-2 file4-1 file4-2 \
|| framework_failure
diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once
index e09db7c12..bb2f23844 100755
--- a/tests/rm/interactive-once
+++ b/tests/rm/interactive-once
@@ -1,7 +1,7 @@
#!/bin/sh
# Test the -I option added to coreutils 6.0
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir1-1 dir2-1 dir2-2 || framework_failure
touch file1-1 file2-1 file2-2 file2-3 file3-1 file3-2 file3-3 file3-4 \
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1
index c3af0acc1..21bd8f0a7 100755
--- a/tests/rm/ir-1
+++ b/tests/rm/ir-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "rm -ir".
-# Copyright (C) 1997, 1998, 2002, 2004, 2006, 2007 Free Software Foundation,
+# Copyright (C) 1997, 1998, 2002, 2004, 2006-2008 Free Software Foundation,
# Inc.
# This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
t=t
mkdir -p $t $t/a $t/b $t/c || framework_failure
diff --git a/tests/rm/isatty b/tests/rm/isatty
index 040d97548..b0f4fdcb7 100755
--- a/tests/rm/isatty
+++ b/tests/rm/isatty
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure `chown 0 f; rm f' prompts before removing f.
-# Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
fail=0
diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up
index 8a1ecdc75..aa31d93f9 100755
--- a/tests/rm/no-give-up
+++ b/tests/rm/no-give-up
@@ -2,7 +2,7 @@
# With rm from coreutils-5.2.1 and earlier, `rm -r' would mistakenly
# give up too early under some conditions.
-# Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_root_
mkdir d || framework_failure
diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system
index 15d327965..1cc4bfb9d 100755
--- a/tests/rm/one-file-system
+++ b/tests/rm/one-file-system
@@ -1,7 +1,7 @@
#!/bin/sh
# Demonstrate rm's new --one-file-system option.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
# If used, these must *follow* test-lib.sh.
diff --git a/tests/rm/r-1 b/tests/rm/r-1
index 5e05d43ea..1bc1743a5 100755
--- a/tests/rm/r-1
+++ b/tests/rm/r-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "rm -r --verbose".
-# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006, 2007 Free Software
+# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -24,8 +24,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a a/a || framework_failure
> b || framework_failure
diff --git a/tests/rm/r-2 b/tests/rm/r-2
index 0e381ad40..370260690 100755
--- a/tests/rm/r-2
+++ b/tests/rm/r-2
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "rm -r --verbose".
-# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006, 2007 Free Software
+# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir t t/a t/a/b || framework_failure
> t/a/f || framework_failure
diff --git a/tests/rm/r-3 b/tests/rm/r-3
index 485832d0b..26355600a 100755
--- a/tests/rm/r-3
+++ b/tests/rm/r-3
@@ -1,7 +1,7 @@
#!/bin/sh
# Create and remove a directory with more than 254 files.
-# Copyright (C) 1997, 2001-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir t || framework_failure
cd t || framework_failure
diff --git a/tests/rm/r-4 b/tests/rm/r-4
index 8320542f7..7430273a0 100755
--- a/tests/rm/r-4
+++ b/tests/rm/r-4
@@ -1,7 +1,7 @@
#!/bin/sh
# Try to remove '.' and '..' recursively.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir d || framework_failure
touch d/a || framework_failure
diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug
index 6386b7583..6b81a746b 100755
--- a/tests/rm/readdir-bug
+++ b/tests/rm/readdir-bug
@@ -2,7 +2,7 @@
# Exercise the Darwin/MacOS bug worked around on 2006-09-29,
# whereby rm would fail to remove all entries in a directory.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Create a directory containing many files.
# What counts is a combination of the number of files and
diff --git a/tests/rm/rm1 b/tests/rm/rm1
index 37705639d..0ea38eb5d 100755
--- a/tests/rm/rm1
+++ b/tests/rm/rm1
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise another small part of remove.c
-# Copyright (C) 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p b/a/p b/c b/d || framework_failure
diff --git a/tests/rm/rm2 b/tests/rm/rm2
index 2524db06f..fca9fa554 100755
--- a/tests/rm/rm2
+++ b/tests/rm/rm2
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise another small part of remove.c
-# Copyright (C) 2002-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/0 || framework_failure
diff --git a/tests/rm/rm3 b/tests/rm/rm3
index cfa1b02a7..9708bd295 100755
--- a/tests/rm/rm3
+++ b/tests/rm/rm3
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise another small part of remove.c
-# Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p z || framework_failure
diff --git a/tests/rm/rm4 b/tests/rm/rm4
index c158e6905..70bc048a9 100755
--- a/tests/rm/rm4
+++ b/tests/rm/rm4
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that `rm dir' fails without --recursive
-# Copyright (C) 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir dir || framework_failure
diff --git a/tests/rm/rm5 b/tests/rm/rm5
index c3243233e..73245838d 100755
--- a/tests/rm/rm5
+++ b/tests/rm/rm5
@@ -1,7 +1,7 @@
#!/bin/sh
# a basic test of rm -ri
-# Copyright (C) 2002-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p d/e || framework_failure
diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1
index a0e431287..03200bf36 100755
--- a/tests/rm/sunos-1
+++ b/tests/rm/sunos-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure that rm -r '' fails.
-# Copyright (C) 1997, 1998, 2002, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1997-1998, 2002, 2004, 2006, 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
rm -r '' > /dev/null 2>&1 && fail=1
diff --git a/tests/rm/unread2 b/tests/rm/unread2
index 966bfa1b8..1e3fad939 100755
--- a/tests/rm/unread2
+++ b/tests/rm/unread2
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise one small part of remove.c
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/b || framework_failure
diff --git a/tests/rm/unread3 b/tests/rm/unread3
index 71089f5d6..36e93bbe3 100755
--- a/tests/rm/unread3
+++ b/tests/rm/unread3
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that rm works even from an unreadable working directory.
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/1 b c d/2 e/3 || framework_failure
diff --git a/tests/rm/unreadable b/tests/rm/unreadable
index 4fb40235c..836cd611a 100755
--- a/tests/rm/unreadable
+++ b/tests/rm/unreadable
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "rm" and unreadable directories.
-# Copyright (C) 1998, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
diff --git a/tests/rm/v-slash b/tests/rm/v-slash
index 2f26c03b4..198b82b4c 100755
--- a/tests/rm/v-slash
+++ b/tests/rm/v-slash
@@ -1,7 +1,7 @@
#!/bin/sh
# avoid extra slashes in --verbose output
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
rm --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a || framework_failure
touch a/x || framework_failure