summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac17
-rw-r--r--tests/Makefile.am382
-rw-r--r--tests/check.mk3
-rw-r--r--tests/chgrp/Makefile.am12
-rwxr-xr-xtests/chgrp/basic8
-rwxr-xr-xtests/chgrp/default-no-deref6
-rwxr-xr-xtests/chgrp/deref6
-rwxr-xr-xtests/chgrp/no-x8
-rwxr-xr-xtests/chgrp/posix-H6
-rwxr-xr-xtests/chgrp/recurse6
-rw-r--r--tests/chmod/Makefile.am16
-rwxr-xr-xtests/chmod/c-option6
-rwxr-xr-xtests/chmod/equal-x4
-rwxr-xr-xtests/chmod/equals4
-rwxr-xr-xtests/chmod/inaccessible4
-rwxr-xr-xtests/chmod/no-x6
-rwxr-xr-xtests/chmod/octal4
-rwxr-xr-xtests/chmod/setgid4
-rwxr-xr-xtests/chmod/thru-dangling4
-rwxr-xr-xtests/chmod/umask-x6
-rwxr-xr-xtests/chmod/usage6
-rw-r--r--tests/chown/Makefile.am9
-rwxr-xr-xtests/chown/basic6
-rwxr-xr-xtests/chown/deref6
-rwxr-xr-xtests/chown/preserve-root6
-rwxr-xr-xtests/chown/separator4
-rw-r--r--tests/cp/Makefile.am40
-rwxr-xr-xtests/cp/abuse8
-rwxr-xr-xtests/cp/acl4
-rwxr-xr-xtests/cp/backup-14
-rwxr-xr-xtests/cp/backup-dir4
-rwxr-xr-xtests/cp/backup-is-src6
-rwxr-xr-xtests/cp/cp-HL4
-rwxr-xr-xtests/cp/cp-a-selinux4
-rwxr-xr-xtests/cp/cp-deref4
-rwxr-xr-xtests/cp/cp-i6
-rwxr-xr-xtests/cp/cp-mv-backup6
-rwxr-xr-xtests/cp/cp-parents6
-rwxr-xr-xtests/cp/deref-slink6
-rwxr-xr-xtests/cp/dir-rm-dest4
-rwxr-xr-xtests/cp/dir-slash4
-rwxr-xr-xtests/cp/dir-vs-file4
-rwxr-xr-xtests/cp/existing-perm-race6
-rwxr-xr-xtests/cp/fail-perm6
-rwxr-xr-xtests/cp/file-perm-race4
-rwxr-xr-xtests/cp/into-self6
-rwxr-xr-xtests/cp/link4
-rwxr-xr-xtests/cp/link-no-deref4
-rwxr-xr-xtests/cp/link-preserve6
-rwxr-xr-xtests/cp/no-deref-link14
-rwxr-xr-xtests/cp/no-deref-link24
-rwxr-xr-xtests/cp/no-deref-link34
-rwxr-xr-xtests/cp/parent-perm4
-rwxr-xr-xtests/cp/parent-perm-race4
-rwxr-xr-xtests/cp/perm4
-rwxr-xr-xtests/cp/preserve-24
-rwxr-xr-xtests/cp/preserve-gid6
-rwxr-xr-xtests/cp/proc-zero-len4
-rwxr-xr-xtests/cp/r-vs-symlink4
-rwxr-xr-xtests/cp/same-file6
-rwxr-xr-xtests/cp/slink-2-slink6
-rwxr-xr-xtests/cp/sparse6
-rwxr-xr-xtests/cp/special-bits4
-rwxr-xr-xtests/cp/special-f6
-rwxr-xr-xtests/cp/src-base-dot4
-rwxr-xr-xtests/cp/symlink-slash6
-rwxr-xr-xtests/cp/thru-dangling4
-rw-r--r--tests/dd/Makefile.am8
-rwxr-xr-xtests/dd/misc2
-rwxr-xr-xtests/dd/not-rewound4
-rwxr-xr-xtests/dd/skip-seek2
-rwxr-xr-xtests/dd/skip-seek24
-rwxr-xr-xtests/dd/unblock-sync4
-rwxr-xr-xtests/du/2g4
-rwxr-xr-xtests/du/8gb6
-rw-r--r--tests/du/Makefile.am34
-rwxr-xr-xtests/du/basic6
-rwxr-xr-xtests/du/deref4
-rwxr-xr-xtests/du/deref-args4
-rwxr-xr-xtests/du/exclude4
-rwxr-xr-xtests/du/fd-leak6
-rwxr-xr-xtests/du/files0-from4
-rwxr-xr-xtests/du/hard-link6
-rwxr-xr-xtests/du/inacc-dest6
-rwxr-xr-xtests/du/inacc-dir4
-rwxr-xr-xtests/du/inaccessible-cwd4
-rwxr-xr-xtests/du/long-from-unreadable4
-rwxr-xr-xtests/du/long-sloop6
-rwxr-xr-xtests/du/no-deref4
-rwxr-xr-xtests/du/no-x6
-rwxr-xr-xtests/du/one-file-system4
-rwxr-xr-xtests/du/restore-wd4
-rwxr-xr-xtests/du/slash2
-rwxr-xr-xtests/du/slink4
-rwxr-xr-xtests/du/trailing-slash4
-rwxr-xr-xtests/du/two-args4
-rw-r--r--tests/install/Makefile.am10
-rwxr-xr-xtests/install/basic-16
-rwxr-xr-xtests/install/create-leading2
-rwxr-xr-xtests/install/d-slashdot4
-rwxr-xr-xtests/install/trap4
-rw-r--r--tests/ln/Makefile.am7
-rwxr-xr-xtests/ln/backup-14
-rwxr-xr-xtests/ln/hard-backup6
-rwxr-xr-xtests/ln/misc4
-rwxr-xr-xtests/ln/sf-14
-rwxr-xr-xtests/ln/target-14
-rw-r--r--tests/ls/Makefile.am31
-rwxr-xr-xtests/ls/color-dtype-dir2
-rwxr-xr-xtests/ls/dangle4
-rwxr-xr-xtests/ls/dired4
-rwxr-xr-xtests/ls/file-type6
-rwxr-xr-xtests/ls/follow-slink4
-rwxr-xr-xtests/ls/infloop6
-rwxr-xr-xtests/ls/inode4
-rwxr-xr-xtests/ls/m-option4
-rwxr-xr-xtests/ls/nameless-uid8
-rwxr-xr-xtests/ls/no-arg4
-rwxr-xr-xtests/ls/proc-selinux-segfault4
-rwxr-xr-xtests/ls/recursive4
-rwxr-xr-xtests/ls/rt-16
-rwxr-xr-xtests/ls/stat-dtype4
-rwxr-xr-xtests/ls/stat-failed6
-rwxr-xr-xtests/ls/stat-free-symlinks2
-rwxr-xr-xtests/ls/stat-vs-dirent4
-rwxr-xr-xtests/ls/symlink-slash4
-rwxr-xr-xtests/ls/x-option6
-rwxr-xr-xtests/misc/arch4
-rwxr-xr-xtests/misc/base644
-rwxr-xr-xtests/misc/basename4
-rwxr-xr-xtests/misc/cat-proc4
-rwxr-xr-xtests/misc/chcon4
-rwxr-xr-xtests/misc/chcon-fail4
-rwxr-xr-xtests/misc/close-stdout4
-rwxr-xr-xtests/misc/csplit6
-rwxr-xr-xtests/misc/cut4
-rwxr-xr-xtests/misc/date4
-rwxr-xr-xtests/misc/date-sec4
-rwxr-xr-xtests/misc/df4
-rwxr-xr-xtests/misc/df-P6
-rwxr-xr-xtests/misc/dircolors4
-rwxr-xr-xtests/misc/dirname4
-rwxr-xr-xtests/misc/expand4
-rwxr-xr-xtests/misc/expr4
-rwxr-xr-xtests/misc/factor4
-rwxr-xr-xtests/misc/false-status4
-rwxr-xr-xtests/misc/fmt4
-rwxr-xr-xtests/misc/fmt-long-line4
-rwxr-xr-xtests/misc/fold4
-rwxr-xr-xtests/misc/groups-dash6
-rwxr-xr-xtests/misc/groups-version6
-rwxr-xr-xtests/misc/head-c4
-rwxr-xr-xtests/misc/head-elide-tail4
-rwxr-xr-xtests/misc/head-pos4
-rwxr-xr-xtests/misc/help-version4
-rwxr-xr-xtests/misc/ls-misc2
-rwxr-xr-xtests/misc/ls-time2
-rwxr-xr-xtests/misc/md5sum2
-rwxr-xr-xtests/misc/md5sum-newline4
-rwxr-xr-xtests/misc/mknod4
-rwxr-xr-xtests/misc/mktemp4
-rwxr-xr-xtests/misc/nice2
-rwxr-xr-xtests/misc/nl4
-rwxr-xr-xtests/misc/nohup6
-rwxr-xr-xtests/misc/od4
-rwxr-xr-xtests/misc/od-N4
-rwxr-xr-xtests/misc/od-x84
-rwxr-xr-xtests/misc/paste2
-rwxr-xr-xtests/misc/pathchk14
-rwxr-xr-xtests/misc/pr4
-rwxr-xr-xtests/misc/printf4
-rwxr-xr-xtests/misc/printf-hex4
-rwxr-xr-xtests/misc/printf-surprise4
-rwxr-xr-xtests/misc/ptx-overrun2
-rwxr-xr-xtests/misc/pwd-long4
-rwxr-xr-xtests/misc/pwd-unreadable-parent2
-rwxr-xr-xtests/misc/readlink-fp-loop4
-rwxr-xr-xtests/misc/runcon-no-reorder6
-rwxr-xr-xtests/misc/selinux4
-rwxr-xr-xtests/misc/seq2
-rwxr-xr-xtests/misc/sha1sum2
-rwxr-xr-xtests/misc/sha1sum-vec4
-rwxr-xr-xtests/misc/sha224sum4
-rwxr-xr-xtests/misc/sha256sum4
-rwxr-xr-xtests/misc/sha384sum4
-rwxr-xr-xtests/misc/sha512sum4
-rwxr-xr-xtests/misc/shred-exact4
-rwxr-xr-xtests/misc/shred-remove2
-rwxr-xr-xtests/misc/shuf4
-rwxr-xr-xtests/misc/sort-compress4
-rwxr-xr-xtests/misc/sort-merge4
-rwxr-xr-xtests/misc/sort-rand4
-rwxr-xr-xtests/misc/split-a4
-rwxr-xr-xtests/misc/split-fail6
-rwxr-xr-xtests/misc/split-l4
-rwxr-xr-xtests/misc/stat-fmt4
-rwxr-xr-xtests/misc/stat-printf4
-rwxr-xr-xtests/misc/stty4
-rwxr-xr-xtests/misc/stty-invalid6
-rwxr-xr-xtests/misc/stty-row-col4
-rwxr-xr-xtests/misc/sum4
-rwxr-xr-xtests/misc/sum-sysv6
-rwxr-xr-xtests/misc/tac-continue6
-rwxr-xr-xtests/misc/tee4
-rwxr-xr-xtests/misc/tee-dash4
-rwxr-xr-xtests/misc/test-diag4
-rwxr-xr-xtests/misc/tsort4
-rwxr-xr-xtests/misc/tty-eof2
-rwxr-xr-xtests/misc/unexpand4
-rwxr-xr-xtests/misc/wc-files06
-rwxr-xr-xtests/misc/wc-files0-from4
-rwxr-xr-xtests/misc/xstrtol4
-rw-r--r--[-rwxr-xr-x]tests/mk-script0
-rw-r--r--tests/mkdir/Makefile.am18
-rwxr-xr-xtests/mkdir/p-12
-rwxr-xr-xtests/mkdir/p-22
-rwxr-xr-xtests/mkdir/p-32
-rwxr-xr-xtests/mkdir/p-slashdot4
-rwxr-xr-xtests/mkdir/p-thru-slink4
-rwxr-xr-xtests/mkdir/p-v4
-rwxr-xr-xtests/mkdir/parents8
-rwxr-xr-xtests/mkdir/perm4
-rwxr-xr-xtests/mkdir/selinux6
-rwxr-xr-xtests/mkdir/special-12
-rwxr-xr-xtests/mkdir/t-slash4
-rwxr-xr-xtests/mkdir/writable-under-readonly2
-rw-r--r--tests/mv/Makefile.am52
-rwxr-xr-xtests/mv/acl4
-rwxr-xr-xtests/mv/atomic2
-rwxr-xr-xtests/mv/atomic22
-rwxr-xr-xtests/mv/backup-dir6
-rwxr-xr-xtests/mv/backup-is-src4
-rwxr-xr-xtests/mv/childproof6
-rwxr-xr-xtests/mv/diag4
-rwxr-xr-xtests/mv/dir-file2
-rwxr-xr-xtests/mv/dir2dir6
-rwxr-xr-xtests/mv/dup-source6
-rwxr-xr-xtests/mv/force4
-rwxr-xr-xtests/mv/hard-24
-rwxr-xr-xtests/mv/hard-34
-rwxr-xr-xtests/mv/hard-44
-rwxr-xr-xtests/mv/hard-link-14
-rwxr-xr-xtests/mv/hard-verbose6
-rwxr-xr-xtests/mv/i-14
-rwxr-xr-xtests/mv/i-24
-rwxr-xr-xtests/mv/i-38
-rwxr-xr-xtests/mv/i-44
-rwxr-xr-xtests/mv/i-56
-rwxr-xr-xtests/mv/i-link-no6
-rwxr-xr-xtests/mv/into-self4
-rwxr-xr-xtests/mv/into-self-24
-rwxr-xr-xtests/mv/into-self-34
-rwxr-xr-xtests/mv/into-self-44
-rwxr-xr-xtests/mv/leak-fd6
-rwxr-xr-xtests/mv/mv-special-16
-rwxr-xr-xtests/mv/no-target-dir4
-rwxr-xr-xtests/mv/part-fail6
-rwxr-xr-xtests/mv/part-hardlink4
-rwxr-xr-xtests/mv/part-rename4
-rwxr-xr-xtests/mv/part-symlink6
-rwxr-xr-xtests/mv/partition-perm4
-rwxr-xr-xtests/mv/perm-16
-rwxr-xr-xtests/mv/reply-no6
-rwxr-xr-xtests/mv/sticky-to-xpart8
-rwxr-xr-xtests/mv/to-symlink2
-rwxr-xr-xtests/mv/trailing-slash4
-rwxr-xr-xtests/mv/update6
-rw-r--r--[-rwxr-xr-x]tests/other-fs-tmpdir2
-rw-r--r--tests/readlink/Makefile.am7
-rwxr-xr-xtests/readlink/can-e4
-rwxr-xr-xtests/readlink/can-f4
-rwxr-xr-xtests/readlink/can-m4
-rwxr-xr-xtests/readlink/rl-14
-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
-rw-r--r--tests/rmdir/Makefile.am7
-rwxr-xr-xtests/rmdir/fail-perm4
-rwxr-xr-xtests/rmdir/ignore2
-rwxr-xr-xtests/rmdir/t-slash4
-rwxr-xr-xtests/rwx-to-mode47
-rw-r--r--[-rwxr-xr-x]tests/sort-time/rand-gen0
-rw-r--r--tests/tail-2/Makefile.am27
-rwxr-xr-xtests/tail-2/append-only4
-rwxr-xr-xtests/tail-2/assert2
-rwxr-xr-xtests/tail-2/assert-22
-rwxr-xr-xtests/tail-2/big-4gb6
-rwxr-xr-xtests/tail-2/infloop-14
-rwxr-xr-xtests/tail-2/proc-ksyms4
-rwxr-xr-xtests/tail-2/start-middle4
-rwxr-xr-xtests/tail-2/tail-n0f4
-rw-r--r--tests/test-lib.sh35
-rwxr-xr-xtests/touch/dangling-symlink2
-rwxr-xr-xtests/touch/dir-12
-rwxr-xr-xtests/touch/empty-file2
-rwxr-xr-xtests/touch/fail-diag6
-rwxr-xr-xtests/touch/fifo2
-rwxr-xr-xtests/touch/no-create-missing4
-rwxr-xr-xtests/touch/no-rights2
-rwxr-xr-xtests/touch/not-owner4
-rwxr-xr-xtests/touch/now-owned-by-other4
-rwxr-xr-xtests/touch/obsolescent4
-rwxr-xr-xtests/touch/read-only4
-rwxr-xr-xtests/touch/relative4
342 files changed, 1096 insertions, 1123 deletions
diff --git a/configure.ac b/configure.ac
index 36fc0cf5c..4cd0d7c84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -343,31 +343,14 @@ AC_CONFIG_FILES(
src/Makefile
tests/Makefile
gnulib-tests/Makefile
- tests/chgrp/Makefile
- tests/chmod/Makefile
- tests/chown/Makefile
- tests/cp/Makefile
tests/cut/Makefile
- tests/dd/Makefile
- tests/du/Makefile
tests/head/Makefile
- tests/install/Makefile
tests/join/Makefile
- tests/ln/Makefile
- tests/ls/Makefile
- tests/misc/Makefile
- tests/mkdir/Makefile
- tests/mv/Makefile
tests/pr/Makefile
- tests/readlink/Makefile
- tests/rm/Makefile
- tests/rmdir/Makefile
tests/sort/Makefile
tests/tac/Makefile
- tests/tail-2/Makefile
tests/tail/Makefile
tests/test/Makefile
- tests/touch/Makefile
tests/tr/Makefile
tests/uniq/Makefile
tests/wc/Makefile
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c74c0a183..8893f74bb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,28 +19,15 @@ EXTRA_DIST = \
mk-script \
other-fs-tmpdir \
require-perl \
- rwx-to-mode \
sample-test \
setgid-check \
sparse-file \
test-lib.sh \
umask-check
-# Regarding ordering in SUBDIRS, place early in the list the tools that
-# are most commonly used in test scripts. Every test script uses rm
-# and chmod, so they have to be very early.
-# Ordering within misc/ should handle the rest.
-
## N O T E :: Please do not add new tests/ directories.
## There are too many already. Put new tests in misc/.
-SUBDIRS = \
- rm \
- chmod \
- misc \
- chgrp chown cp cut dd du head \
- install join ln ls mkdir mv pr readlink rmdir \
- sort tac tail tail-2 test touch tr \
- uniq wc
+SUBDIRS = cut head join pr sort tac tail test tr uniq wc
## N O T E :: Please do not add new directories.
all_t = t1 t2 t3 t4 t5 t6 t7 t8 t9 ta tb tc td
@@ -48,31 +35,31 @@ all_t = t1 t2 t3 t4 t5 t6 t7 t8 t9 ta tb tc td
check-root: $(all_t)
t1:
- cd chown && $(MAKE) check TESTS=basic
+ $(MAKE) check TESTS=chown/basic
t2:
- cd cp && $(MAKE) check TESTS=special-bits
+ $(MAKE) check TESTS=cp/special-bits
t3:
- cd rm && $(MAKE) check TESTS=no-give-up
+ $(MAKE) check TESTS=rm/no-give-up
t4:
- cd rm && $(MAKE) check TESTS=fail-2eperm
+ $(MAKE) check TESTS=rm/fail-2eperm
t5:
- cd tail-2 && $(MAKE) check TESTS=append-only
+ $(MAKE) check TESTS=tail-2/append-only
t6:
- cd rm && $(MAKE) check TESTS=one-file-system
+ $(MAKE) check TESTS=rm/one-file-system
t7:
- cd ls && $(MAKE) check TESTS=nameless-uid
+ $(MAKE) check TESTS=ls/nameless-uid
t8:
- cd misc && $(MAKE) check TESTS=chcon
+ $(MAKE) check TESTS=misc/chcon
t9:
- cd cp && $(MAKE) check TESTS=cp-a-selinux
+ $(MAKE) check TESTS=cp/cp-a-selinux
ta:
- cd mkdir && $(MAKE) check TESTS=writable-under-readonly
+ $(MAKE) check TESTS=mkdir/writable-under-readonly
tb:
- cd mv && $(MAKE) check TESTS=sticky-to-xpart
+ $(MAKE) check TESTS=mv/sticky-to-xpart
tc:
- cd cp && $(MAKE) check TESTS=preserve-gid
+ $(MAKE) check TESTS=cp/preserve-gid
td:
- cd touch && $(MAKE) check TESTS=now-owned-by-other
+ $(MAKE) check TESTS=touch/now-owned-by-other
check-recursive: root-hint
@@ -83,3 +70,344 @@ root-hint:
@echo "NOTICE: Some tests may be run only as root."
@echo " Do \`make check-root' as \`root' to run these tests."
@echo '***********************************************************'
+
+EXTRA_DIST += $(TESTS)
+
+# Do not choose a name that is a shell keyword like 'if', or a
+# commonly-used utility like 'cat' or 'test', as the name of a test.
+# Otherwise, VPATH builds will fail on hosts like Solaris, since they
+# will expand 'if test ...' to 'if .../test ...', and the '.../test'
+# will execute the test script rather than the standard utility.
+
+# Regarding ordering in SUBDIRS, place early in the list the tools that
+# are most commonly used in test scripts. Every test script uses rm
+# and chmod, so they have to be very early.
+# Ordering within misc/ should handle the rest.
+
+# Ordering:
+# help-version comes early because it's a basic sanity test.
+# Put seq early, since lots of other tests use it.
+# Put head-elide-tail early, because it's long-running.
+
+TESTS = \
+ misc/help-version \
+ chgrp/basic \
+ rm/cycle \
+ rm/dangling-symlink \
+ rm/deep-1 \
+ rm/deep-2 \
+ rm/dir-no-w \
+ rm/dir-nonrecur \
+ rm/dot-rel \
+ rm/empty-inacc \
+ rm/empty-name \
+ rm/f-1 \
+ rm/fail-2eperm \
+ rm/fail-eacces \
+ rm/fail-eperm \
+ rm/hash \
+ rm/i-1 \
+ rm/i-never \
+ rm/i-no-r \
+ rm/ignorable \
+ rm/inaccessible \
+ rm/interactive-always \
+ rm/interactive-once \
+ rm/ir-1 \
+ rm/isatty \
+ rm/no-give-up \
+ rm/one-file-system \
+ rm/r-1 \
+ rm/r-2 \
+ rm/r-3 \
+ rm/r-4 \
+ rm/readdir-bug \
+ rm/rm1 \
+ rm/rm2 \
+ rm/rm3 \
+ rm/rm4 \
+ rm/rm5 \
+ rm/sunos-1 \
+ rm/unread2 \
+ rm/unread3 \
+ rm/unreadable \
+ rm/v-slash \
+ chgrp/default-no-deref \
+ chgrp/deref \
+ chgrp/no-x \
+ chgrp/posix-H \
+ chgrp/recurse \
+ misc/seq \
+ misc/head-elide-tail \
+ misc/ls-time \
+ misc/ls-misc \
+ misc/date \
+ misc/ptx-overrun \
+ misc/xstrtol \
+ misc/od \
+ misc/mktemp \
+ misc/arch \
+ misc/pr \
+ misc/df-P \
+ misc/pwd-unreadable-parent \
+ misc/chcon \
+ misc/chcon-fail \
+ misc/selinux \
+ misc/cut \
+ misc/wc-files0-from \
+ misc/wc-files0 \
+ misc/cat-proc \
+ misc/base64 \
+ misc/basename \
+ misc/close-stdout \
+ misc/csplit \
+ misc/date-sec \
+ misc/dircolors \
+ misc/df \
+ misc/dirname \
+ misc/expand \
+ misc/expr \
+ misc/factor \
+ misc/false-status \
+ misc/fmt \
+ misc/fmt-long-line \
+ misc/fold \
+ misc/groups-dash \
+ misc/groups-version \
+ misc/head-c \
+ misc/head-pos \
+ misc/md5sum \
+ misc/md5sum-newline \
+ misc/mknod \
+ misc/nice \
+ misc/nl \
+ misc/nohup \
+ misc/od-N \
+ misc/od-x8 \
+ misc/paste \
+ misc/pathchk1 \
+ misc/printf \
+ misc/printf-hex \
+ misc/printf-surprise \
+ misc/pwd-long \
+ misc/readlink-fp-loop \
+ misc/runcon-no-reorder \
+ misc/sha1sum \
+ misc/sha1sum-vec \
+ misc/sha224sum \
+ misc/sha256sum \
+ misc/sha384sum \
+ misc/sha512sum \
+ misc/shred-exact \
+ misc/shred-remove \
+ misc/shuf \
+ misc/sort-compress \
+ misc/sort-merge \
+ misc/sort-rand \
+ misc/split-a \
+ misc/split-fail \
+ misc/split-l \
+ misc/stat-fmt \
+ misc/stat-printf \
+ misc/stty \
+ misc/stty-invalid \
+ misc/stty-row-col \
+ misc/sum \
+ misc/sum-sysv \
+ misc/tac-continue \
+ misc/tee \
+ misc/tee-dash \
+ misc/test-diag \
+ misc/tsort \
+ misc/tty-eof \
+ misc/unexpand \
+ chmod/c-option \
+ chmod/equal-x \
+ chmod/equals \
+ chmod/inaccessible \
+ chmod/no-x \
+ chmod/octal \
+ chmod/setgid \
+ chmod/thru-dangling \
+ chmod/umask-x \
+ chmod/usage \
+ chown/basic \
+ chown/deref \
+ chown/preserve-root \
+ chown/separator \
+ cp/abuse \
+ cp/acl \
+ cp/backup-1 \
+ cp/backup-dir \
+ cp/backup-is-src \
+ cp/cp-HL \
+ cp/cp-a-selinux \
+ cp/cp-deref \
+ cp/cp-i \
+ cp/cp-mv-backup \
+ cp/cp-parents \
+ cp/deref-slink \
+ cp/dir-rm-dest \
+ cp/dir-slash \
+ cp/dir-vs-file \
+ cp/existing-perm-race \
+ cp/fail-perm \
+ cp/file-perm-race \
+ cp/into-self \
+ cp/link \
+ cp/link-no-deref \
+ cp/link-preserve \
+ cp/no-deref-link1 \
+ cp/no-deref-link2 \
+ cp/no-deref-link3 \
+ cp/parent-perm \
+ cp/parent-perm-race \
+ cp/perm \
+ cp/preserve-2 \
+ cp/preserve-gid \
+ cp/proc-zero-len \
+ cp/r-vs-symlink \
+ cp/same-file \
+ cp/slink-2-slink \
+ cp/sparse \
+ cp/special-bits \
+ cp/special-f \
+ cp/src-base-dot \
+ cp/symlink-slash \
+ cp/thru-dangling \
+ dd/misc \
+ dd/not-rewound \
+ dd/skip-seek \
+ dd/skip-seek2 \
+ dd/unblock-sync \
+ du/2g \
+ du/8gb \
+ du/basic \
+ du/deref \
+ du/deref-args \
+ du/exclude \
+ du/fd-leak \
+ du/files0-from \
+ du/hard-link \
+ du/inacc-dest \
+ du/inacc-dir \
+ du/inaccessible-cwd \
+ du/long-from-unreadable \
+ du/long-sloop \
+ du/no-deref \
+ du/no-x \
+ du/one-file-system \
+ du/restore-wd \
+ du/slash \
+ du/slink \
+ du/trailing-slash \
+ du/two-args \
+ install/basic-1 \
+ install/create-leading \
+ install/d-slashdot \
+ install/trap \
+ ln/backup-1 \
+ ln/hard-backup \
+ ln/misc \
+ ln/sf-1 \
+ ln/target-1 \
+ ls/color-dtype-dir \
+ ls/dangle \
+ ls/dired \
+ ls/file-type \
+ ls/follow-slink \
+ ls/infloop \
+ ls/inode \
+ ls/m-option \
+ ls/nameless-uid \
+ ls/no-arg \
+ ls/proc-selinux-segfault \
+ ls/recursive \
+ ls/rt-1 \
+ ls/stat-dtype \
+ ls/stat-failed \
+ ls/stat-free-symlinks \
+ ls/stat-vs-dirent \
+ ls/symlink-slash \
+ ls/x-option \
+ mkdir/p-1 \
+ mkdir/p-2 \
+ mkdir/p-3 \
+ mkdir/p-slashdot \
+ mkdir/p-thru-slink \
+ mkdir/p-v \
+ mkdir/parents \
+ mkdir/perm \
+ mkdir/selinux \
+ mkdir/special-1 \
+ mkdir/t-slash \
+ mkdir/writable-under-readonly \
+ mv/acl \
+ mv/atomic \
+ mv/atomic2 \
+ mv/backup-dir \
+ mv/backup-is-src \
+ mv/childproof \
+ mv/diag \
+ mv/dir-file \
+ mv/dir2dir \
+ mv/dup-source \
+ mv/force \
+ mv/hard-2 \
+ mv/hard-3 \
+ mv/hard-4 \
+ mv/hard-link-1 \
+ mv/hard-verbose \
+ mv/i-1 \
+ mv/i-2 \
+ mv/i-3 \
+ mv/i-4 \
+ mv/i-5 \
+ mv/i-link-no \
+ mv/into-self \
+ mv/into-self-2 \
+ mv/into-self-3 \
+ mv/into-self-4 \
+ mv/leak-fd \
+ mv/mv-special-1 \
+ mv/no-target-dir \
+ mv/part-fail \
+ mv/part-hardlink \
+ mv/part-rename \
+ mv/part-symlink \
+ mv/partition-perm \
+ mv/perm-1 \
+ mv/reply-no \
+ mv/sticky-to-xpart \
+ mv/to-symlink \
+ mv/trailing-slash \
+ mv/update \
+ readlink/can-e \
+ readlink/can-f \
+ readlink/can-m \
+ readlink/rl-1 \
+ rmdir/fail-perm \
+ rmdir/ignore \
+ rmdir/t-slash \
+ tail-2/append-only \
+ tail-2/assert \
+ tail-2/assert-2 \
+ tail-2/big-4gb \
+ tail-2/infloop-1 \
+ tail-2/proc-ksyms \
+ tail-2/start-middle \
+ tail-2/tail-n0f \
+ touch/dangling-symlink \
+ touch/dir-1 \
+ touch/empty-file \
+ touch/fail-diag \
+ touch/fifo \
+ touch/no-create-missing \
+ touch/no-rights \
+ touch/not-owner \
+ touch/now-owned-by-other \
+ touch/obsolescent \
+ touch/read-only \
+ touch/relative
+
+include $(top_srcdir)/tests/check.mk
diff --git a/tests/check.mk b/tests/check.mk
index 3d4ff3b4c..cb4373a0b 100644
--- a/tests/check.mk
+++ b/tests/check.mk
@@ -21,7 +21,8 @@ _v = TESTS
vc_exe_in_TESTS: Makefile
@rm -f t1 t2
@if test -d $(top_srcdir)/.git && test $(srcdir) = .; then \
- sed -n '/^$(_v) = \\$$/,/[^\]$$/p' $(srcdir)/Makefile.am \
+ sed -n '/^$(_v) =[ ]*\\$$/,/[^\]$$/p' \
+ $(srcdir)/Makefile.am \
| sed 's/^ *//;/^\$$.*/d;/^$(_v) =/d' \
| tr -s '\012\\' ' ' | fmt -1 | sort -u > t1 && \
for f in `cd $(top_srcdir) && build-aux/vc-list-files $(subdir)`; do \
diff --git a/tests/chgrp/Makefile.am b/tests/chgrp/Makefile.am
deleted file mode 100644
index 3033e1b7b..000000000
--- a/tests/chgrp/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- default-no-deref \
- basic \
- deref \
- no-x \
- posix-H \
- recurse
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/chgrp/basic b/tests/chgrp/basic
index 8a795d63b..b242a2a88 100755
--- a/tests/chgrp/basic
+++ b/tests/chgrp/basic
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure chgrp is reasonable
-# Copyright (C) 2000-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -21,9 +21,9 @@ if test "$VERBOSE" = yes; then
chgrp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/chgrp/default-no-deref b/tests/chgrp/default-no-deref
index e7239d52d..e1f711d7c 100755
--- a/tests/chgrp/default-no-deref
+++ b/tests/chgrp/default-no-deref
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that chgrp -R does not dereference symlinks.
-# 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
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g2=$2
diff --git a/tests/chgrp/deref b/tests/chgrp/deref
index ebf92e470..f3453fb7a 100755
--- a/tests/chgrp/deref
+++ b/tests/chgrp/deref
@@ -1,7 +1,7 @@
#!/bin/sh
# see if chgrp can change the group of a symlink
-# Copyright (C) 2000, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004-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
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
diff --git a/tests/chgrp/no-x b/tests/chgrp/no-x
index 57900d83c..f4df292f5 100755
--- a/tests/chgrp/no-x
+++ b/tests/chgrp/no-x
@@ -2,7 +2,7 @@
# Make sure chgrp gives the right diagnostic for a readable,
# but inaccessible directory.
-# 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,9 +22,9 @@ if test "$VERBOSE" = yes; then
chgrp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
set _ $groups; shift
diff --git a/tests/chgrp/posix-H b/tests/chgrp/posix-H
index a9b41d011..88345767b 100755
--- a/tests/chgrp/posix-H
+++ b/tests/chgrp/posix-H
@@ -1,7 +1,7 @@
#!/bin/sh
# Test POSIX-mandated -H option.
-# Copyright (C) 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003-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
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
diff --git a/tests/chgrp/recurse b/tests/chgrp/recurse
index a0cacd645..4ae30f969 100755
--- a/tests/chgrp/recurse
+++ b/tests/chgrp/recurse
@@ -1,7 +1,7 @@
#!/bin/sh
# ad-hoc tests of chgrp with -R and -H or -L and symlinks
-# Copyright (C) 2000, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003-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
chgrp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
diff --git a/tests/chmod/Makefile.am b/tests/chmod/Makefile.am
deleted file mode 100644
index a0e0053a0..000000000
--- a/tests/chmod/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- thru-dangling \
- inaccessible \
- c-option \
- equal-x \
- equals \
- no-x \
- octal \
- setgid \
- umask-x \
- usage
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/chmod/c-option b/tests/chmod/c-option
index e491b75b0..838270f01 100755
--- a/tests/chmod/c-option
+++ b/tests/chmod/c-option
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that chmod's --changes (-c) option works.
-# Copyright (C) 2000, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
umask 0
file=f
diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x
index 672dab29b..6400d029a 100755
--- a/tests/chmod/equal-x
+++ b/tests/chmod/equal-x
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "chmod =x" and the like.
-# Copyright (C) 1999, 2000, 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002, 2004-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
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
file=f
touch $file || framework_failure
diff --git a/tests/chmod/equals b/tests/chmod/equals
index 47a9c52d0..7ad2793e1 100755
--- a/tests/chmod/equals
+++ b/tests/chmod/equals
@@ -3,7 +3,7 @@
# Before fileutils-4.1.2, some of them didn't.
# Also, before coreutils-5.3.1, =[ugo] sometimes didn't work.
-# Copyright (C) 2001, 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004-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
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch f || framework_failure
diff --git a/tests/chmod/inaccessible b/tests/chmod/inaccessible
index 318d4bba5..6e8744dbb 100755
--- a/tests/chmod/inaccessible
+++ b/tests/chmod/inaccessible
@@ -1,7 +1,7 @@
#!/bin/sh
# Test for the bug fixed on 2006-09-20.
-# 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
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p d/e || framework_failure
chmod 0 d/e d || framework_failure
diff --git a/tests/chmod/no-x b/tests/chmod/no-x
index 8e84ad262..7a7995a00 100755
--- a/tests/chmod/no-x
+++ b/tests/chmod/no-x
@@ -2,7 +2,7 @@
# Make sure chmod gives the right diagnostic for a readable,
# but inaccessible directory.
-# 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
chmod --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/no-x/y a/b || framework_failure
diff --git a/tests/chmod/octal b/tests/chmod/octal
index 781b904dc..32c55120c 100755
--- a/tests/chmod/octal
+++ b/tests/chmod/octal
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that chmod diagnoses a certain type of invalid mode string
-# Copyright (C) 2005-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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/chmod/setgid b/tests/chmod/setgid
index cee9ca6bb..c716e4b2a 100755
--- a/tests/chmod/setgid
+++ b/tests/chmod/setgid
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
umask 0
mkdir d || framework_failure
diff --git a/tests/chmod/thru-dangling b/tests/chmod/thru-dangling
index 9423a7401..0924b4779 100755
--- a/tests/chmod/thru-dangling
+++ b/tests/chmod/thru-dangling
@@ -1,7 +1,7 @@
#!/bin/sh
# Test for proper error and exit code of chmod on a dangling symlink.
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s non-existent dangle || framework_failure
diff --git a/tests/chmod/umask-x b/tests/chmod/umask-x
index c7b139b88..9f33fbfc7 100755
--- a/tests/chmod/umask-x
+++ b/tests/chmod/umask-x
@@ -1,7 +1,7 @@
#!/bin/sh
# Test that chmod -x file reports an error if the result is executable.
-# 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
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
touch file
diff --git a/tests/chmod/usage b/tests/chmod/usage
index 8e45edc69..8a641b87f 100755
--- a/tests/chmod/usage
+++ b/tests/chmod/usage
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that chmod works correctly with odd option combinations.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-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
chmod --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/chown/Makefile.am b/tests/chown/Makefile.am
deleted file mode 100644
index c154279e2..000000000
--- a/tests/chown/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- preserve-root \
- basic \
- deref \
- separator
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/chown/basic b/tests/chown/basic
index e7e3f02b4..3ad958a95 100755
--- a/tests/chown/basic
+++ b/tests/chown/basic
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure chown --from=... works
-# Copyright (C) 2001, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004-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
chgrp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
touch f || framework_failure
diff --git a/tests/chown/deref b/tests/chown/deref
index 74684fe6a..be557e1ce 100755
--- a/tests/chown/deref
+++ b/tests/chown/deref
@@ -2,7 +2,7 @@
# For coreutils-5.2.1 and earlier, chown --dereference would skip
# symlinks having owner/group matching the specified owner/group.
-# 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,8 +22,8 @@ if test "$VERBOSE" = yes; then
chown --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
ln -s no-such dangle || framework_failure
diff --git a/tests/chown/preserve-root b/tests/chown/preserve-root
index e41847291..cdc7234b5 100755
--- a/tests/chown/preserve-root
+++ b/tests/chown/preserve-root
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that --preserve-root works.
-# 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
chown --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir d && ln -s / d/slink-to-root
diff --git a/tests/chown/separator b/tests/chown/separator
index de33831a9..b409b0295 100755
--- a/tests/chown/separator
+++ b/tests/chown/separator
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure "chown USER:GROUP FILE" works, and similar tests with separators.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-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
chown --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
id_u=`id -u` || framework_failure
test -n "$id_u" || framework_failure
diff --git a/tests/cp/Makefile.am b/tests/cp/Makefile.am
deleted file mode 100644
index 28ebd35a6..000000000
--- a/tests/cp/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-# Make coreutils tests for cp. -*-Makefile-*-
-
-# Copyright (C) 1997-2001, 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
-# 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 = \
- special-f \
- parent-perm \
- abuse \
- proc-zero-len \
- thru-dangling \
- cp-a-selinux \
- file-perm-race parent-perm-race \
- existing-perm-race \
- backup-dir \
- src-base-dot \
- sparse \
- link-no-deref \
- cp-deref \
- acl \
- preserve-2 r-vs-symlink link-preserve preserve-gid \
- backup-1 no-deref-link1 no-deref-link2 no-deref-link3 backup-is-src \
- same-file cp-mv-backup symlink-slash slink-2-slink fail-perm dir-slash \
- perm cp-HL cp-i special-bits link dir-rm-dest cp-parents deref-slink \
- dir-vs-file into-self
-EXTRA_DIST = $(TESTS) trailing-slash
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/cp/abuse b/tests/cp/abuse
index 04b10f7f6..f4f215f42 100755
--- a/tests/cp/abuse
+++ b/tests/cp/abuse
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that cp does not write through a just-copied symlink
-# 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,9 +21,9 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a b c || framework_failure
ln -s ../t a/1 || framework_failure
diff --git a/tests/cp/acl b/tests/cp/acl
index a7f6a844f..bfea3bfd3 100755
--- a/tests/cp/acl
+++ b/tests/cp/acl
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure we get English translations.
-. $srcdir/../lang-default
+. $top_srcdir/tests/lang-default
if test "$VERBOSE" = yes; then
set -x
@@ -27,7 +27,7 @@ if test "$VERBOSE" = yes; then
setfacl --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_acl_
# Skip this test if cp was built without ACL support:
diff --git a/tests/cp/backup-1 b/tests/cp/backup-1
index 882167931..6f2ca2eae 100755
--- a/tests/cp/backup-1
+++ b/tests/cp/backup-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test cp backup.
-# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
suffix=.b
file=b1.$$
diff --git a/tests/cp/backup-dir b/tests/cp/backup-dir
index 879c5164e..d2ac2be39 100755
--- a/tests/cp/backup-dir
+++ b/tests/cp/backup-dir
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that cp -b doesn't back up directories.
-# 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
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir x y || framework_failure
diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src
index 7721be9c5..e55ede1be 100755
--- a/tests/cp/backup-is-src
+++ b/tests/cp/backup-is-src
@@ -1,7 +1,7 @@
#!/bin/sh
# Test cp backup to source file.
-# Copyright (C) 1998-2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2000, 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
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
echo a > a || framework_failure
echo a-tilde > a~ || framework_failure
diff --git a/tests/cp/cp-HL b/tests/cp/cp-HL
index 6040cc94c..dbfaed1ef 100755
--- a/tests/cp/cp-HL
+++ b/tests/cp/cp-HL
@@ -1,7 +1,7 @@
#!/bin/sh
# test cp's -H and -L options
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir src-dir dest-dir || framework_failure
echo f > f || framework_failure
diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux
index 67894571c..8f854bd0c 100755
--- a/tests/cp/cp-a-selinux
+++ b/tests/cp/cp-a-selinux
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
require_selinux_
diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref
index a666f5d6d..181ba4722 100755
--- a/tests/cp/cp-deref
+++ b/tests/cp/cp-deref
@@ -2,7 +2,7 @@
# cp -RL dir1 dir2' must handle the case in which each of dir1 and dir2
# contain a symlink pointing to some third 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir a b c d || framework_failure
ln -s ../c a || framework_failure
diff --git a/tests/cp/cp-i b/tests/cp/cp-i
index e7cd438aa..5aa690d86 100755
--- a/tests/cp/cp-i
+++ b/tests/cp/cp-i
@@ -1,7 +1,7 @@
#!/bin/sh
# Test whether cp -i prompts in the right place.
-# 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
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p a b/a/c || framework_failure
touch a/c || framework_failure
diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup
index 9a464a16d..41bc50b2f 100755
--- a/tests/cp/cp-mv-backup
+++ b/tests/cp/cp-mv-backup
@@ -1,7 +1,7 @@
#!/bin/sh
# Test basic --backup functionality for both cp and mv.
-# Copyright (C) 1999, 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 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
@@ -22,9 +22,9 @@ if test "$VERBOSE" = yes; then
fi
# Ensure that ls sorts the same way for everyone.
-. $srcdir/../lang-default
+. $top_srcdir/tests/lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
umask 022
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index 4500e5f48..fe62f2b15 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -2,7 +2,7 @@
# cp -R --parents dir-specified-with-trailing-slash/ other-dir
# would get a failed assertion.
-# Copyright (C) 2000, 2002, 2004, 2005, 2006-2007 Free Software
+# Copyright (C) 2000, 2002, 2004, 2005, 2006-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../umask-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/umask-check
+. $top_srcdir/tests/test-lib.sh
# Run the setgid check from the just-created directory.
. "$abs_top_srcdir/tests/setgid-check"
diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink
index d677d4161..dfd287161 100755
--- a/tests/cp/deref-slink
+++ b/tests/cp/deref-slink
@@ -2,7 +2,7 @@
# Demonstrate bug when using -d with an existing destination file
# that is a symlink.
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch f slink-target || framework_failure
ln -s slink-target slink || framework_failure
diff --git a/tests/cp/dir-rm-dest b/tests/cp/dir-rm-dest
index 45212c748..e9934c339 100755
--- a/tests/cp/dir-rm-dest
+++ b/tests/cp/dir-rm-dest
@@ -1,7 +1,7 @@
#!/bin/sh
# verify that cp's --remove-destination option works with -R
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir d e || framework_failure
diff --git a/tests/cp/dir-slash b/tests/cp/dir-slash
index 6a6a613a3..3521a1a70 100755
--- a/tests/cp/dir-slash
+++ b/tests/cp/dir-slash
@@ -2,7 +2,7 @@
# Make sure that cp -R DIR1 DIR2 does the right thing
# when DIR1 is written with a trailing slash.
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir1 dir2 || framework_failure
touch dir1/file || framework_failure
diff --git a/tests/cp/dir-vs-file b/tests/cp/dir-vs-file
index 58cdf5eab..cb23172cb 100755
--- a/tests/cp/dir-vs-file
+++ b/tests/cp/dir-vs-file
@@ -1,7 +1,7 @@
#!/bin/sh
# A directory may not replace an existing file.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
touch file || framework_failure
diff --git a/tests/cp/existing-perm-race b/tests/cp/existing-perm-race
index 0ab10e94d..aa6d7c99a 100755
--- a/tests/cp/existing-perm-race
+++ b/tests/cp/existing-perm-race
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure cp -p isn't too generous with existing file permissions.
-# 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
cp --version
fi
-. $srcdir/../group-names
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/group-names
+. $top_srcdir/tests/test-lib.sh
set _ $groups; shift
g1=$1
diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm
index b52aba5f8..b5d14d62f 100755
--- a/tests/cp/fail-perm
+++ b/tests/cp/fail-perm
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2000, 2002-2007 Free Software
+# Copyright (C) 2000, 2002-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
chmod g-s . || framework_failure
diff --git a/tests/cp/file-perm-race b/tests/cp/file-perm-race
index 3e3859773..09d38a734 100755
--- a/tests/cp/file-perm-race
+++ b/tests/cp/file-perm-race
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure cp -p isn't too generous with file permissions.
-# 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
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
umask 022
mkfifo fifo ||
diff --git a/tests/cp/into-self b/tests/cp/into-self
index 7afe2a5bc..7660454a7 100755
--- a/tests/cp/into-self
+++ b/tests/cp/into-self
@@ -1,7 +1,7 @@
#!/bin/sh
# Confirm that copying a directory into itself gets a proper diagnostic.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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,8 +26,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
diff --git a/tests/cp/link b/tests/cp/link
index 26fabfda7..49cedebc4 100755
--- a/tests/cp/link
+++ b/tests/cp/link
@@ -2,7 +2,7 @@
# Make sure cp --link -f works when the target exists.
# This failed for 4.0z (due to a bug introduced in that test release).
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch src || framework_failure
touch dest || framework_failure
diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref
index 2e955a559..d249b03d8 100755
--- a/tests/cp/link-no-deref
+++ b/tests/cp/link-no-deref
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that cp --link --no-dereference works properly
-# 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
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s no-such-file dangling-slink || framework_failure
diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve
index 137bb901e..091c0a504 100755
--- a/tests/cp/link-preserve
+++ b/tests/cp/link-preserve
@@ -2,7 +2,7 @@
# ensure that `cp -d' preserves hard-links between command line arguments
# ensure that --preserve=links works with -RH and -RL
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch a || framework_failure
ln a b || framework_failure
diff --git a/tests/cp/no-deref-link1 b/tests/cp/no-deref-link1
index a194303c9..018a029fd 100755
--- a/tests/cp/no-deref-link1
+++ b/tests/cp/no-deref-link1
@@ -1,7 +1,7 @@
#!/bin/sh
# cp from 3.16 fails this test
-# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir a b
msg=bar
diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2
index e3ad0aab2..0046dce4a 100755
--- a/tests/cp/no-deref-link2
+++ b/tests/cp/no-deref-link2
@@ -1,7 +1,7 @@
#!/bin/sh
# cp from 3.16 fails this test
-# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir b
msg=bar
diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3
index 13841adb0..5d0ba7538 100755
--- a/tests/cp/no-deref-link3
+++ b/tests/cp/no-deref-link3
@@ -1,7 +1,7 @@
#!/bin/sh
# cp from 3.16 fails this test
-# Copyright (C) 1997, 1999, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
msg=bar
echo $msg > a
diff --git a/tests/cp/parent-perm b/tests/cp/parent-perm
index 1e9e8e1ea..bca0f8769 100755
--- a/tests/cp/parent-perm
+++ b/tests/cp/parent-perm
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/test-lib.sh
. $abs_srcdir/../umask-check
diff --git a/tests/cp/parent-perm-race b/tests/cp/parent-perm-race
index 8afa0c0b7..de542e00d 100755
--- a/tests/cp/parent-perm-race
+++ b/tests/cp/parent-perm-race
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure cp -pR --parents isn't too generous with parent permissions.
-# 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
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
umask 002
mkdir mode ownership d || framework_failure
diff --git a/tests/cp/perm b/tests/cp/perm
index a31d430e0..b24221f03 100755
--- a/tests/cp/perm
+++ b/tests/cp/perm
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure the permission-preserving code in copy.c (mv, cp, install) works.
-# Copyright (C) 2000, 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004-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
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
very_expensive_
umask 037
diff --git a/tests/cp/preserve-2 b/tests/cp/preserve-2
index 36a561cde..0bbe3390c 100755
--- a/tests/cp/preserve-2
+++ b/tests/cp/preserve-2
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that cp's --preserve=X,Y option is parsed properly
-# Copyright (C) 2002, 2006-2007 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch f || framework_failure
diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid
index d78582942..ce08a60ac 100755
--- a/tests/cp/preserve-gid
+++ b/tests/cp/preserve-gid
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that cp -p preserves GID when it is possible.
-# Copyright (C) 2007, 2008 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
@@ -16,8 +16,8 @@
# 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/../lang-default"
-. "$srcdir/../test-lib.sh"
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
create() {
diff --git a/tests/cp/proc-zero-len b/tests/cp/proc-zero-len
index 8330bfd28..aef5e5a62 100755
--- a/tests/cp/proc-zero-len
+++ b/tests/cp/proc-zero-len
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that cp copies contents of non-empty "regular" file with st_size==0
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch empty || framework_failure
diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink
index 579c49576..6ee237037 100755
--- a/tests/cp/r-vs-symlink
+++ b/tests/cp/r-vs-symlink
@@ -1,7 +1,7 @@
#!/bin/sh
# cp -r should not create symlinks. Fixed in fileutils-4.1.5.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -25,7 +25,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
echo abc > foo || framework_failure
ln -s foo slink || framework_failure
diff --git a/tests/cp/same-file b/tests/cp/same-file
index 908573ad3..1058b568d 100755
--- a/tests/cp/same-file
+++ b/tests/cp/same-file
@@ -2,7 +2,7 @@
# Test some of cp's options and how cp handles situations in
# which a naive implementation might overwrite the source file.
-# Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006-2007 Free Software
+# Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# Unset CDPATH. Otherwise, output from the `cd dir' command
# can make this test fail.
diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink
index f6cc6e987..633b27eea 100755
--- a/tests/cp/slink-2-slink
+++ b/tests/cp/slink-2-slink
@@ -2,7 +2,7 @@
# `test cp --update A B' where A and B are both symlinks that point
# to the same file
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch file || framework_failure
ln -s file a || framework_failure
diff --git a/tests/cp/sparse b/tests/cp/sparse
index 3238aa9cf..dfb348db3 100755
--- a/tests/cp/sparse
+++ b/tests/cp/sparse
@@ -1,7 +1,7 @@
#!/bin/sh
# Test cp --sparse=always
-# 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
cp --version
fi
-. $srcdir/../sparse-file
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/sparse-file
+. $top_srcdir/tests/test-lib.sh
# Create a sparse file.
# It has to be at least 128K in order to be sparse on some systems.
diff --git a/tests/cp/special-bits b/tests/cp/special-bits
index be090fe2a..e0f8bbb0d 100755
--- a/tests/cp/special-bits
+++ b/tests/cp/special-bits
@@ -2,7 +2,7 @@
# make sure `cp -p' preserves special bits
# This works only when run as root.
-# Copyright (C) 2000-2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000-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
@@ -25,7 +25,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_root_
touch a b c || framework_failure
diff --git a/tests/cp/special-f b/tests/cp/special-f
index ebcbf8ea3..cf684e362 100755
--- a/tests/cp/special-f
+++ b/tests/cp/special-f
@@ -22,9 +22,9 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkfifo fifo ||
skip_test_ "fifos not supported"
diff --git a/tests/cp/src-base-dot b/tests/cp/src-base-dot
index 274a66429..a20268be0 100755
--- a/tests/cp/src-base-dot
+++ b/tests/cp/src-base-dot
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that "mkdir x y; cd y; cp -ab ../x/. ." is a successful, silent, no-op.
-# 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
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir x y || framework_failure
diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash
index 3c13fe95d..1ace67bc6 100755
--- a/tests/cp/symlink-slash
+++ b/tests/cp/symlink-slash
@@ -2,7 +2,7 @@
# Make sure that cp -dR dereferences a symlink arg if its name is
# written with a trailing slash.
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
ln -s dir symlink || framework_failure
diff --git a/tests/cp/thru-dangling b/tests/cp/thru-dangling
index 0256a167c..aa494c597 100755
--- a/tests/cp/thru-dangling
+++ b/tests/cp/thru-dangling
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that cp works as documented, when the destination is a dangling symlink
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s no-such dangle || framework_failure
echo hi > f || framework_failure
diff --git a/tests/dd/Makefile.am b/tests/dd/Makefile.am
deleted file mode 100644
index afc17e83f..000000000
--- a/tests/dd/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-
-EXTRA_DIST = $(TESTS)
-
-TESTS = \
- misc not-rewound skip-seek skip-seek2 unblock-sync
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/dd/misc b/tests/dd/misc
index 2b54cfb36..e734ba240 100755
--- a/tests/dd/misc
+++ b/tests/dd/misc
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
dd --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
tmp_in=dd-in.$$
tmp_in2=dd-in2.$$
diff --git a/tests/dd/not-rewound b/tests/dd/not-rewound
index 9b1632613..76eb8a393 100755
--- a/tests/dd/not-rewound
+++ b/tests/dd/not-rewound
@@ -2,7 +2,7 @@
# Make sure dd does the right thing when the input file descriptor
# is not rewound.
-# Copyright (C) 2000, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
dd --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/dd/skip-seek b/tests/dd/skip-seek
index 631fb4220..80795d871 100755
--- a/tests/dd/skip-seek
+++ b/tests/dd/skip-seek
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
SCRIPT_NAME=$0
export SCRIPT_NAME
diff --git a/tests/dd/skip-seek2 b/tests/dd/skip-seek2
index b1024af15..0840ad24a 100755
--- a/tests/dd/skip-seek2
+++ b/tests/dd/skip-seek2
@@ -2,7 +2,7 @@
# show how to skip an amount that is smaller than the nominal block size.
# There's a more realistic example in the documentation.
-# Copyright (C) 2000, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
dd --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/dd/unblock-sync b/tests/dd/unblock-sync
index 7fc5eb568..484da885d 100755
--- a/tests/dd/unblock-sync
+++ b/tests/dd/unblock-sync
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that dd conv=unblock,sync works.
-# Copyright (C) 2003, 2005-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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
dd --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
printf 000100020003xx > in || framework_failure
diff --git a/tests/du/2g b/tests/du/2g
index fa20ce983..8479524c0 100755
--- a/tests/du/2g
+++ b/tests/du/2g
@@ -3,7 +3,7 @@
# Before coreutils-5.93, on systems with a signed, 32-bit stat.st_blocks
# one of du's computations would overflow.
-# Copyright (C) 2005-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
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Creating a 2GB file counts as `very expensive'.
very_expensive_
diff --git a/tests/du/8gb b/tests/du/8gb
index ab6dedde4..b0a42c4ad 100755
--- a/tests/du/8gb
+++ b/tests/du/8gb
@@ -2,7 +2,7 @@
# Ensure that du does not rely on narrow types like size_t for
# file sizes or sums.
-# Copyright (C) 2003, 2005-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
du --version
fi
-. $srcdir/../sparse-file
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/sparse-file
+. $top_srcdir/tests/test-lib.sh
dd bs=1 seek=8G of=big < /dev/null 2> /dev/null
if test $? != 0; then
diff --git a/tests/du/Makefile.am b/tests/du/Makefile.am
deleted file mode 100644
index 9fd6f9df7..000000000
--- a/tests/du/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-# Make coreutils tests for "du". -*-Makefile-*-
-
-# Copyright (C) 2000, 2002-2007 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 = \
- 2g \
- inacc-dir \
- one-file-system \
- inacc-dest \
- long-from-unreadable \
- long-sloop \
- files0-from \
- inaccessible-cwd \
- deref-args \
- slash \
- fd-leak \
- hard-link 8gb basic restore-wd \
- exclude no-x no-deref trailing-slash deref two-args slink
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/du/basic b/tests/du/basic
index b7bfa3a58..f2eeccf5b 100755
--- a/tests/du/basic
+++ b/tests/du/basic
@@ -1,7 +1,7 @@
#!/bin/sh
# Compare actual numbers from du, assuming block size matches mine.
-# 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
fi
# DU_BLOCK_SIZE could cause problems
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p a/b d d/sub || framework_failure
diff --git a/tests/du/deref b/tests/du/deref
index 63cd606b2..47f444921 100755
--- a/tests/du/deref
+++ b/tests/du/deref
@@ -2,7 +2,7 @@
# prior to coreutils-4.5.3, du -D didn't work in some cases
# Based on an example from Andreas Schwab and/or Michal Svec.
-# Copyright (C) 2002, 2006-2007 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p a/sub || framework_failure
ln -s a/sub slink || framework_failure
diff --git a/tests/du/deref-args b/tests/du/deref-args
index 441b21dd7..c0281d5a5 100755
--- a/tests/du/deref-args
+++ b/tests/du/deref-args
@@ -2,7 +2,7 @@
# Ensure that --dereference-args (-D) gives reasonable names.
# This test would fail for coreutils-5.0.91.
-# Copyright (C) 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003-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
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/a || framework_failure
ln -s dir slink || framework_failure
diff --git a/tests/du/exclude b/tests/du/exclude
index 7e4805157..73a0c5bde 100755
--- a/tests/du/exclude
+++ b/tests/du/exclude
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure du's --exclude option works
-# Copyright (C) 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003-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
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p a/b/c a/x/y a/u/v || framework_failure
diff --git a/tests/du/fd-leak b/tests/du/fd-leak
index bc2ea81bf..c4080ffaf 100755
--- a/tests/du/fd-leak
+++ b/tests/du/fd-leak
@@ -1,7 +1,7 @@
#!/bin/sh
# check for file descriptor leak
-# 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
@@ -23,8 +23,8 @@ fi
# Call this an expensive test. It's not that expensive, but command line
# limitations might induce failure on some losing systems.
-. $srcdir/../expensive
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/expensive
+. $top_srcdir/tests/test-lib.sh
# Create 1296 (36^2) files.
# Their names and separating spaces take up 3887 bytes.
diff --git a/tests/du/files0-from b/tests/du/files0-from
index 4d9b37cb3..583311685 100755
--- a/tests/du/files0-from
+++ b/tests/du/files0-from
@@ -2,7 +2,7 @@
# -*- perl -*-
# Exercise du's --files0-from option.
-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 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
@@ -18,7 +18,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/du/hard-link b/tests/du/hard-link
index 139bae2ec..94fe9c48c 100755
--- a/tests/du/hard-link
+++ b/tests/du/hard-link
@@ -3,7 +3,7 @@
# Likewise for excluded directories.
# Ensure that hard links _are_ listed twice when using --count-links.
-# 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
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/sub
( cd dir && { echo non-empty > f1; ln f1 f2; echo non-empty > sub/F; } )
diff --git a/tests/du/inacc-dest b/tests/du/inacc-dest
index c2bab2cf9..ba5aed0ad 100755
--- a/tests/du/inacc-dest
+++ b/tests/du/inacc-dest
@@ -2,7 +2,7 @@
# Prior to coreutils-6.5, an inaccessible destination dir (chmod a-x)
# would cause du to exit prematurely on systems with native openat support.
-# 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir f && cd f && mkdir a b c d e && touch c/j && chmod a-x c \
diff --git a/tests/du/inacc-dir b/tests/du/inacc-dir
index f7d553aca..919406a07 100755
--- a/tests/du/inacc-dir
+++ b/tests/du/inacc-dir
@@ -1,6 +1,6 @@
#!/bin/sh
# Ensure that du counts the size of an inaccessible directory.
-# 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
@@ -20,7 +20,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p a/sub || framework_failure
diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd
index 8eb6693e7..f6af78600 100755
--- a/tests/du/inaccessible-cwd
+++ b/tests/du/inaccessible-cwd
@@ -2,7 +2,7 @@
# Ensure that even when run from an inaccessible directory, du can still
# operate on accessible directories elsewhere.
-# 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
@@ -25,7 +25,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
cwd=`pwd`
diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable
index cdc81dc3f..1e20bb324 100755
--- a/tests/du/long-from-unreadable
+++ b/tests/du/long-from-unreadable
@@ -1,7 +1,7 @@
#!/bin/sh
# Show fts fails on old-fashioned systems.
-# 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
@@ -33,7 +33,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
proc_file=/proc/self/fd
if test ! -d $proc_file; then
diff --git a/tests/du/long-sloop b/tests/du/long-sloop
index 603f1f07f..a9692241c 100755
--- a/tests/du/long-sloop
+++ b/tests/du/long-sloop
@@ -3,7 +3,7 @@
# Show that du fails with ELOOP (Too many levels of symbolic links)
# when it encounters that condition.
-# 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
du --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# Create lots of directories, each containing a single symlink
# pointing at the next directory in the list.
diff --git a/tests/du/no-deref b/tests/du/no-deref
index cd76b557f..e1b714036 100755
--- a/tests/du/no-deref
+++ b/tests/du/no-deref
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that by default, du doesn't dereference command-line symlinks.
-# Copyright (C) 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/a/b || framework_failure
ln -s dir slink || framework_failure
diff --git a/tests/du/no-x b/tests/du/no-x
index 5f888ed51..9cff767b0 100755
--- a/tests/du/no-x
+++ b/tests/du/no-x
@@ -2,7 +2,7 @@
# Make sure du gives the right diagnostic for a readable,
# but inaccessible directory.
-# 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
du --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/no-x/y || framework_failure
diff --git a/tests/du/one-file-system b/tests/du/one-file-system
index 244887152..fd2695631 100755
--- a/tests/du/one-file-system
+++ b/tests/du/one-file-system
@@ -2,7 +2,7 @@
# Test for a bug in fts's handling of FTS_XDEV, the flag behind
# du's --one-file-system (-x) 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p b/c y/z || framework_failure
diff --git a/tests/du/restore-wd b/tests/du/restore-wd
index e868bf85c..62409db57 100755
--- a/tests/du/restore-wd
+++ b/tests/du/restore-wd
@@ -2,7 +2,7 @@
# due to a bug in glibc's ftw.c, in some cases, nftw w/FTW_CHDIR
# would not restore the working directory.
-# 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,7 +22,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir a b || framework_failure
diff --git a/tests/du/slash b/tests/du/slash
index 7f218c928..a939b91b6 100755
--- a/tests/du/slash
+++ b/tests/du/slash
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_readable_root_
fail=0
diff --git a/tests/du/slink b/tests/du/slink
index be5a63df5..082efddf7 100755
--- a/tests/du/slink
+++ b/tests/du/slink
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that the size of a long-named-symlink is > 0.
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Determine if `.' is on a local (would non-NFS be sufficient?) file system.
# On at least some NFS implementations, symlinks never take up space,
diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash
index 80ce5ba8d..a3f853682 100755
--- a/tests/du/trailing-slash
+++ b/tests/du/trailing-slash
@@ -2,7 +2,7 @@
# Ensure that du works properly for an argument that refers to a
# symbolic link, and that is specified with a trailing slash.
-# 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
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/1/2 || framework_failure
ln -s dir slink || framework_failure
diff --git a/tests/du/two-args b/tests/du/two-args
index 9d9330e95..5cb875ff0 100755
--- a/tests/du/two-args
+++ b/tests/du/two-args
@@ -2,7 +2,7 @@
# Make sure `du d/1 d/2' works.
# That command failed with du from fileutils-4.0q.
-# Copyright (C) 2000, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004-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
du --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Run this test from a sub-directory one level deeper than normal,
# so that the "du .." below doesn't traverse sibling directories
diff --git a/tests/install/Makefile.am b/tests/install/Makefile.am
deleted file mode 100644
index 0ff078485..000000000
--- a/tests/install/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- basic-1 \
- create-leading \
- d-slashdot \
- trap
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/install/basic-1 b/tests/install/basic-1
index ca24a9d22..26ac5ddfb 100755
--- a/tests/install/basic-1
+++ b/tests/install/basic-1
@@ -1,7 +1,7 @@
#! /bin/sh
# Basic tests for "install".
-# Copyright (C) 1998, 2000-2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000-2002, 2004-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
ginstall --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
dir=dir
diff --git a/tests/install/create-leading b/tests/install/create-leading
index 66c3995b5..699993863 100755
--- a/tests/install/create-leading
+++ b/tests/install/create-leading
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
ginstall --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/install/d-slashdot b/tests/install/d-slashdot
index eb2a9146c..e7bf8ea77 100755
--- a/tests/install/d-slashdot
+++ b/tests/install/d-slashdot
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that ginstall -d works with arguments specified with a trailing "/.".
-# Copyright (C) 2005-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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
install --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/install/trap b/tests/install/trap
index a4f9fa868..915ad9ea2 100755
--- a/tests/install/trap
+++ b/tests/install/trap
@@ -2,7 +2,7 @@
# Ensure that `install -s' doesn't infloop when its parent
# process traps CHLD signal.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-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
ginstall --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/ln/Makefile.am b/tests/ln/Makefile.am
deleted file mode 100644
index 8fe7b4725..000000000
--- a/tests/ln/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- hard-backup target-1 sf-1 misc backup-1
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/ln/backup-1 b/tests/ln/backup-1
index 05041fe21..b1d1bb105 100755
--- a/tests/ln/backup-1
+++ b/tests/ln/backup-1
@@ -2,7 +2,7 @@
# Try to create a symlink with backup where the destination file exists
# and the backup file name is a hard link to the destination file.
-# Copyright (C) 1999, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
ln --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch a b || framework_failure
diff --git a/tests/ln/hard-backup b/tests/ln/hard-backup
index 72178a6b2..d46316ff9 100755
--- a/tests/ln/hard-backup
+++ b/tests/ln/hard-backup
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that 'ln --backup F F' gives a proper 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
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
ln --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch f || framework_failure
diff --git a/tests/ln/misc b/tests/ln/misc
index be7efb036..1f3c1d16e 100755
--- a/tests/ln/misc
+++ b/tests/ln/misc
@@ -1,7 +1,7 @@
#!/bin/sh
# Miscellaneous tests for "ln".
-# Copyright (C) 1998-2000, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2000, 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
ln --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
t=tln-symlink
d=tln-subdir
diff --git a/tests/ln/sf-1 b/tests/ln/sf-1
index 4d6989382..9ac0f9873 100755
--- a/tests/ln/sf-1
+++ b/tests/ln/sf-1
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
fi
# Make sure we get English translations.
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
echo foo > a || framework_failure
ln -s . b || framework_failure
diff --git a/tests/ln/target-1 b/tests/ln/target-1
index e42094057..6a49b2f4d 100755
--- a/tests/ln/target-1
+++ b/tests/ln/target-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "ln --target-dir" with one file.
-# Copyright (C) 2002, 2006-2007 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
@@ -26,7 +26,7 @@ if test "$VERBOSE" = yes; then
ln --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir d || framework_failure
fail=0
diff --git a/tests/ls/Makefile.am b/tests/ls/Makefile.am
deleted file mode 100644
index c9739c992..000000000
--- a/tests/ls/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-# Make coreutils tests for "ls". -*-Makefile-*-
-
-# Copyright (C) 1997-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
-# 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 = \
- proc-selinux-segfault \
- stat-free-symlinks \
- nameless-uid \
- color-dtype-dir \
- stat-failed \
- stat-dtype \
- inode dangle file-type recursive dired infloop \
- rt-1 symlink-slash follow-slink no-arg m-option \
- stat-vs-dirent x-option
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/ls/color-dtype-dir b/tests/ls/color-dtype-dir
index b96970162..8a431c466 100755
--- a/tests/ls/color-dtype-dir
+++ b/tests/ls/color-dtype-dir
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Don't let a different umask perturb the results.
umask 22
diff --git a/tests/ls/dangle b/tests/ls/dangle
index bd3633fab..7266fac89 100755
--- a/tests/ls/dangle
+++ b/tests/ls/dangle
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure ls properly handles dangling symlinks vs. ls's -L, -H, options.
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s no-such-file dangle || framework_failure
mkdir -p dir/sub || framework_failure
diff --git a/tests/ls/dired b/tests/ls/dired
index 45cbdfcc7..6a1bbd28a 100755
--- a/tests/ls/dired
+++ b/tests/ls/dired
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure --dired option works
-# Copyright (C) 2001-2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-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,7 +21,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
diff --git a/tests/ls/file-type b/tests/ls/file-type
index 533bec89c..87f63c96f 100755
--- a/tests/ls/file-type
+++ b/tests/ls/file-type
@@ -1,7 +1,7 @@
#!/bin/sh
# contrast ls -F, ls -p, and ls --indicator-style=file-type
-# Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 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
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir sub
cd sub
diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink
index a7efadb17..a4374bf96 100755
--- a/tests/ls/follow-slink
+++ b/tests/ls/follow-slink
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure ls -L always follows symlinks
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Isolate output files from directory being listed
mkdir dir dir/sub dir1 || framework_failure
diff --git a/tests/ls/infloop b/tests/ls/infloop
index cc93372c7..d96efa070 100755
--- a/tests/ls/infloop
+++ b/tests/ls/infloop
@@ -2,7 +2,7 @@
# show that the following no longer makes ls infloop
# mkdir loop; cd loop; ln -s ../loop sub; ls -RL
-# Copyright (C) 2001-2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir loop || framework_failure
ln -s ../loop loop/sub || framework_failure
diff --git a/tests/ls/inode b/tests/ls/inode
index 08ee5e1f7..636c064a3 100755
--- a/tests/ls/inode
+++ b/tests/ls/inode
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure that ls -i works properly on symlinks.
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch f || framework_failure
ln -s f slink || framework_failure
diff --git a/tests/ls/m-option b/tests/ls/m-option
index db6e53393..975042280 100755
--- a/tests/ls/m-option
+++ b/tests/ls/m-option
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise the -m option
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
seq 2000 > b || framework_failure
touch a || framework_failure
diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid
index a2d3b9442..37becec26 100755
--- a/tests/ls/nameless-uid
+++ b/tests/ls/nameless-uid
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that ls -l works on files with nameless uid and/or gid
-# 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
@@ -22,10 +22,10 @@ if test "$VERBOSE" = yes; then
fi
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
nameless_uid=`$PERL -e 'foreach my $i (1000..16*1024) { getpwuid $i or (print "$i\n"), exit }'`
diff --git a/tests/ls/no-arg b/tests/ls/no-arg
index 00b4d92b8..ea0730e45 100755
--- a/tests/ls/no-arg
+++ b/tests/ls/no-arg
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure ls and `ls -R' do the right thing when invoked with no arguments.
-# Copyright (C) 2001, 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/subdir || framework_failure
touch dir/subdir/file2 || framework_failure
diff --git a/tests/ls/proc-selinux-segfault b/tests/ls/proc-selinux-segfault
index 320ba6f24..60cfe5509 100755
--- a/tests/ls/proc-selinux-segfault
+++ b/tests/ls/proc-selinux-segfault
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/test-lib.sh
f=/proc/sys
test -r $f || f=.
diff --git a/tests/ls/recursive b/tests/ls/recursive
index 8aff3ed7e..d8b159c2e 100755
--- a/tests/ls/recursive
+++ b/tests/ls/recursive
@@ -2,7 +2,7 @@
# 4.1.1 and 4.1.2 had a bug whereby some recursive listings
# didn't include a blank line between per-directory groups of files.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir x y a b c a/1 a/2 a/3 || framework_failure
touch f a/1/I a/1/II || framework_failure
diff --git a/tests/ls/rt-1 b/tests/ls/rt-1
index dce7c852d..3e3c36a0f 100755
--- a/tests/ls/rt-1
+++ b/tests/ls/rt-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure name is used as secondary key when sorting on mtime or ctime.
-# Copyright (C) 1998, 2001-2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001-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
@@ -16,7 +16,7 @@
# 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/../lang-default
+. $top_srcdir/tests/lang-default
if test "$VERBOSE" = yes; then
set -x
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
date=1998-01-15
diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype
index 5e1776e71..a6d528983 100755
--- a/tests/ls/stat-dtype
+++ b/tests/ls/stat-dtype
@@ -3,7 +3,7 @@
# Also check for the dtype-related (and fs-type dependent) bug
# in coreutils-6.0 that made ls -CF columns misaligned.
-# 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
@@ -26,7 +26,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Skip this test unless "." is on a file system with useful d_type info.
# FIXME: This uses "ls -p" to decide whether to test "ls" with other options,
diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed
index 2d6e98821..977de393e 100755
--- a/tests/ls/stat-failed
+++ b/tests/ls/stat-failed
@@ -2,7 +2,7 @@
# Verify that ls works properly when it fails to stat a file that is
# not mentioned on the command line.
-# 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir d || framework_failure
diff --git a/tests/ls/stat-free-symlinks b/tests/ls/stat-free-symlinks
index 85f363f0c..4dc01b5ed 100755
--- a/tests/ls/stat-free-symlinks
+++ b/tests/ls/stat-free-symlinks
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_strace_ stat
touch x || framework_failure
diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent
index c326bc9fa..f69ffba2d 100755
--- a/tests/ls/stat-vs-dirent
+++ b/tests/ls/stat-vs-dirent
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that d_ino (from ls -di) and st_ino (from stat --format=%i) match.
-# 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
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash
index 3d89bd42b..641826e13 100755
--- a/tests/ls/symlink-slash
+++ b/tests/ls/symlink-slash
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
ln -s dir symlink || framework_failure
diff --git a/tests/ls/x-option b/tests/ls/x-option
index 4fb27047c..2153536b3 100755
--- a/tests/ls/x-option
+++ b/tests/ls/x-option
@@ -1,7 +1,7 @@
#!/bin/sh
# Exercise the -x option.
-# 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
ls --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir subdir || framework_failure
touch subdir/b || framework_failure
diff --git a/tests/misc/arch b/tests/misc/arch
index c568b48fb..3a510b6de 100755
--- a/tests/misc/arch
+++ b/tests/misc/arch
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that arch output is equal to uname -m
-# 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
@@ -16,7 +16,7 @@
# 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/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# skip this test if arch isn't being built.
case " $built_programs " in
diff --git a/tests/misc/base64 b/tests/misc/base64
index 0428c04c5..2784a3c09 100755
--- a/tests/misc/base64
+++ b/tests/misc/base64
@@ -2,7 +2,7 @@
# -*- perl -*-
# Exercise base64.
-# 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
@@ -18,7 +18,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/misc/basename b/tests/misc/basename
index 4302e0b82..1d400b3fd 100755
--- a/tests/misc/basename
+++ b/tests/misc/basename
@@ -1,7 +1,7 @@
#!/bin/sh
# -*-perl-*-
-# 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
@@ -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/misc/cat-proc b/tests/misc/cat-proc
index 02bb26ad4..0d7b07ed5 100755
--- a/tests/misc/cat-proc
+++ b/tests/misc/cat-proc
@@ -2,7 +2,7 @@
# Ensure that cat -E produces same output as cat, module `$'s,
# even when applied to a file in /proc.
-# 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
cat --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
f=/proc/cpuinfo
diff --git a/tests/misc/chcon b/tests/misc/chcon
index d4a9d3108..3a61c6925 100755
--- a/tests/misc/chcon
+++ b/tests/misc/chcon
@@ -6,8 +6,8 @@ if test "$VERBOSE" = yes; then
chcon --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
require_selinux_
diff --git a/tests/misc/chcon-fail b/tests/misc/chcon-fail
index 865b1b996..036d531ee 100755
--- a/tests/misc/chcon-fail
+++ b/tests/misc/chcon-fail
@@ -7,8 +7,8 @@ if test "$VERBOSE" = yes; then
chcon --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/close-stdout b/tests/misc/close-stdout
index 301c8ecb5..c3f54da7d 100755
--- a/tests/misc/close-stdout
+++ b/tests/misc/close-stdout
@@ -2,7 +2,7 @@
# Ensure that several programs work fine, even with stdout initially closed.
# This is effectively a test of closeout.c's close_stdout function.
-# 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
p="$abs_top_builddir"
diff --git a/tests/misc/csplit b/tests/misc/csplit
index defff67d7..a34fc24a3 100755
--- a/tests/misc/csplit
+++ b/tests/misc/csplit
@@ -1,7 +1,7 @@
#!/bin/sh
# various csplit tests
-# 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
csplit --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/cut b/tests/misc/cut
index 3bf52163d..003b3635a 100755
--- a/tests/misc/cut
+++ b/tests/misc/cut
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "cut". -*- perl -*-
-# 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
@@ -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/misc/date b/tests/misc/date
index ff18b4c0f..0c0ddaa77 100755
--- a/tests/misc/date
+++ b/tests/misc/date
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "date".
-# Copyright (C) 2005-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
@@ -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/misc/date-sec b/tests/misc/date-sec
index 445326dc5..6d7a8bccb 100755
--- a/tests/misc/date-sec
+++ b/tests/misc/date-sec
@@ -3,7 +3,7 @@
# `date --date="21:04 +0100" +%S' always prints `00'.
# Before coreutils-5.2.1, it would print the seconds from the current time.
-# 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
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
date --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/df b/tests/misc/df
index 84050f375..fe8dabb4a 100755
--- a/tests/misc/df
+++ b/tests/misc/df
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that "df ." outputs a header.
-# 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
df --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
case `df .` in
*'
diff --git a/tests/misc/df-P b/tests/misc/df-P
index a27abf0b9..7b52dd2d6 100755
--- a/tests/misc/df-P
+++ b/tests/misc/df-P
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that df -P is not affected by BLOCK_SIZE settings
-# 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
df --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/dircolors b/tests/misc/dircolors
index 31614f9da..8b5734ba5 100755
--- a/tests/misc/dircolors
+++ b/tests/misc/dircolors
@@ -1,7 +1,7 @@
#!/bin/sh
# Simple dircolors tests.
-# 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/misc/dirname b/tests/misc/dirname
index 6b9a8d7b7..52bd97032 100755
--- a/tests/misc/dirname
+++ b/tests/misc/dirname
@@ -2,7 +2,7 @@
# -*-perl-*-
# Test "dirname".
-# 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
@@ -18,7 +18,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/misc/expand b/tests/misc/expand
index 6a568be80..0354112a1 100755
--- a/tests/misc/expand
+++ b/tests/misc/expand
@@ -2,7 +2,7 @@
# -*- perl -*-
# Exercise expand.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-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,7 +18,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/misc/expr b/tests/misc/expr
index 6d2cbbd1f..9674bc4c5 100755
--- a/tests/misc/expr
+++ b/tests/misc/expr
@@ -2,7 +2,7 @@
# -*-perl-*-
# Basic tests for "expr".
-# Copyright (C) 2001, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-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,7 +18,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/misc/factor b/tests/misc/factor
index de3f376a2..a27034fd0 100755
--- a/tests/misc/factor
+++ b/tests/misc/factor
@@ -2,7 +2,7 @@
# -*-perl-*-
# Basic tests for "factor".
-# Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2007 Free Software
+# Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2007-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -19,7 +19,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/misc/false-status b/tests/misc/false-status
index b6b22a6ac..7eaec30ce 100755
--- a/tests/misc/false-status
+++ b/tests/misc/false-status
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that false exits nonzero even with --help or --version
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
false --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
false --version > /dev/null && fail=1
diff --git a/tests/misc/fmt b/tests/misc/fmt
index 49067ad9b..5487d2117 100755
--- a/tests/misc/fmt
+++ b/tests/misc/fmt
@@ -2,7 +2,7 @@
# -*- perl -*-
# Basic tests for "fmt".
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
+# Copyright (C) 2001, 2002, 2003, 2004, 2005-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
# Export this to avoid hassles when run in a UTF-8 locale,
# since we use 8-bit characters below, and those values are
diff --git a/tests/misc/fmt-long-line b/tests/misc/fmt-long-line
index aae1fa8be..eb6b15668 100755
--- a/tests/misc/fmt-long-line
+++ b/tests/misc/fmt-long-line
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure fmt -s works even on long lines
-# Copyright (C) 2002, 2006, 2007 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
fmt --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
(echo ' '; yes) | head -n1000 | tr '\n' ' ' > in || framework_failure
diff --git a/tests/misc/fold b/tests/misc/fold
index 960d6893d..bd4d29ddc 100755
--- a/tests/misc/fold
+++ b/tests/misc/fold
@@ -2,7 +2,7 @@
# -*- perl -*-
# Exercise fold.
-# Copyright (C) 2003, 2005-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
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
# Ensure that we don't run an older version of fold.
# Prior to 5.0.91, some of the tests below would cause fold to infloop,
diff --git a/tests/misc/groups-dash b/tests/misc/groups-dash
index f6dfe6887..e7d7d371f 100755
--- a/tests/misc/groups-dash
+++ b/tests/misc/groups-dash
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure groups handles -- sanely
-# 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
groups --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# Coreutils 6.9 and earlier failed to display information on first argument
# if later argument was --.
diff --git a/tests/misc/groups-version b/tests/misc/groups-version
index e7050c30f..3d7802b63 100755
--- a/tests/misc/groups-version
+++ b/tests/misc/groups-version
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure groups --version output is similar to id --version
-# 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
groups --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_built_ groups id
fail=0
diff --git a/tests/misc/head-c b/tests/misc/head-c
index 1520ea610..7610533b7 100755
--- a/tests/misc/head-c
+++ b/tests/misc/head-c
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise the fix of 2001-08-18, based on test case from Ian Bruce
-# Copyright (C) 2001, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
head --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
echo abc > in || framework_failure
diff --git a/tests/misc/head-elide-tail b/tests/misc/head-elide-tail
index 4de108d4a..a171e4ffb 100755
--- a/tests/misc/head-elide-tail
+++ b/tests/misc/head-elide-tail
@@ -2,7 +2,7 @@
# -*- perl -*-
# Exercise head's --bytes=-N option.
-# Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -18,7 +18,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/misc/head-pos b/tests/misc/head-pos
index b78a42d43..90efe2279 100755
--- a/tests/misc/head-pos
+++ b/tests/misc/head-pos
@@ -2,7 +2,7 @@
# When reading a specified number of lines, ensure that the output
# file pointer is positioned just after those lines.
-# 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
head --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
(echo a; echo b) > in || framework_failure
diff --git a/tests/misc/help-version b/tests/misc/help-version
index 3696736a9..6cbf13871 100755
--- a/tests/misc/help-version
+++ b/tests/misc/help-version
@@ -25,8 +25,8 @@ test "$VERBOSE" = yes && set -x
test "x$SHELL" = x && SHELL=/bin/sh
export SHELL
-. $srcdir/../envvar-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/test-lib.sh
expected_failure_status_nohup=127
expected_failure_status_printenv=2
diff --git a/tests/misc/ls-misc b/tests/misc/ls-misc
index be08c1654..ed42fb60b 100755
--- a/tests/misc/ls-misc
+++ b/tests/misc/ls-misc
@@ -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/misc/ls-time b/tests/misc/ls-time
index b3f0ca2e5..69f597938 100755
--- a/tests/misc/ls-time
+++ b/tests/misc/ls-time
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Avoid any possible glitches due to daylight-saving changes near the
# time stamps used during the test.
diff --git a/tests/misc/md5sum b/tests/misc/md5sum
index 474656f24..829f0ac10 100755
--- a/tests/misc/md5sum
+++ b/tests/misc/md5sum
@@ -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/misc/md5sum-newline b/tests/misc/md5sum-newline
index 41139816a..af555d60c 100755
--- a/tests/misc/md5sum-newline
+++ b/tests/misc/md5sum-newline
@@ -1,7 +1,7 @@
#!/bin/sh
# Newline tests for "md5sum".
-# Copyright (C) 1999, 2000, 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 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
@@ -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
# See if we can create a filename that contains a newline.
# Be careful to do it in a subshell so that we can redirect the
diff --git a/tests/misc/mknod b/tests/misc/mknod
index 37b33d18d..bcaf98bf3 100755
--- a/tests/misc/mknod
+++ b/tests/misc/mknod
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that mknod, mkfifo, mkdir -m MODE work with a restrictive umask
-# 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
mknod --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/mktemp b/tests/misc/mktemp
index affb0d17c..6ce9ba11c 100755
--- a/tests/misc/mktemp
+++ b/tests/misc/mktemp
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "mktemp".
-# 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
@@ -19,7 +19,7 @@
# 02110-1301, USA.
: ${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/misc/nice b/tests/misc/nice
index 00227293a..f4d40121a 100755
--- a/tests/misc/nice
+++ b/tests/misc/nice
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
nice --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
tests='
0 empty 10
diff --git a/tests/misc/nl b/tests/misc/nl
index 13855fbca..58baef9c3 100755
--- a/tests/misc/nl
+++ b/tests/misc/nl
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise nl functionality
-# Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
nl --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/nohup b/tests/misc/nohup
index ac9e5e561..62984062b 100755
--- a/tests/misc/nohup
+++ b/tests/misc/nohup
@@ -1,7 +1,7 @@
#!/bin/sh
# test nohup
-# 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
nohup --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/od b/tests/misc/od
index 498e57a85..9763e098a 100755
--- a/tests/misc/od
+++ b/tests/misc/od
@@ -2,7 +2,7 @@
# -*- perl -*-
# Exercise od
-# 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
@@ -18,7 +18,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,.*/,,'`
me=`echo $0|sed 's,.*/,,'`
diff --git a/tests/misc/od-N b/tests/misc/od-N
index 0cff509f7..0213dc4ee 100755
--- a/tests/misc/od-N
+++ b/tests/misc/od-N
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that `od -N N' reads no more than N bytes of input.
-# Copyright (C) 2001, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
od --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
echo abcdefg > in || framework_failure
diff --git a/tests/misc/od-x8 b/tests/misc/od-x8
index 852ddf43b..267ab4d87 100755
--- a/tests/misc/od-x8
+++ b/tests/misc/od-x8
@@ -2,7 +2,7 @@
# verify that od -t x8 works properly
# This would fail before coreutils-4.5.2.
-# Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 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,7 +22,7 @@ if test "$VERBOSE" = yes; then
od --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
od -t x8 /dev/null >/dev/null ||
skip_test_ "od lacks support for 8-byte quantities"
diff --git a/tests/misc/paste b/tests/misc/paste
index ab923a22a..9b50a511d 100755
--- a/tests/misc/paste
+++ b/tests/misc/paste
@@ -18,7 +18,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/misc/pathchk1 b/tests/misc/pathchk1
index 453a8e277..3bc5869fd 100755
--- a/tests/misc/pathchk1
+++ b/tests/misc/pathchk1
@@ -1,7 +1,7 @@
#!/bin/sh
# pathchk tests
-# Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
pathchk --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
touch file || framework_failure
diff --git a/tests/misc/pr b/tests/misc/pr
index 550c6d6f2..d189ddde5 100755
--- a/tests/misc/pr
+++ b/tests/misc/pr
@@ -2,7 +2,7 @@
# -*- perl -*-
# Exercise a bug with pr -m -s
-# 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
@@ -18,7 +18,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/misc/printf b/tests/misc/printf
index 5637d25f2..bdcfb5d2f 100755
--- a/tests/misc/printf
+++ b/tests/misc/printf
@@ -1,7 +1,7 @@
#!/bin/sh
# basic tests for printf
-# 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
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
"$prog" --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/printf-hex b/tests/misc/printf-hex
index 4ece0ac29..e5db45e4d 100755
--- a/tests/misc/printf-hex
+++ b/tests/misc/printf-hex
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure that only two hex. digits are consumed in a \xHHH sequence
-# 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
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
"$prog" --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise
index fe5458920..905660262 100755
--- a/tests/misc/printf-surprise
+++ b/tests/misc/printf-surprise
@@ -1,7 +1,7 @@
#!/bin/sh
# Detect printf(3) failure even when it doesn't set stream error indicator
-# 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
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
"$prog" --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_ulimit_
fail=0
diff --git a/tests/misc/ptx-overrun b/tests/misc/ptx-overrun
index beadf7f1a..552d7e2c4 100755
--- a/tests/misc/ptx-overrun
+++ b/tests/misc/ptx-overrun
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
ptx --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Using a long file name makes an abort more likely.
# Even with no file name, valgrind detects the buffer overrun.
diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long
index 37b552c4c..a8aff7016 100755
--- a/tests/misc/pwd-long
+++ b/tests/misc/pwd-long
@@ -18,9 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_readable_root_
ARGV_0=$0
diff --git a/tests/misc/pwd-unreadable-parent b/tests/misc/pwd-unreadable-parent
index 370a0d0ad..165cd79a1 100755
--- a/tests/misc/pwd-unreadable-parent
+++ b/tests/misc/pwd-unreadable-parent
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
test $host_os != linux-gnu &&
skip_test_ 'vendor getcwd may be inadequate'
diff --git a/tests/misc/readlink-fp-loop b/tests/misc/readlink-fp-loop
index ee65e2816..99c1ec073 100755
--- a/tests/misc/readlink-fp-loop
+++ b/tests/misc/readlink-fp-loop
@@ -1,7 +1,7 @@
#!/bin/sh
# readlink from 6.9 would fail with a false-positive symlink loop error
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cwd=$("$abs_top_builddir/src/pwd")
# To trigger this bug, we have to construct a name/situation during
diff --git a/tests/misc/runcon-no-reorder b/tests/misc/runcon-no-reorder
index a395e10f8..05e3781af 100755
--- a/tests/misc/runcon-no-reorder
+++ b/tests/misc/runcon-no-reorder
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that runcon does not reorder its arguments.
-# 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
runcon --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cat <<\EOF > exp || framework_failure
runcon: runcon may be used only on a SELinux kernel
diff --git a/tests/misc/selinux b/tests/misc/selinux
index 87d1a8dde..414e22e4d 100755
--- a/tests/misc/selinux
+++ b/tests/misc/selinux
@@ -10,8 +10,8 @@ if test "$VERBOSE" = yes; then
stat --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
require_selinux_
diff --git a/tests/misc/seq b/tests/misc/seq
index f48289bdf..64c33f2a5 100755
--- a/tests/misc/seq
+++ b/tests/misc/seq
@@ -18,7 +18,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/misc/sha1sum b/tests/misc/sha1sum
index 452236d8d..56a549ed3 100755
--- a/tests/misc/sha1sum
+++ b/tests/misc/sha1sum
@@ -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/misc/sha1sum-vec b/tests/misc/sha1sum-vec
index b00ece284..db0b3ad99 100755
--- a/tests/misc/sha1sum-vec
+++ b/tests/misc/sha1sum-vec
@@ -1,7 +1,7 @@
#!/bin/sh
# Sample vectors for "sha1sum".
-# Copyright (C) 2000, 2001, 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 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
@@ -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/misc/sha224sum b/tests/misc/sha224sum
index 022379cad..decac8f9f 100755
--- a/tests/misc/sha224sum
+++ b/tests/misc/sha224sum
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "sha224sum".
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -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/misc/sha256sum b/tests/misc/sha256sum
index f28ef8ff1..bacf6ec59 100755
--- a/tests/misc/sha256sum
+++ b/tests/misc/sha256sum
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "sha256sum".
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -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/misc/sha384sum b/tests/misc/sha384sum
index 0eb55872f..180241480 100755
--- a/tests/misc/sha384sum
+++ b/tests/misc/sha384sum
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "sha384sum".
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -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/misc/sha512sum b/tests/misc/sha512sum
index 5977915fc..021ad8138 100755
--- a/tests/misc/sha512sum
+++ b/tests/misc/sha512sum
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "sha512sum".
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -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/misc/shred-exact b/tests/misc/shred-exact
index e0fef3974..ea465902f 100755
--- a/tests/misc/shred-exact
+++ b/tests/misc/shred-exact
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure that neither --exact nor --zero gobbles a command line argument
-# Copyright (C) 2000, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
shred --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/shred-remove b/tests/misc/shred-remove
index 38013d3d8..f69166a9d 100755
--- a/tests/misc/shred-remove
+++ b/tests/misc/shred-remove
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
shred --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
# The length of the basename is what matters.
diff --git a/tests/misc/shuf b/tests/misc/shuf
index ac59c55ff..2231dcd53 100755
--- a/tests/misc/shuf
+++ b/tests/misc/shuf
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that shuf randomizes its input.
-# 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
shuf --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
seq 100 > in || framework_failure
diff --git a/tests/misc/sort-compress b/tests/misc/sort-compress
index 00aae25c5..a555b26df 100755
--- a/tests/misc/sort-compress
+++ b/tests/misc/sort-compress
@@ -1,7 +1,7 @@
#!/bin/sh
# Test use of compression by sort
-# 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,7 +21,7 @@ if test "$VERBOSE" = yes; then
sort --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
seq -w 2000 > exp || framework_failure
tac exp > in || framework_failure
diff --git a/tests/misc/sort-merge b/tests/misc/sort-merge
index 7ac9f8440..b4224f71b 100755
--- a/tests/misc/sort-merge
+++ b/tests/misc/sort-merge
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "sort -m".
-# Copyright (C) 2002, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 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/misc/sort-rand b/tests/misc/sort-rand
index 8b9fb2df0..c42d16f5a 100755
--- a/tests/misc/sort-rand
+++ b/tests/misc/sort-rand
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that sort --sort-random doesn't sort.
-# Copyright (C) 2005-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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
sort --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
seq 100 > in || framework_failure
diff --git a/tests/misc/split-a b/tests/misc/split-a
index a8eed3876..6f426e29f 100755
--- a/tests/misc/split-a
+++ b/tests/misc/split-a
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
split --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/split-fail b/tests/misc/split-fail
index 5cc6d73ef..ce7ee295d 100755
--- a/tests/misc/split-fail
+++ b/tests/misc/split-fail
@@ -1,7 +1,7 @@
#!/bin/sh
# split must fail when given length/count of zero.
-# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 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
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
split --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch in || framework_failure
diff --git a/tests/misc/split-l b/tests/misc/split-l
index 2460289b8..f2f23835f 100755
--- a/tests/misc/split-l
+++ b/tests/misc/split-l
@@ -1,7 +1,7 @@
#!/bin/sh
# show that `split --lines=2' works.
-# Copyright (C) 2002, 2006, 2007 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
ln --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
printf '1\n2\n3\n4\n5\n' > in || framework_failure
diff --git a/tests/misc/stat-fmt b/tests/misc/stat-fmt
index ebc3b880c..e19fb1271 100755
--- a/tests/misc/stat-fmt
+++ b/tests/misc/stat-fmt
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that stat properly handles a format string ending with %
-# Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
stat --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/stat-printf b/tests/misc/stat-printf
index f175ba1f0..6615df5d1 100755
--- a/tests/misc/stat-printf
+++ b/tests/misc/stat-printf
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "stat --printf".
-# Copyright (C) 2005-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
@@ -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/misc/stty b/tests/misc/stty
index 6ec67be01..8c4815b2d 100755
--- a/tests/misc/stty
+++ b/tests/misc/stty
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
fi
# Make sure there's a tty on stdin.
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/input-tty
+. $top_srcdir/tests/test-lib.sh
# The following list of reversible options was generated with
# grep -w REV stty.c|sed -n '/^ {"/{s//REV_/;s/".*/=1/;p;}'|fmt
diff --git a/tests/misc/stty-invalid b/tests/misc/stty-invalid
index d35159475..d478765ed 100755
--- a/tests/misc/stty-invalid
+++ b/tests/misc/stty-invalid
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that stty diagnoses invalid inputs, rather than silently misbehaving.
-# 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,8 +22,8 @@ if test "$VERBOSE" = yes; then
fi
# Make sure there's a tty on stdin.
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/input-tty
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col
index c7e49675d..d5d751070 100755
--- a/tests/misc/stty-row-col
+++ b/tests/misc/stty-row-col
@@ -37,8 +37,8 @@ LC_ALL=C
export LC_ALL
# Make sure there's a tty on stdin.
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/input-tty
+. $top_srcdir/tests/test-lib.sh
# Versions of GNU stty from shellutils-1.9.2c and earlier failed
# tests #2 and #4 when run on SunOS 4.1.3.
diff --git a/tests/misc/sum b/tests/misc/sum
index 14871ec2d..f36621406 100755
--- a/tests/misc/sum
+++ b/tests/misc/sum
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "sum".
-# Copyright (C) 2000, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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/misc/sum-sysv b/tests/misc/sum-sysv
index d960f9818..e5361832d 100755
--- a/tests/misc/sum-sysv
+++ b/tests/misc/sum-sysv
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure `sum -s' works for input whose sum of bytes is larger than 2^32
-# Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
fi
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
# Avoid a problem when run in a UTF-8 locale.
# Otherwise, Perl would try to (and fail to) interpret
@@ -30,7 +30,7 @@ fi
LC_ALL=C
export LC_ALL
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue
index efc87f0a2..0c421e5b6 100755
--- a/tests/misc/tac-continue
+++ b/tests/misc/tac-continue
@@ -3,7 +3,7 @@
# when it encounters an error with say the first one.
# With coreutils-5.2.1 and earlier, this test would fail.
-# 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
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
tac --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
# See if the envvar is defined.
if test x = "x$FULL_PARTITION_TMPDIR"; then
diff --git a/tests/misc/tee b/tests/misc/tee
index 6da34a665..e73619fdf 100755
--- a/tests/misc/tee
+++ b/tests/misc/tee
@@ -1,7 +1,7 @@
#!/bin/sh
# test for basic tee functionality.
-# Copyright (C) 2005-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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
tee --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
echo line >sample || framework_failure
nums=`seq 9` || framework_failure
diff --git a/tests/misc/tee-dash b/tests/misc/tee-dash
index 3e4ecd6f0..7b330f97c 100755
--- a/tests/misc/tee-dash
+++ b/tests/misc/tee-dash
@@ -1,7 +1,7 @@
#!/bin/sh
# test for "tee -".
-# Copyright (C) 2005-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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
tee --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
tee - </dev/null || fail=1
diff --git a/tests/misc/test-diag b/tests/misc/test-diag
index b7d899b63..9bdd95057 100755
--- a/tests/misc/test-diag
+++ b/tests/misc/test-diag
@@ -1,7 +1,7 @@
#!/bin/sh
# Test the diagnostics of "test".
-# 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
@@ -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/misc/tsort b/tests/misc/tsort
index 440c60e2d..dd593abdf 100755
--- a/tests/misc/tsort
+++ b/tests/misc/tsort
@@ -2,7 +2,7 @@
# -*- perl -*-
# Test "tsort".
-# Copyright (C) 1999, 2000, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003-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,7 +18,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/misc/tty-eof b/tests/misc/tty-eof
index 1de1d1f82..314ae8c20 100755
--- a/tests/misc/tty-eof
+++ b/tests/misc/tty-eof
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
# Ensure that $TMPDIR is valid.
TMPDIR=.; export TMPDIR
diff --git a/tests/misc/unexpand b/tests/misc/unexpand
index d2762f12a..de3ec87ee 100755
--- a/tests/misc/unexpand
+++ b/tests/misc/unexpand
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "unexpand".
-# Copyright (C) 2000, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003-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/misc/wc-files0 b/tests/misc/wc-files0
index 44bf84ffe..7b54fda6c 100755
--- a/tests/misc/wc-files0
+++ b/tests/misc/wc-files0
@@ -1,7 +1,7 @@
#!/bin/sh
# Show that wc's new --files0-from option works.
-# 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
wc --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
echo 2 > 2b || framework_failure
echo 2 words > 2w || framework_failure
diff --git a/tests/misc/wc-files0-from b/tests/misc/wc-files0-from
index 61340d66a..d70bb7d56 100755
--- a/tests/misc/wc-files0-from
+++ b/tests/misc/wc-files0-from
@@ -3,7 +3,7 @@
# Exercise wc's --files0-from option.
# This file bears a striking resemblance to tests/du/files0-from.
-# 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
@@ -19,7 +19,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/misc/xstrtol b/tests/misc/xstrtol
index 874b4a502..cb8503543 100755
--- a/tests/misc/xstrtol
+++ b/tests/misc/xstrtol
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise xstrtol's diagnostics via pr
-# 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
fi
: ${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/mk-script b/tests/mk-script
index 5837b4382..5837b4382 100755..100644
--- a/tests/mk-script
+++ b/tests/mk-script
diff --git a/tests/mkdir/Makefile.am b/tests/mkdir/Makefile.am
deleted file mode 100644
index ee8bfb84f..000000000
--- a/tests/mkdir/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- selinux \
- p-1 \
- p-2 \
- p-3 \
- p-slashdot \
- p-thru-slink \
- p-v \
- parents \
- perm \
- special-1 \
- t-slash \
- writable-under-readonly
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1
index a5672743a..95b26be8a 100755
--- a/tests/mkdir/p-1
+++ b/tests/mkdir/p-1
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
mkdir --parents "`pwd`/t" || fail=1
diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2
index 0659a8e35..bbf391304 100755
--- a/tests/mkdir/p-2
+++ b/tests/mkdir/p-2
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
mkdir --parents "`pwd`/t/u" || fail=1
diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3
index e868b520f..e05021ff2 100755
--- a/tests/mkdir/p-3
+++ b/tests/mkdir/p-3
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir no-access || framework_failure
diff --git a/tests/mkdir/p-slashdot b/tests/mkdir/p-slashdot
index b35ce19cf..273b7b7e3 100755
--- a/tests/mkdir/p-slashdot
+++ b/tests/mkdir/p-slashdot
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that mkdir -p works with arguments specified with a trailing "/.".
-# Copyright (C) 2005-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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/mkdir/p-thru-slink b/tests/mkdir/p-thru-slink
index 8607a935e..c32619140 100755
--- a/tests/mkdir/p-thru-slink
+++ b/tests/mkdir/p-thru-slink
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that mkdir -p foo/bar works when foo is a symbolic link to a directory
-# Copyright (C) 2005-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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
ln -s . slink || framework_failure
diff --git a/tests/mkdir/p-v b/tests/mkdir/p-v
index 316c1e939..ffca679e2 100755
--- a/tests/mkdir/p-v
+++ b/tests/mkdir/p-v
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mkdir --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
fail=0
mkdir -pv foo/a/b/c/d >out || fail=1
diff --git a/tests/mkdir/parents b/tests/mkdir/parents
index 81302745f..72fb05a4b 100755
--- a/tests/mkdir/parents
+++ b/tests/mkdir/parents
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure mkdir's -p options works properly
-# Copyright (C) 2000, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
. "$abs_top_srcdir/tests/setgid-check"
mkdir -m 700 e-dir || framework_failure
@@ -36,12 +36,12 @@ mkdir e-dir > /dev/null 2>&1 && fail=1
# Create an existing directory.
umask 077
mode_str=drwxr-x-wx
-mode_arg=`"$abs_top_srcdir/tests/rwx-to-mode" $mode_str`
+mode_arg=`rwx_to_mode_ $mode_str`
mkdir -m $mode_arg a || fail=1
# this `mkdir -p ...' shouldn't change perms of existing dir `a'.
d_mode_str=drwx-w--wx
-d_mode_arg=`"$abs_top_srcdir/tests/rwx-to-mode" $d_mode_str`
+d_mode_arg=`rwx_to_mode_ $d_mode_str`
mkdir -p -m $d_mode_arg a/b/c/d
# Make sure the permissions of `a' haven't been changed.
diff --git a/tests/mkdir/perm b/tests/mkdir/perm
index a10d5f6c1..c6c941765 100755
--- a/tests/mkdir/perm
+++ b/tests/mkdir/perm
@@ -2,7 +2,7 @@
# Verify that mkdir's `-m MODE' option works properly
# with various umask settings.
-# Copyright (C) 2000, 2002-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
. "$abs_top_srcdir/tests/setgid-check"
. "$abs_top_srcdir/tests/umask-check"
diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux
index 91b23b14e..c81669d61 100755
--- a/tests/mkdir/selinux
+++ b/tests/mkdir/selinux
@@ -27,9 +27,9 @@ fi
# mcstrans-0.2.8-1.fc9, the following commands may mistakenly exit
# successfully, in spite of the invalid context string.
-. $srcdir/../envvar-check
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
c=invalid-selinux-context
msg="failed to set default file creation context to \`$c':"
diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1
index 800d51065..10d5b86aa 100755
--- a/tests/mkdir/special-1
+++ b/tests/mkdir/special-1
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
set_mode_string=u=rwx,g=rx,o=w,-s,+t
output_mode_string=drwxr-x-wT
diff --git a/tests/mkdir/t-slash b/tests/mkdir/t-slash
index a6fab5cc2..fdb5e8692 100755
--- a/tests/mkdir/t-slash
+++ b/tests/mkdir/t-slash
@@ -2,7 +2,7 @@
# Ensure that mkdir works with arguments specified with and without
# a trailing slash.
-# Copyright (C) 2000, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly
index 92d87ab5a..ebca859b8 100755
--- a/tests/mkdir/writable-under-readonly
+++ b/tests/mkdir/writable-under-readonly
@@ -29,7 +29,7 @@ if test "$VERBOSE" = yes; then
mkdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_root_
# FIXME: for now, skip it unconditionally
diff --git a/tests/mv/Makefile.am b/tests/mv/Makefile.am
deleted file mode 100644
index 92ec68e39..000000000
--- a/tests/mv/Makefile.am
+++ /dev/null
@@ -1,52 +0,0 @@
-# Make coreutils tests for "mv". -*-Makefile-*-
-
-# Copyright (C) 1998-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 = \
- atomic2 \
- sticky-to-xpart \
- hard-verbose \
- backup-dir \
- dir2dir \
- no-target-dir \
- atomic \
- acl \
- reply-no \
- leak-fd \
- part-hardlink \
- hard-4 \
- hard-3 \
- hard-2 \
- perm-1 \
- i-link-no \
- part-fail \
- dup-source childproof update mv-special-1 \
- into-self \
- into-self-2 \
- into-self-3 \
- into-self-4 \
- i-1 \
- i-2 \
- i-3 \
- i-4 \
- i-5 \
- backup-is-src \
- hard-link-1 force partition-perm to-symlink dir-file diag \
- part-symlink part-rename trailing-slash
-
-EXTRA_DIST = $(TESTS) vfat
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/mv/acl b/tests/mv/acl
index 4fc6350b1..095fef12d 100755
--- a/tests/mv/acl
+++ b/tests/mv/acl
@@ -24,8 +24,8 @@ if test "$VERBOSE" = yes; then
setfacl --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_acl_
# Skip this test if cp was built without ACL support:
diff --git a/tests/mv/atomic b/tests/mv/atomic
index 5eadb958f..e0e8adce1 100755
--- a/tests/mv/atomic
+++ b/tests/mv/atomic
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_strace_ unlink
# Before the fix, mv would unnecessarily unlink the destination symlink:
diff --git a/tests/mv/atomic2 b/tests/mv/atomic2
index fe205b46d..4d2b4fc08 100755
--- a/tests/mv/atomic2
+++ b/tests/mv/atomic2
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_strace_ unlink
# Before the fix, mv would unnecessarily unlink the destination symlink:
diff --git a/tests/mv/backup-dir b/tests/mv/backup-dir
index 2880cbd30..d23476e34 100755
--- a/tests/mv/backup-dir
+++ b/tests/mv/backup-dir
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure "mv --verbose --backup" works the same for dirs and non-dirs.
-# 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
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir A B || framework_failure
touch X Y || framework_failure
diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src
index 9315d15a0..f90ce43c6 100755
--- a/tests/mv/backup-is-src
+++ b/tests/mv/backup-is-src
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/childproof b/tests/mv/childproof
index cdce93253..6cece3f3c 100755
--- a/tests/mv/childproof
+++ b/tests/mv/childproof
@@ -3,7 +3,7 @@
# With fileutils-4.1 and earlier, this test would fail for cp and mv.
# With coreutils-6.9 and earlier, this test would fail for ln.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -25,8 +25,8 @@ if test "$VERBOSE" = yes; then
ln --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir a b c || framework_failure
diff --git a/tests/mv/diag b/tests/mv/diag
index 3393606c3..37739f071 100755
--- a/tests/mv/diag
+++ b/tests/mv/diag
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
fi
# Make sure we get English translations.
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch f1 || framework_failure
touch f2 || framework_failure
diff --git a/tests/mv/dir-file b/tests/mv/dir-file
index 069524964..589944191 100755
--- a/tests/mv/dir-file
+++ b/tests/mv/dir-file
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/file || framework_failure
> file || framework_failure
diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir
index 41b4c6363..f8361fbff 100755
--- a/tests/mv/dir2dir
+++ b/tests/mv/dir2dir
@@ -2,7 +2,7 @@
# Ensure that mv prints the right diagnostic for a dir->dir move
# where the destination directory is not empty.
-# 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p a/t b/t || framework_failure
touch a/t/f || framework_failure
diff --git a/tests/mv/dup-source b/tests/mv/dup-source
index a3eff6bdc..bba2ef869 100755
--- a/tests/mv/dup-source
+++ b/tests/mv/dup-source
@@ -4,7 +4,7 @@
# made this fail: cp a a d/
# Ensure that mv fails with a similar command.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -25,8 +25,8 @@ if test "$VERBOSE" = yes; then
mv --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/mv/force b/tests/mv/force
index ad64c2290..27c0a18b4 100755
--- a/tests/mv/force
+++ b/tests/mv/force
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
ff=mvforce
ff2=mvforce2
diff --git a/tests/mv/hard-2 b/tests/mv/hard-2
index 7833e43f7..7813f8a95 100755
--- a/tests/mv/hard-2
+++ b/tests/mv/hard-2
@@ -2,7 +2,7 @@
# Ensure that moving hard-linked arguments onto existing destinations works.
# Likewise when using cp --preserve=link.
-# 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
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir dst || framework_failure
diff --git a/tests/mv/hard-3 b/tests/mv/hard-3
index 8d532a7c9..359a74dba 100755
--- a/tests/mv/hard-3
+++ b/tests/mv/hard-3
@@ -2,7 +2,7 @@
# Ensure that using `cp --preserve=link' to copy hard-linked arguments
# onto existing destinations works, even when one of the link operations fails.
-# 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
@@ -35,7 +35,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p x dst/x || framework_failure
diff --git a/tests/mv/hard-4 b/tests/mv/hard-4
index 924c002dd..b082c1b21 100755
--- a/tests/mv/hard-4
+++ b/tests/mv/hard-4
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that mv removes a in this case: touch a; ln a b; mv a b
-# Copyright (C) 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch a || framework_failure
ln a b || framework_failure
diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1
index b82f2526d..93f8ec194 100755
--- a/tests/mv/hard-link-1
+++ b/tests/mv/hard-link-1
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/hard-verbose b/tests/mv/hard-verbose
index 13ca23f16..f156f79f7 100755
--- a/tests/mv/hard-verbose
+++ b/tests/mv/hard-verbose
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that mv's --verbose options works even in this unusual case
-# 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
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch x || framework_failure
ln x y || framework_failure
diff --git a/tests/mv/i-1 b/tests/mv/i-1
index 326d72e1a..24726fedb 100755
--- a/tests/mv/i-1
+++ b/tests/mv/i-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure a `n' reply to `mv -i...' aborts the move operation.
-# Copyright (C) 2001, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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/mv/i-2 b/tests/mv/i-2
index eb0181e1a..2b537309c 100755
--- a/tests/mv/i-2
+++ b/tests/mv/i-2
@@ -25,9 +25,9 @@ fi
# Make sure we get English translations.
-. $srcdir/../lang-default
+. $top_srcdir/tests/lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
for i in a b c d e f g h; do
diff --git a/tests/mv/i-3 b/tests/mv/i-3
index efac633ef..1250baf7d 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -2,7 +2,7 @@
# Make sure that `mv file unwritable-file' prompts the user
# and that `mv -f file unwritable-file' doesn't.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -22,9 +22,9 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/input-tty
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
touch f g h i || framework_failure
diff --git a/tests/mv/i-4 b/tests/mv/i-4
index db61aab86..371452759 100755
--- a/tests/mv/i-4
+++ b/tests/mv/i-4
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
for i in a b; do
echo $i > $i || framework_failure
diff --git a/tests/mv/i-5 b/tests/mv/i-5
index e62d08cfa..4143c838e 100755
--- a/tests/mv/i-5
+++ b/tests/mv/i-5
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure `mv -i dir file' prompts before failing.
-# 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
mv --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 b || framework_failure
diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no
index bb6fa44e2..b3f8fd4be 100755
--- a/tests/mv/i-link-no
+++ b/tests/mv/i-link-no
@@ -1,7 +1,7 @@
#!/bin/sh
# Show that mv doesn't preserve links to files the user has declined to move.
-# Copyright (C) 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-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
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a b || framework_failure
echo foo > a/foo || framework_failure
diff --git a/tests/mv/into-self b/tests/mv/into-self
index cbe7df9c5..a877de4f5 100755
--- a/tests/mv/into-self
+++ b/tests/mv/into-self
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
dir=toself-dir
file=toself-file
diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2
index ad00cb787..147941a22 100755
--- a/tests/mv/into-self-2
+++ b/tests/mv/into-self-2
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3
index ce858a234..f531f5188 100755
--- a/tests/mv/into-self-3
+++ b/tests/mv/into-self-3
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
dir1=is3-dir1
dir2=is3-dir2
diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4
index c43418a1d..39e053d61 100755
--- a/tests/mv/into-self-4
+++ b/tests/mv/into-self-4
@@ -2,7 +2,7 @@
# confirm that `mv symlink symlink' doesn't remove symlink
# Based on an example from David Luyer.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch file || framework_failure
ln -s file s || framework_failure
diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd
index 7a0a0ba5d..549d25643 100755
--- a/tests/mv/leak-fd
+++ b/tests/mv/leak-fd
@@ -2,7 +2,7 @@
# Exercise mv's file-descriptor-leak bug, reported against coreutils-5.2.1
# and fixed (properly) on 2004-10-21.
-# 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
@@ -25,9 +25,9 @@ fi
# This test is relatively expensive, and might well evoke a
# framework-failure on systems with a smaller command-line length
-. $srcdir/../expensive
+. $top_srcdir/tests/expensive
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1
index 4d70e592b..8bf507577 100755
--- a/tests/mv/mv-special-1
+++ b/tests/mv/mv-special-1
@@ -1,7 +1,7 @@
#! /bin/sh
# Test "mv" with special files.
-# Copyright (C) 1998, 1999, 2000, 2002, 2004-2007 Free Software
+# Copyright (C) 1998, 1999, 2000, 2002, 2004-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
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir
index 6fbdc8b9b..ba9a6b0a9 100755
--- a/tests/mv/no-target-dir
+++ b/tests/mv/no-target-dir
@@ -2,7 +2,7 @@
# ensure that --no-target-directory (-T) works when the destination is
# an empty 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p d/sub empty src d2/sub e2 || framework_failure
touch f || framework_failure
diff --git a/tests/mv/part-fail b/tests/mv/part-fail
index 4f12c1415..92d7ad4af 100755
--- a/tests/mv/part-fail
+++ b/tests/mv/part-fail
@@ -4,7 +4,7 @@
# This is a bit fragile since it relies on the string used
# for EPERM: `permission denied'.
-# 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
@@ -24,8 +24,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink
index 859cab09e..fed5bcf34 100755
--- a/tests/mv/part-hardlink
+++ b/tests/mv/part-hardlink
@@ -4,7 +4,7 @@
# For additional constraints, see the comment in copy.c.
# Before coreutils-5.2.1, this test would fail.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-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
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/part-rename b/tests/mv/part-rename
index 2c6035950..30913ec10 100755
--- a/tests/mv/part-rename
+++ b/tests/mv/part-rename
@@ -3,7 +3,7 @@
# another, and giving it a different name at the destination would cause mv
# to get a failed assertion.
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index 383179bfc..f49ebec02 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -2,7 +2,7 @@
# make sure cp and mv can handle many combinations of local and
# other-partition regular/symlink'd files.
-# Copyright (C) 2000, 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm
index 8df9571d9..54aa8363a 100755
--- a/tests/mv/partition-perm
+++ b/tests/mv/partition-perm
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/perm-1 b/tests/mv/perm-1
index 08a4eaa5b..a5ab790c0 100755
--- a/tests/mv/perm-1
+++ b/tests/mv/perm-1
@@ -2,7 +2,7 @@
# ensure that mv gives one diagnostic, not two, when failing
# due to lack of permissions
-# 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
mv --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 no-write/dir || framework_failure
diff --git a/tests/mv/reply-no b/tests/mv/reply-no
index baa2f3e5d..35ec5241c 100755
--- a/tests/mv/reply-no
+++ b/tests/mv/reply-no
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that `mv --reply=no f1 f2' works.
-# Copyright (C) 2005-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
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch a b || framework_failure
diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart
index ac2e16193..1578ae849 100755
--- a/tests/mv/sticky-to-xpart
+++ b/tests/mv/sticky-to-xpart
@@ -4,7 +4,7 @@
# mv: cannot remove `x': Operation not permitted
# Affects coreutils-6.0-6.9.
-# 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
@@ -24,9 +24,9 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink
index 80e1d138f..b265a3e31 100755
--- a/tests/mv/to-symlink
+++ b/tests/mv/to-symlink
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash
index e20d180d6..0a2a361b0 100755
--- a/tests/mv/trailing-slash
+++ b/tests/mv/trailing-slash
@@ -4,7 +4,7 @@
# Also, ensure that "mv dir non-exist-dir/" works.
# Also, ensure that "cp dir non-exist-dir/" works.
-# 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
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir foo || framework_failure
diff --git a/tests/mv/update b/tests/mv/update
index 15c922c06..6fab2ce03 100755
--- a/tests/mv/update
+++ b/tests/mv/update
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure --update works as advertised
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
echo old > old || framework_failure
touch -d yesterday old || framework_failure
diff --git a/tests/other-fs-tmpdir b/tests/other-fs-tmpdir
index a4f77793f..a56f7b186 100755..100644
--- a/tests/other-fs-tmpdir
+++ b/tests/other-fs-tmpdir
@@ -4,7 +4,7 @@
# of the current directory. If one is found, create a temporary directory
# inside it.
-# Copyright (C) 1998, 1999, 2001, 2002, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 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
diff --git a/tests/readlink/Makefile.am b/tests/readlink/Makefile.am
deleted file mode 100644
index 54a975896..000000000
--- a/tests/readlink/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- rl-1 can-e can-f can-m
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/readlink/can-e b/tests/readlink/can-e
index 1758d4ed4..500bbc582 100755
--- a/tests/readlink/can-e
+++ b/tests/readlink/can-e
@@ -1,7 +1,7 @@
#!/bin/sh
# tests for canonicalize-existing mode (readlink -e).
-# 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
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
pwd=`pwd`
my_pwd=$("$abs_top_builddir/src/pwd")
diff --git a/tests/readlink/can-f b/tests/readlink/can-f
index c920ddd36..3ddfb8dbc 100755
--- a/tests/readlink/can-f
+++ b/tests/readlink/can-f
@@ -1,7 +1,7 @@
#!/bin/sh
# tests for canonicalize mode (readlink -f).
-# 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
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
pwd=`pwd`
my_pwd=$("$abs_top_builddir/src/pwd")
diff --git a/tests/readlink/can-m b/tests/readlink/can-m
index bc5bafec3..e6a3e7589 100755
--- a/tests/readlink/can-m
+++ b/tests/readlink/can-m
@@ -1,7 +1,7 @@
#!/bin/sh
# tests for canonicalize-missing mode (readlink -m).
-# 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
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
pwd=`pwd`
my_pwd=$("$abs_top_builddir/src/pwd")
diff --git a/tests/readlink/rl-1 b/tests/readlink/rl-1
index 0b1b21819..c2fbcd4d5 100755
--- a/tests/readlink/rl-1
+++ b/tests/readlink/rl-1
@@ -1,7 +1,7 @@
#!/bin/sh
# test for readlink mode.
-# 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
readlink --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir subdir || framework_failure
touch regfile || framework_failure
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
diff --git a/tests/rmdir/Makefile.am b/tests/rmdir/Makefile.am
deleted file mode 100644
index 72397f0d9..000000000
--- a/tests/rmdir/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-TESTS = \
- fail-perm ignore t-slash
-
-EXTRA_DIST = $(TESTS)
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/rmdir/fail-perm b/tests/rmdir/fail-perm
index 51e4cf7f7..bbfcad838 100755
--- a/tests/rmdir/fail-perm
+++ b/tests/rmdir/fail-perm
@@ -2,7 +2,7 @@
# For unwritable directory `d', `rmdir -p d d/e/f' would emit
# diagnostics but would not fail. Fixed in 5.1.2.
-# 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
rmdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir d d/e d/e/f || framework_failure
chmod a-w d || framework_failure
diff --git a/tests/rmdir/ignore b/tests/rmdir/ignore
index 2555613dd..70b294490 100755
--- a/tests/rmdir/ignore
+++ b/tests/rmdir/ignore
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
rmdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cwd=`pwd`
mkdir -p "$cwd/a/b/c" "$cwd/a/x" || framework_failure
diff --git a/tests/rmdir/t-slash b/tests/rmdir/t-slash
index 4453f1606..cd4dad34b 100755
--- a/tests/rmdir/t-slash
+++ b/tests/rmdir/t-slash
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure rmdir -p works on a directory specified with a trailing slash
-# Copyright (C) 2002, 2006, 2007 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
rmdir --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir dir || framework_failure
diff --git a/tests/rwx-to-mode b/tests/rwx-to-mode
deleted file mode 100755
index 3ea9d03cc..000000000
--- a/tests/rwx-to-mode
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-# Convert an ls-style permission string, like drwxr----x and -rw-r-x-wx
-# to the equivalent chmod --mode (-m) argument, (=,u=rwx,g=r,o=x and
-# =,u=rw,g=rx,o=wx). Ignore ACLs.
-
-# Copyright (C) 2000, 2005 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/>.
-
-case $# in
- 1) rwx=$1;;
- *) echo "$0: wrong number of arguments" 1>&2
- echo "Usage: $0 ls-style-mode-string" 1>&2
- exit 1;;
-esac
-
-case $rwx in
- [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]) ;;
- [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]+) ;;
- *) echo "$0: invalid mode string: $rwx" 1>&2; exit 1;;
-esac
-
-# Perform these conversions:
-# S s
-# s xs
-# T t
-# t xt
-# The `T' and `t' ones are only valid for `other'.
-s='s/S/@/;s/s/x@/;s/@/s/'
-t='s/T/@/;s/t/x@/;s/@/t/'
-
-u=`echo $rwx|sed 's/^.\(...\).*/,u=\1/;s/-//g;s/^,u=$//;'$s`
-g=`echo $rwx|sed 's/^....\(...\).*/,g=\1/;s/-//g;s/^,g=$//;'$s`
-o=`echo $rwx|sed 's/^.......\(...\).*/,o=\1/;s/-//g;s/^,o=$//;'$s';'$t`
-echo "=$u$g$o"
-exit 0
diff --git a/tests/sort-time/rand-gen b/tests/sort-time/rand-gen
index efc7f845d..efc7f845d 100755..100644
--- a/tests/sort-time/rand-gen
+++ b/tests/sort-time/rand-gen
diff --git a/tests/tail-2/Makefile.am b/tests/tail-2/Makefile.am
deleted file mode 100644
index 6ec142e9d..000000000
--- a/tests/tail-2/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-# Make coreutils tests for "tail". -*-Makefile-*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 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/>.
-
-EXTRA_DIST = $(TESTS)
-
-TESTS = \
- append-only \
- tail-n0f \
- infloop-1 \
- big-4gb proc-ksyms start-middle assert assert-2
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only
index 615401874..e061b125e 100755
--- a/tests/tail-2/append-only
+++ b/tests/tail-2/append-only
@@ -2,7 +2,7 @@
# Ensure that tail -f works on an append-only file
# Requires root access to do chattr +a, as well as an ext[23] or xfs file system
-# 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_root_
chattr_a_works=1
diff --git a/tests/tail-2/assert b/tests/tail-2/assert
index 78e0082b4..88371c2d1 100755
--- a/tests/tail-2/assert
+++ b/tests/tail-2/assert
@@ -29,7 +29,7 @@ if test "$VERBOSE" = yes; then
fi
# Not "expensive" per se, but sleeping for so long is annoying.
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
very_expensive_
ok='ok ok ok'
diff --git a/tests/tail-2/assert-2 b/tests/tail-2/assert-2
index 6d30a665a..4cfd6fbb2 100755
--- a/tests/tail-2/assert-2
+++ b/tests/tail-2/assert-2
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
fi
# Not "expensive" per se, but sleeping for so long is annoying.
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
very_expensive_
ok='ok ok ok'
diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb
index 27319f98c..b7d25289c 100755
--- a/tests/tail-2/big-4gb
+++ b/tests/tail-2/big-4gb
@@ -2,7 +2,7 @@
# Demonstrate a bug in `tail -cN' when operating on files of size 4G and larger
# Fixed in coreutils-4.5.2.
-# Copyright (C) 2002, 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 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
tail --version
fi
-. $srcdir/../expensive
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/expensive
+. $top_srcdir/tests/test-lib.sh
# Create a file of size exactly 4GB (2^32) with 8 bytes
# at the beginning and another set of 8 bytes at the end.
diff --git a/tests/tail-2/infloop-1 b/tests/tail-2/infloop-1
index eb95ea090..4015fcb06 100755
--- a/tests/tail-2/infloop-1
+++ b/tests/tail-2/infloop-1
@@ -1,7 +1,7 @@
#!/bin/sh
# This test would fail with tail from pre-1.22i textutils.
-# Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
yes > t &
yes_pid=$!
diff --git a/tests/tail-2/proc-ksyms b/tests/tail-2/proc-ksyms
index 4a1a17662..ccd4fdccc 100755
--- a/tests/tail-2/proc-ksyms
+++ b/tests/tail-2/proc-ksyms
@@ -1,7 +1,7 @@
#!/bin/sh
# Prior to textutils-2.0.17, `tail /proc/ksyms' would segfault on Linux.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle
index 7e62a4073..d11eaec60 100755
--- a/tests/tail-2/start-middle
+++ b/tests/tail-2/start-middle
@@ -2,7 +2,7 @@
# Verify that tail works even when it's reading from a file
# that is not at its beginning. Based on a report from John Roll.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
(echo 1; echo 2) > k || framework_failure
diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f
index 3e3bc1ce7..c07b30c49 100755
--- a/tests/tail-2/tail-n0f
+++ b/tests/tail-2/tail-n0f
@@ -2,7 +2,7 @@
# Make sure that `tail -n0 -f' and `tail -c0 -f' sleep
# rather than doing what amounted to a busy-wait.
-# 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
@@ -26,7 +26,7 @@ if test "$VERBOSE" = yes; then
tail --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
sleep 2 &
pid=$!
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index ebc6a7cfc..80621bb5f 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -86,6 +86,39 @@ uid_is_privileged_()
esac
}
+# Convert an ls-style permission string, like drwxr----x and -rw-r-x-wx
+# to the equivalent chmod --mode (-m) argument, (=,u=rwx,g=r,o=x and
+# =,u=rw,g=rx,o=wx). Ignore ACLs.
+rwx_to_mode_()
+{
+ case $# in
+ 1) rwx=$1;;
+ *) echo "$0: wrong number of arguments" 1>&2
+ echo "Usage: $0 ls-style-mode-string" 1>&2
+ return;;
+ esac
+
+ case $rwx in
+ [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]) ;;
+ [ld-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxsS-][rwx-][rwx-][rwxtT-]+) ;;
+ *) echo "$0: invalid mode string: $rwx" 1>&2; return;;
+ esac
+
+ # Perform these conversions:
+ # S s
+ # s xs
+ # T t
+ # t xt
+ # The `T' and `t' ones are only valid for `other'.
+ s='s/S/@/;s/s/x@/;s/@/s/'
+ t='s/T/@/;s/t/x@/;s/@/t/'
+
+ u=`echo $rwx|sed 's/^.\(...\).*/,u=\1/;s/-//g;s/^,u=$//;'$s`
+ g=`echo $rwx|sed 's/^....\(...\).*/,g=\1/;s/-//g;s/^,g=$//;'$s`
+ o=`echo $rwx|sed 's/^.......\(...\).*/,o=\1/;s/-//g;s/^,o=$//;'$s';'$t`
+ echo "=$u$g$o"
+}
+
skip_if_()
{
case $1 in
@@ -145,7 +178,7 @@ test_dir_=$(pwd)
this_test_() { echo "./$0" | sed 's,.*/,,'; }
this_test=$(this_test_)
-. $srcdir/../envvar-check
+. $top_srcdir/tests/envvar-check
# This is a stub function that is run upon trap (upon regular exit and
# interrupt). Override it with a per-test function, e.g., to unmount
diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink
index c69f9d9bc..66392a5fc 100755
--- a/tests/touch/dangling-symlink
+++ b/tests/touch/dangling-symlink
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
rm -f touch-target t-symlink
ln -s touch-target t-symlink
diff --git a/tests/touch/dir-1 b/tests/touch/dir-1
index 5b7a86c19..e48484a2a 100755
--- a/tests/touch/dir-1
+++ b/tests/touch/dir-1
@@ -7,7 +7,7 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
touch . || fail=1
diff --git a/tests/touch/empty-file b/tests/touch/empty-file
index 5368629b4..1020a378d 100755
--- a/tests/touch/empty-file
+++ b/tests/touch/empty-file
@@ -26,7 +26,7 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
DEFAULT_SLEEP_SECONDS=2
SLEEP_SECONDS=${SLEEP_SECONDS=$DEFAULT_SLEEP_SECONDS}
diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag
index 018d191e5..7177ad444 100755
--- a/tests/touch/fail-diag
+++ b/tests/touch/fail-diag
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure touch gives reasonable diagnostics
-# Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
d1=no-$$
diff --git a/tests/touch/fifo b/tests/touch/fifo
index 5dd084065..22cde83a7 100755
--- a/tests/touch/fifo
+++ b/tests/touch/fifo
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkfifo_or_skip_ fifo
diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing
index 79a2452e3..a503ff752 100755
--- a/tests/touch/no-create-missing
+++ b/tests/touch/no-create-missing
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that touch -c no-such-file no longer fails (it did in 4.1.8).
-# Copyright (C) 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-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
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
fail=0
diff --git a/tests/touch/no-rights b/tests/touch/no-rights
index e90fcac50..9466166ce 100755
--- a/tests/touch/no-rights
+++ b/tests/touch/no-rights
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
# Make sure t2 is newer than t1.
touch -d '2000-01-01 00:00' t1 || framework_failure
diff --git a/tests/touch/not-owner b/tests/touch/not-owner
index 3f133f1e3..d041531c5 100755
--- a/tests/touch/not-owner
+++ b/tests/touch/not-owner
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
if env -- test -w /; then
skip_test_ you have write access to /.
diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other
index d4e01dd27..7aaa4f3a0 100755
--- a/tests/touch/now-owned-by-other
+++ b/tests/touch/now-owned-by-other
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/test-lib.sh
require_root_
group_num=$(id -g $NON_ROOT_USERNAME)
diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent
index dc1008d10..25f73828a 100755
--- a/tests/touch/obsolescent
+++ b/tests/touch/obsolescent
@@ -1,7 +1,7 @@
#!/bin/sh
# Test touch with obsolescent 8- or 10-digit time stamps.
-# Copyright (C) 2000, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004-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
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
_POSIX2_VERSION=199209; export _POSIX2_VERSION
POSIXLY_CORRECT=1; export POSIXLY_CORRECT
diff --git a/tests/touch/read-only b/tests/touch/read-only
index e1389c280..47b7eb20d 100755
--- a/tests/touch/read-only
+++ b/tests/touch/read-only
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that touch can operate on read-only files
-# Copyright (C) 2005-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
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
: > read-only || framework_failure
diff --git a/tests/touch/relative b/tests/touch/relative
index 910a3782c..6a5d100f1 100755
--- a/tests/touch/relative
+++ b/tests/touch/relative
@@ -2,7 +2,7 @@
# Demonstrate using a combination of --reference and --date to
# set the time of a file back by an arbitrary amount.
-# 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
touch --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure