coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 10/17] build: don't use recursive make fore 'tests' subdirectory


From: Stefano Lattarini
Subject: [PATCH 10/17] build: don't use recursive make fore 'tests' subdirectory
Date: Sun, 2 Sep 2012 21:55:12 +0200

* Makefile.am (SUBDIRS): Remove 'tests'.
(include): The '$(top_srcdir)/tests/local.mk' file.
(check-root): Remove this convenience target, it's no longer needed
no that the "real" check-root target once in 'tests/Makefile' will
land in the top-level makefile.
* configure.ac (AC_CONFIG_FILES): Remove 'tests/Makefile'.
* tests/Makefile.am: Rename ...
* tests/local.mk: ... like this, with a lot of adjustments.
* tests/init.cfg: Move ...
* init.cfg: ... here.  This is necessary, for a limitation of the
gnulib-provided 'tests/init.sh', which unconditionally look for
'init.cfg' in the $(srcdir) directory.
* tests/*/*.sh: Adjust: expect init.sh to be in '$srcdir/tests',
not in '$srcdir', and extend $PATH with './src', not with '../src'.
* tests/Coreutils.pm: Adjust similarly.
* tests/pr/pr-tests.pl ($pfx): Likewise.
---
 Makefile.am                                  |   8 +-
 configure.ac                                 |   1 -
 tests/init.cfg => init.cfg                   |   5 +-
 tests/Coreutils.pm                           |   6 +-
 tests/Makefile.am                            | 805 ---------------------------
 tests/chgrp/basic.sh                         |   2 +-
 tests/chgrp/default-no-deref.sh              |   2 +-
 tests/chgrp/deref.sh                         |   2 +-
 tests/chgrp/no-x.sh                          |   2 +-
 tests/chgrp/posix-H.sh                       |   2 +-
 tests/chgrp/recurse.sh                       |   2 +-
 tests/chmod/c-option.sh                      |   2 +-
 tests/chmod/equal-x.sh                       |   2 +-
 tests/chmod/equals.sh                        |   2 +-
 tests/chmod/inaccessible.sh                  |   2 +-
 tests/chmod/no-x.sh                          |   2 +-
 tests/chmod/octal.sh                         |   2 +-
 tests/chmod/setgid.sh                        |   2 +-
 tests/chmod/silent.sh                        |   2 +-
 tests/chmod/thru-dangling.sh                 |   2 +-
 tests/chmod/umask-x.sh                       |   2 +-
 tests/chmod/usage.sh                         |   2 +-
 tests/chown/basic.sh                         |   2 +-
 tests/chown/deref.sh                         |   2 +-
 tests/chown/preserve-root.sh                 |   2 +-
 tests/chown/separator.sh                     |   2 +-
 tests/cp/abuse.sh                            |   2 +-
 tests/cp/acl.sh                              |   2 +-
 tests/cp/attr-existing.sh                    |   2 +-
 tests/cp/backup-1.sh                         |   2 +-
 tests/cp/backup-dir.sh                       |   2 +-
 tests/cp/backup-is-src.sh                    |   2 +-
 tests/cp/capability.sh                       |   2 +-
 tests/cp/cp-HL.sh                            |   2 +-
 tests/cp/cp-a-selinux.sh                     |   2 +-
 tests/cp/cp-deref.sh                         |   2 +-
 tests/cp/cp-i.sh                             |   2 +-
 tests/cp/cp-mv-backup.sh                     |   2 +-
 tests/cp/cp-mv-enotsup-xattr.sh              |   2 +-
 tests/cp/cp-parents.sh                       |   2 +-
 tests/cp/deref-slink.sh                      |   2 +-
 tests/cp/dir-rm-dest.sh                      |   2 +-
 tests/cp/dir-slash.sh                        |   2 +-
 tests/cp/dir-vs-file.sh                      |   2 +-
 tests/cp/existing-perm-dir.sh                |   2 +-
 tests/cp/existing-perm-race.sh               |   2 +-
 tests/cp/fail-perm.sh                        |   2 +-
 tests/cp/fiemap-2.sh                         |   2 +-
 tests/cp/fiemap-empty.sh                     |   2 +-
 tests/cp/fiemap-perf.sh                      |   2 +-
 tests/cp/file-perm-race.sh                   |   2 +-
 tests/cp/into-self.sh                        |   2 +-
 tests/cp/link-heap.sh                        |   2 +-
 tests/cp/link-no-deref.sh                    |   2 +-
 tests/cp/link-preserve.sh                    |   2 +-
 tests/cp/link-symlink.sh                     |   2 +-
 tests/cp/link.sh                             |   2 +-
 tests/cp/nfs-removal-race.sh                 |   2 +-
 tests/cp/no-deref-link1.sh                   |   2 +-
 tests/cp/no-deref-link2.sh                   |   2 +-
 tests/cp/no-deref-link3.sh                   |   2 +-
 tests/cp/parent-perm-race.sh                 |   2 +-
 tests/cp/parent-perm.sh                      |   2 +-
 tests/cp/perm.sh                             |   2 +-
 tests/cp/preserve-2.sh                       |   2 +-
 tests/cp/preserve-gid.sh                     |   2 +-
 tests/cp/preserve-link.sh                    |   2 +-
 tests/cp/preserve-slink-time.sh              |   2 +-
 tests/cp/proc-short-read.sh                  |   2 +-
 tests/cp/proc-zero-len.sh                    |   2 +-
 tests/cp/r-vs-symlink.sh                     |   2 +-
 tests/cp/reflink-auto.sh                     |   4 +-
 tests/cp/reflink-perm.sh                     |   2 +-
 tests/cp/same-file.sh                        |   2 +-
 tests/cp/slink-2-slink.sh                    |   2 +-
 tests/cp/sparse-fiemap.sh                    |   4 +-
 tests/cp/sparse-to-pipe.sh                   |   2 +-
 tests/cp/sparse.sh                           |   2 +-
 tests/cp/special-bits.sh                     |   2 +-
 tests/cp/special-f.sh                        |   2 +-
 tests/cp/src-base-dot.sh                     |   2 +-
 tests/cp/symlink-slash.sh                    |   2 +-
 tests/cp/thru-dangling.sh                    |   2 +-
 tests/dd/bytes.sh                            |   2 +-
 tests/dd/direct.sh                           |   2 +-
 tests/dd/misc.sh                             |   2 +-
 tests/dd/nocache.sh                          |   2 +-
 tests/dd/not-rewound.sh                      |   2 +-
 tests/dd/reblock.sh                          |   2 +-
 tests/dd/skip-seek-past-dev.sh               |   2 +-
 tests/dd/skip-seek-past-file.sh              |   2 +-
 tests/dd/skip-seek2.sh                       |   2 +-
 tests/dd/sparse.sh                           |   2 +-
 tests/dd/stderr.sh                           |   2 +-
 tests/dd/unblock-sync.sh                     |   2 +-
 tests/df/df-P.sh                             |   2 +-
 tests/df/header.sh                           |   2 +-
 tests/df/no-mtab-status.sh                   |   2 +-
 tests/df/problematic-chars.sh                |   2 +-
 tests/df/total-unprocessed.sh                |   2 +-
 tests/df/total-verify.sh                     |   2 +-
 tests/df/unreadable.sh                       |   2 +-
 tests/du/2g.sh                               |   2 +-
 tests/du/8gb.sh                              |   2 +-
 tests/du/basic.sh                            |   2 +-
 tests/du/bigtime.sh                          |   2 +-
 tests/du/bind-mount-dir-cycle.sh             |   2 +-
 tests/du/deref-args.sh                       |   2 +-
 tests/du/deref.sh                            |   2 +-
 tests/du/exclude.sh                          |   2 +-
 tests/du/fd-leak.sh                          |   2 +-
 tests/du/files0-from-dir.sh                  |   2 +-
 tests/du/hard-link.sh                        |   2 +-
 tests/du/inacc-dest.sh                       |   2 +-
 tests/du/inacc-dir.sh                        |   2 +-
 tests/du/inaccessible-cwd.sh                 |   2 +-
 tests/du/long-from-unreadable.sh             |   2 +-
 tests/du/long-sloop.sh                       |   2 +-
 tests/du/max-depth.sh                        |   2 +-
 tests/du/move-dir-while-traversing.sh        |   2 +-
 tests/du/no-deref.sh                         |   2 +-
 tests/du/no-x.sh                             |   2 +-
 tests/du/one-file-system.sh                  |   4 +-
 tests/du/restore-wd.sh                       |   2 +-
 tests/du/slash.sh                            |   2 +-
 tests/du/slink.sh                            |   2 +-
 tests/du/trailing-slash.sh                   |   2 +-
 tests/du/two-args.sh                         |   2 +-
 tests/fmt/goal-option.sh                     |   2 +-
 tests/fmt/long-line.sh                       |   2 +-
 tests/id/gnu-zero-uids.sh                    |   2 +-
 tests/id/no-context.sh                       |   2 +-
 tests/install/basic-1.sh                     |   2 +-
 tests/install/create-leading.sh              |   2 +-
 tests/install/d-slashdot.sh                  |   2 +-
 tests/install/install-C-root.sh              |   2 +-
 tests/install/install-C-selinux.sh           |   2 +-
 tests/install/install-C.sh                   |   2 +-
 tests/install/strip-program.sh               |   2 +-
 tests/install/trap.sh                        |   2 +-
 tests/ln/backup-1.sh                         |   2 +-
 tests/ln/hard-backup.sh                      |   2 +-
 tests/ln/hard-to-sym.sh                      |   2 +-
 tests/ln/misc.sh                             |   2 +-
 tests/ln/relative.sh                         |   2 +-
 tests/ln/sf-1.sh                             |   2 +-
 tests/ln/slash-decorated-nonexistent-dest.sh |   2 +-
 tests/ln/target-1.sh                         |   2 +-
 tests/local.mk                               | 801 ++++++++++++++++++++++++++
 tests/ls/abmon-align.sh                      |   2 +-
 tests/ls/block-size.sh                       |   2 +-
 tests/ls/capability.sh                       |   2 +-
 tests/ls/color-clear-to-eol.sh               |   2 +-
 tests/ls/color-dtype-dir.sh                  |   2 +-
 tests/ls/color-norm.sh                       |   2 +-
 tests/ls/dangle.sh                           |   2 +-
 tests/ls/dired.sh                            |   2 +-
 tests/ls/file-type.sh                        |   2 +-
 tests/ls/follow-slink.sh                     |   2 +-
 tests/ls/getxattr-speedup.sh                 |   2 +-
 tests/ls/infloop.sh                          |   2 +-
 tests/ls/inode.sh                            |   2 +-
 tests/ls/m-option.sh                         |   2 +-
 tests/ls/multihardlink.sh                    |   2 +-
 tests/ls/nameless-uid.sh                     |   2 +-
 tests/ls/no-arg.sh                           |   2 +-
 tests/ls/no-cap.sh                           |   2 +-
 tests/ls/proc-selinux-segfault.sh            |   2 +-
 tests/ls/readdir-mountpoint-inode.sh         |   2 +-
 tests/ls/recursive.sh                        |   2 +-
 tests/ls/root-rel-symlink-color.sh           |   2 +-
 tests/ls/rt-1.sh                             |   2 +-
 tests/ls/slink-acl.sh                        |   2 +-
 tests/ls/stat-dtype.sh                       |   2 +-
 tests/ls/stat-failed.sh                      |   2 +-
 tests/ls/stat-free-color.sh                  |   2 +-
 tests/ls/stat-free-symlinks.sh               |   2 +-
 tests/ls/stat-vs-dirent.sh                   |   2 +-
 tests/ls/symlink-slash.sh                    |   2 +-
 tests/ls/time-style-diag.sh                  |   2 +-
 tests/ls/x-option.sh                         |   2 +-
 tests/misc/arch.sh                           |   2 +-
 tests/misc/cat-buf.sh                        |   2 +-
 tests/misc/cat-proc.sh                       |   2 +-
 tests/misc/chcon-fail.sh                     |   2 +-
 tests/misc/chcon.sh                          |   2 +-
 tests/misc/chroot-credentials.sh             |   2 +-
 tests/misc/chroot-fail.sh                    |   2 +-
 tests/misc/close-stdout.sh                   |   2 +-
 tests/misc/csplit-1000.sh                    |   2 +-
 tests/misc/csplit-heap.sh                    |   2 +-
 tests/misc/csplit.sh                         |   2 +-
 tests/misc/date-sec.sh                       |   2 +-
 tests/misc/env-null.sh                       |   2 +-
 tests/misc/env.sh                            |   2 +-
 tests/misc/false-status.sh                   |   2 +-
 tests/misc/groups-dash.sh                    |   2 +-
 tests/misc/groups-version.sh                 |   2 +-
 tests/misc/head-c.sh                         |   2 +-
 tests/misc/head-pos.sh                       |   2 +-
 tests/misc/help-version.sh                   |   2 +-
 tests/misc/id-context.sh                     |   2 +-
 tests/misc/id-groups.sh                      |   2 +-
 tests/misc/id-setgid.sh                      |   2 +-
 tests/misc/ls-time.sh                        |   2 +-
 tests/misc/md5sum-bsd.sh                     |   2 +-
 tests/misc/md5sum-parallel.sh                |   2 +-
 tests/misc/mknod.sh                          |   2 +-
 tests/misc/nice-fail.sh                      |   2 +-
 tests/misc/nice.sh                           |   2 +-
 tests/misc/nl.sh                             |   2 +-
 tests/misc/nohup.sh                          |   2 +-
 tests/misc/nproc-avail.sh                    |   2 +-
 tests/misc/nproc-positive.sh                 |   2 +-
 tests/misc/od-N.sh                           |   2 +-
 tests/misc/od-float.sh                       |   2 +-
 tests/misc/od-multiple-t.sh                  |   2 +-
 tests/misc/od-x8.sh                          |   2 +-
 tests/misc/pathchk1.sh                       |   2 +-
 tests/misc/printenv.sh                       |   2 +-
 tests/misc/printf-hex.sh                     |   2 +-
 tests/misc/printf-surprise.sh                |   2 +-
 tests/misc/printf.sh                         |   2 +-
 tests/misc/ptx-overrun.sh                    |   2 +-
 tests/misc/pwd-long.sh                       |   4 +-
 tests/misc/pwd-option.sh                     |   2 +-
 tests/misc/readlink-fp-loop.sh               |   2 +-
 tests/misc/readlink-root.sh                  |   2 +-
 tests/misc/realpath.sh                       |   2 +-
 tests/misc/runcon-no-reorder.sh              |   2 +-
 tests/misc/selinux.sh                        |   2 +-
 tests/misc/seq-long-double.sh                |   2 +-
 tests/misc/shred-exact.sh                    |   2 +-
 tests/misc/shred-passes.sh                   |   2 +-
 tests/misc/shred-remove.sh                   |   2 +-
 tests/misc/shuf.sh                           |   2 +-
 tests/misc/sort-NaN-infloop.sh               |   2 +-
 tests/misc/sort-benchmark-random.sh          |   2 +-
 tests/misc/sort-compress-hang.sh             |   2 +-
 tests/misc/sort-compress-proc.sh             |   2 +-
 tests/misc/sort-compress.sh                  |   2 +-
 tests/misc/sort-continue.sh                  |   2 +-
 tests/misc/sort-debug-keys.sh                |   2 +-
 tests/misc/sort-debug-warn.sh                |   2 +-
 tests/misc/sort-discrim.sh                   |   2 +-
 tests/misc/sort-exit-early.sh                |   2 +-
 tests/misc/sort-float.sh                     |   2 +-
 tests/misc/sort-merge-fdlimit.sh             |   2 +-
 tests/misc/sort-month.sh                     |   2 +-
 tests/misc/sort-rand.sh                      |   2 +-
 tests/misc/sort-spinlock-abuse.sh            |   2 +-
 tests/misc/sort-stale-thread-mem.sh          |   2 +-
 tests/misc/sort-u-FMR.sh                     |   2 +-
 tests/misc/sort-unique-segv.sh               |   2 +-
 tests/misc/sort-unique.sh                    |   2 +-
 tests/misc/sort-version.sh                   |   2 +-
 tests/misc/stat-birthtime.sh                 |   2 +-
 tests/misc/stat-fmt.sh                       |   2 +-
 tests/misc/stat-hyphen.sh                    |   2 +-
 tests/misc/stat-mount.sh                     |   2 +-
 tests/misc/stat-nanoseconds.sh               |   2 +-
 tests/misc/stat-slash.sh                     |   2 +-
 tests/misc/stdbuf.sh                         |   2 +-
 tests/misc/stty-invalid.sh                   |   2 +-
 tests/misc/stty-pairs.sh                     |   2 +-
 tests/misc/stty-row-col.sh                   |   2 +-
 tests/misc/stty.sh                           |   2 +-
 tests/misc/sum-sysv.sh                       |   2 +-
 tests/misc/tac-2-nonseekable.sh              |   2 +-
 tests/misc/tac-continue.sh                   |   2 +-
 tests/misc/tee-dash.sh                       |   2 +-
 tests/misc/tee.sh                            |   2 +-
 tests/misc/timeout-group.sh                  |   2 +-
 tests/misc/timeout-parameters.sh             |   2 +-
 tests/misc/timeout.sh                        |   2 +-
 tests/misc/tr-case-class.sh                  |   2 +-
 tests/misc/truncate-dangling-symlink.sh      |   2 +-
 tests/misc/truncate-dir-fail.sh              |   2 +-
 tests/misc/truncate-fail-diag.sh             |   2 +-
 tests/misc/truncate-fifo.sh                  |   2 +-
 tests/misc/truncate-no-create-missing.sh     |   2 +-
 tests/misc/truncate-overflow.sh              |   2 +-
 tests/misc/truncate-owned-by-other.sh        |   2 +-
 tests/misc/truncate-parameters.sh            |   2 +-
 tests/misc/truncate-relative.sh              |   2 +-
 tests/misc/uniq-perf.sh                      |   2 +-
 tests/misc/wc-files0.sh                      |   2 +-
 tests/misc/wc-parallel.sh                    |   2 +-
 tests/misc/xattr.sh                          |   4 +-
 tests/mkdir/p-1.sh                           |   2 +-
 tests/mkdir/p-2.sh                           |   2 +-
 tests/mkdir/p-3.sh                           |   2 +-
 tests/mkdir/p-slashdot.sh                    |   2 +-
 tests/mkdir/p-thru-slink.sh                  |   2 +-
 tests/mkdir/p-v.sh                           |   2 +-
 tests/mkdir/parents.sh                       |   2 +-
 tests/mkdir/perm.sh                          |   2 +-
 tests/mkdir/selinux.sh                       |   2 +-
 tests/mkdir/special-1.sh                     |   2 +-
 tests/mkdir/t-slash.sh                       |   2 +-
 tests/mkdir/writable-under-readonly.sh       |   2 +-
 tests/mv/acl.sh                              |   4 +-
 tests/mv/atomic.sh                           |   2 +-
 tests/mv/atomic2.sh                          |   2 +-
 tests/mv/backup-dir.sh                       |   2 +-
 tests/mv/backup-is-src.sh                    |   4 +-
 tests/mv/childproof.sh                       |   2 +-
 tests/mv/diag.sh                             |   2 +-
 tests/mv/dir-file.sh                         |   2 +-
 tests/mv/dir2dir.sh                          |   2 +-
 tests/mv/dup-source.sh                       |   2 +-
 tests/mv/force.sh                            |   2 +-
 tests/mv/hard-2.sh                           |   2 +-
 tests/mv/hard-3.sh                           |   2 +-
 tests/mv/hard-4.sh                           |   2 +-
 tests/mv/hard-link-1.sh                      |   4 +-
 tests/mv/hard-verbose.sh                     |   2 +-
 tests/mv/i-2.sh                              |   2 +-
 tests/mv/i-3.sh                              |   2 +-
 tests/mv/i-4.sh                              |   2 +-
 tests/mv/i-5.sh                              |   2 +-
 tests/mv/i-link-no.sh                        |   2 +-
 tests/mv/into-self-2.sh                      |   4 +-
 tests/mv/into-self-3.sh                      |   2 +-
 tests/mv/into-self-4.sh                      |   2 +-
 tests/mv/into-self.sh                        |   2 +-
 tests/mv/leak-fd.sh                          |   4 +-
 tests/mv/mv-n.sh                             |   2 +-
 tests/mv/mv-special-1.sh                     |   4 +-
 tests/mv/no-target-dir.sh                    |   2 +-
 tests/mv/part-fail.sh                        |   4 +-
 tests/mv/part-hardlink.sh                    |   4 +-
 tests/mv/part-rename.sh                      |   4 +-
 tests/mv/part-symlink.sh                     |   4 +-
 tests/mv/partition-perm.sh                   |   4 +-
 tests/mv/perm-1.sh                           |   2 +-
 tests/mv/sticky-to-xpart.sh                  |   4 +-
 tests/mv/symlink-onto-hardlink-to-self.sh    |   2 +-
 tests/mv/symlink-onto-hardlink.sh            |   2 +-
 tests/mv/to-symlink.sh                       |   4 +-
 tests/mv/trailing-slash.sh                   |   2 +-
 tests/mv/update.sh                           |   2 +-
 tests/pr/pr-tests.pl                         |   2 +-
 tests/readlink/can-e.sh                      |   2 +-
 tests/readlink/can-f.sh                      |   2 +-
 tests/readlink/can-m.sh                      |   2 +-
 tests/readlink/rl-1.sh                       |   2 +-
 tests/rm/cycle.sh                            |   2 +-
 tests/rm/d-1.sh                              |   2 +-
 tests/rm/d-2.sh                              |   2 +-
 tests/rm/d-3.sh                              |   2 +-
 tests/rm/dangling-symlink.sh                 |   2 +-
 tests/rm/deep-1.sh                           |   2 +-
 tests/rm/deep-2.sh                           |   2 +-
 tests/rm/dir-no-w.sh                         |   2 +-
 tests/rm/dir-nonrecur.sh                     |   2 +-
 tests/rm/dot-rel.sh                          |   2 +-
 tests/rm/empty-inacc.sh                      |   2 +-
 tests/rm/ext3-perf.sh                        |   2 +-
 tests/rm/f-1.sh                              |   2 +-
 tests/rm/fail-2eperm.sh                      |   2 +-
 tests/rm/fail-eacces.sh                      |   2 +-
 tests/rm/hash.sh                             |   2 +-
 tests/rm/i-1.sh                              |   2 +-
 tests/rm/i-never.sh                          |   2 +-
 tests/rm/i-no-r.sh                           |   2 +-
 tests/rm/ignorable.sh                        |   2 +-
 tests/rm/inaccessible.sh                     |   2 +-
 tests/rm/interactive-always.sh               |   2 +-
 tests/rm/interactive-once.sh                 |   2 +-
 tests/rm/ir-1.sh                             |   2 +-
 tests/rm/isatty.sh                           |   2 +-
 tests/rm/many-dir-entries-vs-OOM.sh          |   2 +-
 tests/rm/no-give-up.sh                       |   2 +-
 tests/rm/one-file-system.sh                  |   4 +-
 tests/rm/one-file-system2.sh                 |   2 +-
 tests/rm/r-1.sh                              |   2 +-
 tests/rm/r-2.sh                              |   2 +-
 tests/rm/r-3.sh                              |   2 +-
 tests/rm/r-4.sh                              |   2 +-
 tests/rm/read-only.sh                        |   2 +-
 tests/rm/readdir-bug.sh                      |   2 +-
 tests/rm/rm1.sh                              |   2 +-
 tests/rm/rm2.sh                              |   2 +-
 tests/rm/rm3.sh                              |   2 +-
 tests/rm/rm4.sh                              |   2 +-
 tests/rm/rm5.sh                              |   2 +-
 tests/rm/sunos-1.sh                          |   2 +-
 tests/rm/unread2.sh                          |   2 +-
 tests/rm/unread3.sh                          |   2 +-
 tests/rm/v-slash.sh                          |   2 +-
 tests/rmdir/fail-perm.sh                     |   2 +-
 tests/rmdir/ignore.sh                        |   2 +-
 tests/rmdir/t-slash.sh                       |   2 +-
 tests/sample-test                            |   4 +-
 tests/split/additional-suffix.sh             |   2 +-
 tests/split/b-chunk.sh                       |   2 +-
 tests/split/fail.sh                          |   2 +-
 tests/split/filter.sh                        |   2 +-
 tests/split/guard-input.sh                   |   2 +-
 tests/split/l-chunk.sh                       |   2 +-
 tests/split/lines.sh                         |   2 +-
 tests/split/numeric.sh                       |   2 +-
 tests/split/r-chunk.sh                       |   2 +-
 tests/split/suffix-auto-length.sh            |   2 +-
 tests/split/suffix-length.sh                 |   2 +-
 tests/tail-2/F-vs-missing.sh                 |   2 +-
 tests/tail-2/F-vs-rename.sh                  |   2 +-
 tests/tail-2/append-only.sh                  |   2 +-
 tests/tail-2/assert-2.sh                     |   2 +-
 tests/tail-2/assert.sh                       |   2 +-
 tests/tail-2/big-4gb.sh                      |   2 +-
 tests/tail-2/flush-initial.sh                |   2 +-
 tests/tail-2/follow-name.sh                  |   2 +-
 tests/tail-2/follow-stdin.sh                 |   2 +-
 tests/tail-2/infloop-1.sh                    |   2 +-
 tests/tail-2/inotify-hash-abuse.sh           |   2 +-
 tests/tail-2/inotify-hash-abuse2.sh          |   2 +-
 tests/tail-2/inotify-race.sh                 |   2 +-
 tests/tail-2/inotify-rotate.sh               |   2 +-
 tests/tail-2/pid.sh                          |   2 +-
 tests/tail-2/pipe-f.sh                       |   2 +-
 tests/tail-2/pipe-f2.sh                      |   2 +-
 tests/tail-2/proc-ksyms.sh                   |   2 +-
 tests/tail-2/start-middle.sh                 |   2 +-
 tests/tail-2/tail-n0f.sh                     |   2 +-
 tests/tail-2/wait.sh                         |   2 +-
 tests/touch/60-seconds.sh                    |   2 +-
 tests/touch/dangling-symlink.sh              |   2 +-
 tests/touch/dir-1.sh                         |   2 +-
 tests/touch/empty-file.sh                    |   2 +-
 tests/touch/fail-diag.sh                     |   2 +-
 tests/touch/fifo.sh                          |   2 +-
 tests/touch/no-create-missing.sh             |   2 +-
 tests/touch/no-dereference.sh                |   2 +-
 tests/touch/no-rights.sh                     |   2 +-
 tests/touch/not-owner.sh                     |   2 +-
 tests/touch/now-owned-by-other.sh            |   2 +-
 tests/touch/obsolescent.sh                   |   2 +-
 tests/touch/read-only.sh                     |   2 +-
 tests/touch/relative.sh                      |   2 +-
 tests/touch/trailing-slash.sh                |   2 +-
 442 files changed, 1264 insertions(+), 1274 deletions(-)
 rename tests/init.cfg => init.cfg (99%)
 delete mode 100644 tests/Makefile.am
 create mode 100644 tests/local.mk

diff --git a/Makefile.am b/Makefile.am
index 8ae8650..4999ca1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
 
 ALL_RECURSIVE_TARGETS =
 
-SUBDIRS = lib po . tests gnulib-tests
+SUBDIRS = lib po . gnulib-tests
 
 changelog_etc =                                \
   ChangeLog-2005                       \
@@ -72,11 +72,6 @@ $(srcdir)/src/cu-progs.mk: $(gen_progs_lists)
 
 ACLOCAL_AMFLAGS = -I m4
 
-# Some tests always need root privileges, others need them only sometimes.
-ALL_RECURSIVE_TARGETS += check-root
-check-root:
-       cd tests && $(MAKE) $@ SUBDIRS=
-
 # Shortcut targets to make it easier to run (very) expensive tests.
 check-expensive:
        $(MAKE) check RUN_EXPENSIVE_TESTS=yes
@@ -184,3 +179,4 @@ check-git-hook-script-sync:
 include $(top_srcdir)/src/local.mk
 include $(top_srcdir)/doc/local.mk
 include $(top_srcdir)/man/local.mk
+include $(top_srcdir)/tests/local.mk
diff --git a/configure.ac b/configure.ac
index c06c232..000fe18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -479,7 +479,6 @@ AC_CONFIG_FILES(
   Makefile
   lib/Makefile
   po/Makefile.in
-  tests/Makefile
   gnulib-tests/Makefile
   )
 AC_OUTPUT
diff --git a/tests/init.cfg b/init.cfg
similarity index 99%
rename from tests/init.cfg
rename to init.cfg
index f223f13..7edfd0f 100644
--- a/tests/init.cfg
+++ b/init.cfg
@@ -15,7 +15,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-
 # This goes hand in hand with the "exec 9>&2;" in tests/Makefile.am's
 # TESTS_ENVIRONMENT definition.
 stderr_fileno_=9
@@ -399,7 +398,7 @@ fiemap_capable_()
     warn_ 'fiemap_capable_: python missing: assuming not fiemap capable'
     return 1
   fi
-  python $abs_srcdir/fiemap-capable "$@"
+  python $abs_srcdir/tests/fiemap-capable "$@"
 }
 
 # Skip the current test if "." lacks d_type support.
@@ -414,7 +413,7 @@ require_dirent_d_type_()
   df -x xfs . > /dev/null 2>&1 \
     || skip_ requires d_type support
 
-  python $abs_srcdir/d_type-check \
+  python $abs_srcdir/tests/d_type-check \
     || skip_ requires d_type support
 }
 
diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm
index a0c1bba..340d110 100644
--- a/tests/Coreutils.pm
+++ b/tests/Coreutils.pm
@@ -33,7 +33,7 @@ my @Types = qw (IN IN_PIPE OUT ERR AUX CMP EXIT PRE POST 
OUT_SUBST
 my %Types = map {$_ => 1} @Types;
 my %Zero_one_type = map {$_ => 1}
    qw (OUT ERR EXIT PRE POST OUT_SUBST ERR_SUBST ENV);
-my $srcdir = $ENV{srcdir};
+my $srcdir = "$ENV{srcdir}";
 my $Global_count = 1;
 
 # When running in a DJGPP environment, make $ENV{SHELL} point to bash.
@@ -46,7 +46,7 @@ defined $ENV{DJDIR}
 # ================
 # 'contents'               contents only (file name is derived from test name)
 # {filename => 'contents'} filename and contents
-# {filename => undef}      filename only -- $(srcdir)/filename must exist
+# {filename => undef}      filename only -- $(srcdir)/tests/filename must exist
 #
 # FIXME: If there is more than one input file, then you can't specify 'REDIR'.
 # PIPE is still ok.
@@ -185,7 +185,7 @@ sub _process_file_spec ($$$$$)
       # FIXME: put $srcdir in here somewhere
       warn "$program_name: $test_name: specified file '$file' does"
         . " not exist\n"
-          if ! -f "$srcdir/$file";
+          if ! -f "$srcdir/tests/$file";
     }
 
   return $file;
diff --git a/tests/Makefile.am b/tests/Makefile.am
deleted file mode 100644
index 36d32e1..0000000
--- a/tests/Makefile.am
+++ /dev/null
@@ -1,805 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
-
-## Copyright (C) 2007-2012 Free Software Foundation, Inc.
-
-## This 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/>.
-
-# Indirections required so that we'll still be able to know the
-# complete list of our tests even if the user override TESTS from the
-# command line (which he's allowed to do by the test harness API).
-TESTS = $(all_tests)
-root_tests = $(all_root_tests)
-
-# Ensure that all version-controlled filestable files are listed
-# in $(all_tests).
-vc_exe_in_TESTS:
-       $(AM_V_GEN)test -d $(top_srcdir)/.git || exit 1;                \
-       bs="\\";                                                        \
-       test_extensions_rx=`echo $(TEST_EXTENSIONS)                     \
-         | sed -e "s/ /|/g" -e "s/$$bs./$$bs$$bs./g"`;                 \
-       {                                                               \
-         for t in $(all_tests); do echo $$t; done;                     \
-         cd $(top_srcdir);                                             \
-         $(SHELL) build-aux/vc-list-files $(subdir)                    \
-           | sed 's!^$(subdir)/!!' | grep -v '^init\.sh$$'             \
-           | $(EGREP) "$$test_extensions_rx\$$";                       \
-       } | sort | uniq -u | grep . && exit 1; :
-
-check-local: vc_exe_in_TESTS
-.PHONY: vc_exe_in_TESTS
-
-TEST_EXTENSIONS = .sh .pl .xpl
-
-if HAVE_PERL
-TESTSUITE_PERL = $(PERL)
-else
-TESTSUITE_PERL = $(SHELL) $(srcdir)/no-perl
-endif
-
-# Options passed to the perl invocations running the perl test scripts.
-TESTSUITE_PERL_OPTIONS = -w -I$(srcdir) -MCoreutils -MCuSkip
-# '$f' is set by the Automake-generated test harness to the path of the
-# current test script stripped of VPATH components, and is used by the
-# CuTmpdir module to determine the name of the temporary files to be
-# used.  Note that $f is a shell variable, not a make macro, so the use
-# of '$$f' below is correct, and not a typo.
-TESTSUITE_PERL_OPTIONS += -M"CuTmpdir qw($$f)"
-
-SH_LOG_COMPILER = $(SHELL)
-PL_LOG_COMPILER = $(TESTSUITE_PERL) $(TESTSUITE_PERL_OPTIONS)
-# Perl scripts that must be run in tainted mode.
-XPL_LOG_COMPILER = $(TESTSUITE_PERL) -T $(TESTSUITE_PERL_OPTIONS)
-
-# Note that the first lines are statements.  They ensure that environment
-# variables that can perturb tests are unset or set to expected values.
-# The rest are envvar settings that propagate build-related Makefile
-# variables to test scripts.
-AM_TESTS_ENVIRONMENT =                         \
-  . $(srcdir)/lang-default;                    \
-  tmp__=$${TMPDIR-/tmp};                       \
-  test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;   \
-  . $(srcdir)/envvar-check;                    \
-  TMPDIR=$$tmp__; export TMPDIR;               \
-  export                                       \
-  VERSION='$(VERSION)'                         \
-  LOCALE_FR='$(LOCALE_FR)'                     \
-  LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'           \
-  abs_top_builddir='$(abs_top_builddir)'       \
-  abs_top_srcdir='$(abs_top_srcdir)'           \
-  abs_srcdir='$(abs_srcdir)'                   \
-  built_programs='$(built_programs)'           \
-  host_os=$(host_os)                           \
-  host_triplet='$(host_triplet)'               \
-  srcdir='$(srcdir)'                           \
-  top_srcdir='$(top_srcdir)'                   \
-  CONFIG_HEADER='$(abs_top_builddir)/$(CONFIG_INCLUDE)' \
-  CU_TEST_NAME=`basename '$(abs_srcdir)'`,`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
-  CC='$(CC)'                                   \
-  AWK='$(AWK)'                                 \
-  EGREP='$(EGREP)'                             \
-  EXEEXT='$(EXEEXT)'                           \
-  MAKE=$(MAKE)                                 \
-  PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'     \
-  PACKAGE_VERSION=$(PACKAGE_VERSION)           \
-  PERL='$(PERL)'                               \
-  PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
-  ; test -d /usr/xpg4/bin && PATH='/usr/xpg4/bin$(PATH_SEPARATOR)'"$$PATH"; \
-  PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
-  ; 9>&2
-
-# On failure, display the global testsuite log on stdout.
-VERBOSE = yes
-
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
-
-EXTRA_DIST =           \
-  Coreutils.pm         \
-  CuSkip.pm            \
-  CuTmpdir.pm          \
-  d_type-check         \
-  envvar-check         \
-  filefrag-extent-compare \
-  fiemap-capable       \
-  init.cfg             \
-  init.sh              \
-  lang-default         \
-  no-perl              \
-  other-fs-tmpdir      \
-  sample-test          \
-  $(pr_data)
-
-all_root_tests =                               \
-  chown/basic.sh                               \
-  cp/cp-a-selinux.sh                           \
-  cp/preserve-gid.sh                           \
-  cp/special-bits.sh                           \
-  cp/cp-mv-enotsup-xattr.sh                    \
-  cp/capability.sh                             \
-  cp/sparse-fiemap.sh                          \
-  dd/skip-seek-past-dev.sh                     \
-  df/problematic-chars.sh                      \
-  du/bind-mount-dir-cycle.sh                   \
-  install/install-C-root.sh                    \
-  ls/capability.sh                             \
-  ls/nameless-uid.sh                           \
-  misc/chcon.sh                                        \
-  misc/chroot-credentials.sh                   \
-  misc/id-setgid.sh                            \
-  misc/selinux.sh                              \
-  misc/truncate-owned-by-other.sh              \
-  mkdir/writable-under-readonly.sh             \
-  mv/sticky-to-xpart.sh                                \
-  rm/fail-2eperm.sh                            \
-  rm/no-give-up.sh                             \
-  rm/one-file-system.sh                                \
-  rm/read-only.sh                              \
-  tail-2/append-only.sh                                \
-  touch/now-owned-by-other.sh
-
-.PHONY: check-root
-check-root:
-       $(MAKE) check TESTS='$(root_tests)'
-
-EXTRA_DIST += $(all_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.
-
-# Notes on the ordering of these tests:
-# Place early in the list tests of the tools that
-# are most commonly used in test scripts themselves.
-# E.g., nearly every test script uses rm and chmod.
-# help-version comes early because it's a basic sanity test.
-# Put seq early, since lots of other tests use it.
-# Put tests that sleep early, but not all together, so in parallel builds
-# they share time with tests that burn CPU, not with others that sleep.
-# Put head-elide-tail early, because it's long-running.
-
-all_tests =                                    \
-  misc/help-version.sh                         \
-  tail-2/inotify-race.sh                       \
-  misc/invalid-opt.pl                          \
-  rm/ext3-perf.sh                              \
-  rm/cycle.sh                                  \
-  cp/link-heap.sh                              \
-  misc/tty-eof.pl                              \
-  tail-2/inotify-hash-abuse.sh                 \
-  tail-2/inotify-hash-abuse2.sh                        \
-  tail-2/F-vs-missing.sh                       \
-  tail-2/F-vs-rename.sh                                \
-  tail-2/inotify-rotate.sh                     \
-  chmod/no-x.sh                                        \
-  chgrp/basic.sh                               \
-  rm/dangling-symlink.sh                       \
-  misc/ls-time.sh                              \
-  rm/d-1.sh                                    \
-  rm/d-2.sh                                    \
-  rm/d-3.sh                                    \
-  rm/deep-1.sh                                 \
-  rm/deep-2.sh                                 \
-  rm/dir-no-w.sh                               \
-  rm/dir-nonrecur.sh                           \
-  rm/dot-rel.sh                                        \
-  rm/isatty.sh                                 \
-  rm/empty-inacc.sh                            \
-  rm/empty-name.pl                             \
-  rm/f-1.sh                                    \
-  rm/fail-eacces.sh                            \
-  rm/fail-eperm.xpl                            \
-  tail-2/assert.sh                             \
-  rm/hash.sh                                   \
-  rm/i-1.sh                                    \
-  rm/i-never.sh                                        \
-  rm/i-no-r.sh                                 \
-  tail-2/infloop-1.sh                          \
-  rm/ignorable.sh                              \
-  rm/inaccessible.sh                           \
-  rm/interactive-always.sh                     \
-  rm/interactive-once.sh                       \
-  rm/ir-1.sh                                   \
-  rm/one-file-system2.sh                       \
-  rm/r-1.sh                                    \
-  rm/r-2.sh                                    \
-  rm/r-3.sh                                    \
-  rm/r-4.sh                                    \
-  rm/readdir-bug.sh                            \
-  rm/rm1.sh                                    \
-  touch/empty-file.sh                          \
-  rm/rm2.sh                                    \
-  rm/rm3.sh                                    \
-  rm/rm4.sh                                    \
-  rm/rm5.sh                                    \
-  rm/sunos-1.sh                                        \
-  rm/unread2.sh                                        \
-  rm/unread3.sh                                        \
-  rm/unreadable.pl                             \
-  rm/v-slash.sh                                        \
-  rm/many-dir-entries-vs-OOM.sh                        \
-  chgrp/default-no-deref.sh                    \
-  chgrp/deref.sh                               \
-  chgrp/no-x.sh                                        \
-  chgrp/posix-H.sh                             \
-  chgrp/recurse.sh                             \
-  fmt/base.pl                                  \
-  fmt/long-line.sh                             \
-  fmt/goal-option.sh                           \
-  misc/env.sh                                  \
-  misc/ptx.pl                                  \
-  misc/test.pl                                 \
-  misc/seq.pl                                  \
-  misc/seq-long-double.sh                      \
-  misc/head.pl                                 \
-  misc/head-elide-tail.pl                      \
-  tail-2/tail-n0f.sh                           \
-  misc/ls-misc.pl                              \
-  misc/date.pl                                 \
-  misc/date-next-dow.pl                                \
-  misc/ptx-overrun.sh                          \
-  misc/xstrtol.pl                              \
-  tail-2/pid.sh                                        \
-  misc/od.pl                                   \
-  misc/od-float.sh                             \
-  misc/mktemp.pl                               \
-  misc/arch.sh                                 \
-  misc/pr.pl                                   \
-  misc/join.pl                                 \
-  pr/pr-tests.pl                               \
-  misc/pwd-option.sh                           \
-  misc/chcon-fail.sh                           \
-  misc/cut.pl                                  \
-  misc/wc.pl                                   \
-  misc/wc-files0-from.pl                       \
-  misc/wc-files0.sh                            \
-  misc/wc-parallel.sh                          \
-  misc/cat-proc.sh                             \
-  misc/cat-buf.sh                              \
-  misc/base64.pl                               \
-  misc/basename.pl                             \
-  misc/close-stdout.sh                         \
-  misc/chroot-fail.sh                          \
-  misc/comm.pl                                 \
-  misc/csplit.sh                               \
-  misc/csplit-1000.sh                          \
-  misc/csplit-heap.sh                          \
-  misc/date-sec.sh                             \
-  misc/dircolors.pl                            \
-  misc/dirname.pl                              \
-  misc/env-null.sh                             \
-  misc/expand.pl                               \
-  misc/expr.pl                                 \
-  misc/factor.pl                               \
-  misc/false-status.sh                         \
-  misc/fold.pl                                 \
-  misc/groups-dash.sh                          \
-  misc/groups-version.sh                       \
-  misc/head-c.sh                               \
-  misc/head-pos.sh                             \
-  misc/id-context.sh                           \
-  misc/id-groups.sh                            \
-  misc/id-setgid.sh                            \
-  misc/md5sum.pl                               \
-  misc/md5sum-bsd.sh                           \
-  misc/md5sum-newline.pl                       \
-  misc/md5sum-parallel.sh                      \
-  misc/mknod.sh                                        \
-  misc/nice.sh                                 \
-  misc/nice-fail.sh                            \
-  misc/nl.sh                                   \
-  misc/nohup.sh                                        \
-  misc/nproc-avail.sh                          \
-  misc/nproc-positive.sh                       \
-  misc/od-N.sh                                 \
-  misc/od-multiple-t.sh                                \
-  misc/od-x8.sh                                        \
-  misc/paste.pl                                        \
-  misc/pathchk1.sh                             \
-  misc/printenv.sh                             \
-  misc/printf.sh                               \
-  misc/printf-cov.pl                           \
-  misc/printf-hex.sh                           \
-  misc/printf-surprise.sh                      \
-  misc/pwd-long.sh                             \
-  misc/readlink-fp-loop.sh                     \
-  misc/readlink-root.sh                                \
-  misc/realpath.sh                             \
-  misc/runcon-no-reorder.sh                    \
-  misc/sha1sum.pl                              \
-  misc/sha1sum-vec.pl                          \
-  misc/sha224sum.pl                            \
-  misc/sha256sum.pl                            \
-  misc/sha384sum.pl                            \
-  misc/sha512sum.pl                            \
-  misc/shred-exact.sh                          \
-  misc/shred-passes.sh                         \
-  misc/shred-remove.sh                         \
-  misc/shuf.sh                                 \
-  misc/sort.pl                                 \
-  misc/sort-benchmark-random.sh                        \
-  misc/sort-compress.sh                                \
-  misc/sort-compress-hang.sh                   \
-  misc/sort-compress-proc.sh                   \
-  misc/sort-continue.sh                                \
-  misc/sort-debug-keys.sh                      \
-  misc/sort-debug-warn.sh                      \
-  misc/sort-discrim.sh                         \
-  misc/sort-files0-from.pl                     \
-  misc/sort-float.sh                           \
-  misc/sort-merge.pl                           \
-  misc/sort-merge-fdlimit.sh                   \
-  misc/sort-month.sh                           \
-  misc/sort-exit-early.sh                      \
-  misc/sort-rand.sh                            \
-  misc/sort-spinlock-abuse.sh                  \
-  misc/sort-stale-thread-mem.sh                        \
-  misc/sort-unique.sh                          \
-  misc/sort-unique-segv.sh                     \
-  misc/sort-version.sh                         \
-  misc/sort-NaN-infloop.sh                     \
-  misc/sort-u-FMR.sh                           \
-  split/filter.sh                              \
-  split/suffix-auto-length.sh                  \
-  split/suffix-length.sh                       \
-  split/additional-suffix.sh                   \
-  split/b-chunk.sh                             \
-  split/fail.sh                                        \
-  split/lines.sh                               \
-  split/l-chunk.sh                             \
-  split/r-chunk.sh                             \
-  split/numeric.sh                             \
-  split/guard-input.sh                         \
-  misc/stat-birthtime.sh                       \
-  misc/stat-fmt.sh                             \
-  misc/stat-hyphen.sh                          \
-  misc/stat-mount.sh                           \
-  misc/stat-nanoseconds.sh                     \
-  misc/stat-printf.pl                          \
-  misc/stat-slash.sh                           \
-  misc/stdbuf.sh                               \
-  misc/stty.sh                                 \
-  misc/stty-invalid.sh                         \
-  misc/stty-pairs.sh                           \
-  misc/stty-row-col.sh                         \
-  misc/sum.pl                                  \
-  misc/sum-sysv.sh                             \
-  misc/tac.pl                                  \
-  misc/tac-continue.sh                         \
-  misc/tac-2-nonseekable.sh                    \
-  misc/tail.pl                                 \
-  misc/tee.sh                                  \
-  misc/tee-dash.sh                             \
-  misc/test-diag.pl                            \
-  misc/timeout.sh                              \
-  misc/timeout-group.sh                                \
-  misc/timeout-parameters.sh                   \
-  misc/tr.pl                                   \
-  misc/tr-case-class.sh                                \
-  misc/truncate-dangling-symlink.sh            \
-  misc/truncate-dir-fail.sh                    \
-  misc/truncate-fail-diag.sh                   \
-  misc/truncate-fifo.sh                                \
-  misc/truncate-no-create-missing.sh           \
-  misc/truncate-overflow.sh                    \
-  misc/truncate-parameters.sh                  \
-  misc/truncate-relative.sh                    \
-  misc/tsort.pl                                        \
-  misc/unexpand.pl                             \
-  misc/uniq.pl                                 \
-  misc/uniq-perf.sh                            \
-  misc/xattr.sh                                        \
-  tail-2/wait.sh                               \
-  chmod/c-option.sh                            \
-  chmod/equal-x.sh                             \
-  chmod/equals.sh                              \
-  chmod/inaccessible.sh                                \
-  chmod/octal.sh                               \
-  chmod/setgid.sh                              \
-  chmod/silent.sh                              \
-  chmod/thru-dangling.sh                       \
-  chmod/umask-x.sh                             \
-  chmod/usage.sh                               \
-  chown/deref.sh                               \
-  chown/preserve-root.sh                       \
-  chown/separator.sh                           \
-  cp/abuse.sh                                  \
-  cp/acl.sh                                    \
-  cp/attr-existing.sh                          \
-  cp/backup-1.sh                               \
-  cp/backup-dir.sh                             \
-  cp/backup-is-src.sh                          \
-  cp/cp-HL.sh                                  \
-  cp/cp-deref.sh                               \
-  cp/cp-i.sh                                   \
-  cp/cp-mv-backup.sh                           \
-  cp/cp-parents.sh                             \
-  cp/deref-slink.sh                            \
-  cp/dir-rm-dest.sh                            \
-  cp/dir-slash.sh                              \
-  cp/dir-vs-file.sh                            \
-  cp/existing-perm-dir.sh                      \
-  cp/existing-perm-race.sh                     \
-  cp/fail-perm.sh                              \
-  cp/fiemap-empty.sh                           \
-  cp/fiemap-perf.sh                            \
-  cp/fiemap-2.sh                               \
-  cp/file-perm-race.sh                         \
-  cp/into-self.sh                              \
-  cp/link.sh                                   \
-  cp/link-no-deref.sh                          \
-  cp/link-preserve.sh                          \
-  cp/link-symlink.sh                           \
-  cp/nfs-removal-race.sh                       \
-  cp/no-deref-link1.sh                         \
-  cp/no-deref-link2.sh                         \
-  cp/no-deref-link3.sh                         \
-  cp/parent-perm.sh                            \
-  cp/parent-perm-race.sh                       \
-  cp/perm.sh                                   \
-  cp/preserve-2.sh                             \
-  cp/preserve-link.sh                          \
-  cp/preserve-slink-time.sh                    \
-  cp/proc-short-read.sh                                \
-  cp/proc-zero-len.sh                          \
-  cp/r-vs-symlink.sh                           \
-  cp/reflink-auto.sh                           \
-  cp/reflink-perm.sh                           \
-  cp/same-file.sh                              \
-  cp/slink-2-slink.sh                          \
-  cp/sparse.sh                                 \
-  cp/sparse-to-pipe.sh                         \
-  cp/special-f.sh                              \
-  cp/src-base-dot.sh                           \
-  cp/symlink-slash.sh                          \
-  cp/thru-dangling.sh                          \
-  df/header.sh                                 \
-  df/df-P.sh                                   \
-  df/unreadable.sh                             \
-  df/total-unprocessed.sh                      \
-  df/no-mtab-status.sh                         \
-  dd/direct.sh                                 \
-  dd/misc.sh                                   \
-  dd/nocache.sh                                        \
-  dd/not-rewound.sh                            \
-  dd/reblock.sh                                        \
-  dd/skip-seek.pl                              \
-  dd/skip-seek2.sh                             \
-  dd/bytes.sh                                  \
-  dd/skip-seek-past-file.sh                    \
-  dd/sparse.sh                                 \
-  dd/stderr.sh                                 \
-  dd/unblock.pl                                        \
-  dd/unblock-sync.sh                           \
-  df/total-verify.sh                           \
-  du/2g.sh                                     \
-  du/8gb.sh                                    \
-  du/basic.sh                                  \
-  du/bigtime.sh                                        \
-  du/deref.sh                                  \
-  du/deref-args.sh                             \
-  du/exclude.sh                                        \
-  du/fd-leak.sh                                        \
-  du/files0-from.pl                            \
-  du/files0-from-dir.sh                                \
-  du/hard-link.sh                              \
-  du/inacc-dest.sh                             \
-  du/inacc-dir.sh                              \
-  du/inaccessible-cwd.sh                       \
-  du/long-from-unreadable.sh                   \
-  du/long-sloop.sh                             \
-  du/max-depth.sh                              \
-  du/move-dir-while-traversing.sh              \
-  du/no-deref.sh                               \
-  du/no-x.sh                                   \
-  du/one-file-system.sh                                \
-  du/restore-wd.sh                             \
-  du/slash.sh                                  \
-  du/slink.sh                                  \
-  du/trailing-slash.sh                         \
-  du/two-args.sh                               \
-  id/gnu-zero-uids.sh                          \
-  id/no-context.sh                             \
-  install/basic-1.sh                           \
-  install/create-leading.sh                    \
-  install/d-slashdot.sh                                \
-  install/install-C.sh                         \
-  install/install-C-selinux.sh                 \
-  install/strip-program.sh                     \
-  install/trap.sh                              \
-  ln/backup-1.sh                               \
-  ln/hard-backup.sh                            \
-  ln/hard-to-sym.sh                            \
-  ln/misc.sh                                   \
-  ln/relative.sh                               \
-  ln/sf-1.sh                                   \
-  ln/slash-decorated-nonexistent-dest.sh       \
-  ln/target-1.sh                               \
-  ls/abmon-align.sh                            \
-  ls/block-size.sh                             \
-  ls/color-clear-to-eol.sh                     \
-  ls/color-dtype-dir.sh                                \
-  ls/color-norm.sh                             \
-  ls/dangle.sh                                 \
-  ls/dired.sh                                  \
-  ls/file-type.sh                              \
-  ls/follow-slink.sh                           \
-  ls/getxattr-speedup.sh                       \
-  ls/infloop.sh                                        \
-  ls/inode.sh                                  \
-  ls/m-option.sh                               \
-  ls/multihardlink.sh                          \
-  ls/no-arg.sh                                 \
-  ls/no-cap.sh                                 \
-  ls/proc-selinux-segfault.sh                  \
-  ls/readdir-mountpoint-inode.sh               \
-  ls/recursive.sh                              \
-  ls/root-rel-symlink-color.sh                 \
-  ls/rt-1.sh                                   \
-  ls/slink-acl.sh                              \
-  ls/stat-dtype.sh                             \
-  ls/stat-failed.sh                            \
-  ls/stat-free-color.sh                                \
-  ls/stat-free-symlinks.sh                     \
-  ls/stat-vs-dirent.sh                         \
-  ls/symlink-slash.sh                          \
-  ls/time-style-diag.sh                                \
-  ls/x-option.sh                               \
-  mkdir/p-1.sh                                 \
-  mkdir/p-2.sh                                 \
-  mkdir/p-3.sh                                 \
-  mkdir/p-slashdot.sh                          \
-  mkdir/p-thru-slink.sh                                \
-  mkdir/p-v.sh                                 \
-  mkdir/parents.sh                             \
-  mkdir/perm.sh                                        \
-  mkdir/selinux.sh                             \
-  mkdir/special-1.sh                           \
-  mkdir/t-slash.sh                             \
-  mv/acl.sh                                    \
-  mv/atomic.sh                                 \
-  mv/atomic2.sh                                        \
-  mv/backup-dir.sh                             \
-  mv/backup-is-src.sh                          \
-  mv/childproof.sh                             \
-  mv/diag.sh                                   \
-  mv/dir-file.sh                               \
-  mv/dir2dir.sh                                        \
-  mv/dup-source.sh                             \
-  mv/force.sh                                  \
-  mv/hard-2.sh                                 \
-  mv/hard-3.sh                                 \
-  mv/hard-4.sh                                 \
-  mv/hard-link-1.sh                            \
-  mv/hard-verbose.sh                           \
-  mv/i-1.pl                                    \
-  mv/i-2.sh                                    \
-  mv/i-3.sh                                    \
-  mv/i-4.sh                                    \
-  mv/i-5.sh                                    \
-  mv/i-link-no.sh                              \
-  mv/into-self.sh                              \
-  mv/into-self-2.sh                            \
-  mv/into-self-3.sh                            \
-  mv/into-self-4.sh                            \
-  mv/leak-fd.sh                                        \
-  mv/mv-n.sh                                   \
-  mv/mv-special-1.sh                           \
-  mv/no-target-dir.sh                          \
-  mv/part-fail.sh                              \
-  mv/part-hardlink.sh                          \
-  mv/part-rename.sh                            \
-  mv/part-symlink.sh                           \
-  mv/partition-perm.sh                         \
-  mv/perm-1.sh                                 \
-  mv/symlink-onto-hardlink.sh                  \
-  mv/symlink-onto-hardlink-to-self.sh          \
-  mv/to-symlink.sh                             \
-  mv/trailing-slash.sh                         \
-  mv/update.sh                                 \
-  readlink/can-e.sh                            \
-  readlink/can-f.sh                            \
-  readlink/can-m.sh                            \
-  readlink/rl-1.sh                             \
-  rmdir/fail-perm.sh                           \
-  rmdir/ignore.sh                              \
-  rmdir/t-slash.sh                             \
-  tail-2/assert-2.sh                           \
-  tail-2/big-4gb.sh                            \
-  tail-2/flush-initial.sh                      \
-  tail-2/follow-name.sh                                \
-  tail-2/follow-stdin.sh                       \
-  tail-2/pipe-f.sh                             \
-  tail-2/pipe-f2.sh                            \
-  tail-2/proc-ksyms.sh                         \
-  tail-2/start-middle.sh                       \
-  touch/60-seconds.sh                          \
-  touch/dangling-symlink.sh                    \
-  touch/dir-1.sh                               \
-  touch/fail-diag.sh                           \
-  touch/fifo.sh                                        \
-  touch/no-create-missing.sh                   \
-  touch/no-dereference.sh                      \
-  touch/no-rights.sh                           \
-  touch/not-owner.sh                           \
-  touch/obsolescent.sh                         \
-  touch/read-only.sh                           \
-  touch/relative.sh                            \
-  touch/trailing-slash.sh                      \
-  $(all_root_tests)
-
-pr_data =                                      \
-  pr/0F                                                \
-  pr/0FF                                       \
-  pr/0FFnt                                     \
-  pr/0FFt                                      \
-  pr/0FnFnt                                    \
-  pr/0FnFt                                     \
-  pr/0Fnt                                      \
-  pr/0Ft                                       \
-  pr/2-S_f-t_notab                             \
-  pr/2-Sf-t_notab                              \
-  pr/2f-t_notab                                        \
-  pr/2s_f-t_notab                              \
-  pr/2s_w60f-t_nota                            \
-  pr/2sf-t_notab                               \
-  pr/2sw60f-t_notab                            \
-  pr/2w60f-t_notab                             \
-  pr/3-0F                                      \
-  pr/3-5l24f-t                                 \
-  pr/3-FF                                      \
-  pr/3a2l17-FF                                 \
-  pr/3a3f-0F                                   \
-  pr/3a3l15-t                                  \
-  pr/3a3l15f-t                                 \
-  pr/3b2l17-FF                                 \
-  pr/3b3f-0F                                   \
-  pr/3b3f-0FF                                  \
-  pr/3b3f-FF                                   \
-  pr/3b3l15-t                                  \
-  pr/3b3l15f-t                                 \
-  pr/3f-0F                                     \
-  pr/3f-FF                                     \
-  pr/3l24-t                                    \
-  pr/3l24f-t                                   \
-  pr/3ml24-FF                                  \
-  pr/3ml24-t                                   \
-  pr/3ml24-t-FF                                        \
-  pr/3ml24f-t                                  \
-  pr/4-7l24-FF                                 \
-  pr/4l24-FF                                   \
-  pr/FF                                                \
-  pr/FFn                                       \
-  pr/FFtn                                      \
-  pr/FnFn                                      \
-  pr/Ja3l24f-lm                                        \
-  pr/Jb3l24f-lm                                        \
-  pr/Jml24f-lm-lo                              \
-  pr/W-72l24f-ll                               \
-  pr/W20l24f-ll                                        \
-  pr/W26l24f-ll                                        \
-  pr/W27l24f-ll                                        \
-  pr/W28l24f-ll                                        \
-  pr/W35Ja3l24f-lm                             \
-  pr/W35Jb3l24f-lm                             \
-  pr/W35Jml24f-lmlo                            \
-  pr/W35a3l24f-lm                              \
-  pr/W35b3l24f-lm                              \
-  pr/W35ml24f-lm-lo                            \
-  pr/W72Jl24f-ll                               \
-  pr/a2l15-FF                                  \
-  pr/a2l17-FF                                  \
-  pr/a3-0F                                     \
-  pr/a3f-0F                                    \
-  pr/a3f-0FF                                   \
-  pr/a3f-FF                                    \
-  pr/a3l15-t                                   \
-  pr/a3l15f-t                                  \
-  pr/a3l24f-lm                                 \
-  pr/b2l15-FF                                  \
-  pr/b2l17-FF                                  \
-  pr/b3-0F                                     \
-  pr/b3f-0F                                    \
-  pr/b3f-0FF                                   \
-  pr/b3f-FF                                    \
-  pr/b3l15-t                                   \
-  pr/b3l15f-t                                  \
-  pr/b3l24f-lm                                 \
-  pr/l24-FF                                    \
-  pr/l24-t                                     \
-  pr/l24f-t                                    \
-  pr/loli                                      \
-  pr/ml20-FF-t                                 \
-  pr/ml24-FF                                   \
-  pr/ml24-t                                    \
-  pr/ml24-t-FF                                 \
-  pr/ml24f-0F                                  \
-  pr/ml24f-lm-lo                               \
-  pr/ml24f-t                                   \
-  pr/ml24f-t-0F                                        \
-  pr/n+2-5l24f-0FF                             \
-  pr/n+2l24f-0FF                               \
-  pr/n+2l24f-bl                                        \
-  pr/n+3-7l24-FF                               \
-  pr/n+3l24f-0FF                               \
-  pr/n+3l24f-bl                                        \
-  pr/n+3ml20f-bl-FF                            \
-  pr/n+3ml24f-bl-tn                            \
-  pr/n+3ml24f-tn-bl                            \
-  pr/n+4-8a2l17-FF                             \
-  pr/n+4b2l17f-0FF                             \
-  pr/n+5-8b3l17f-FF                            \
-  pr/n+5a3l13f-0FF                             \
-  pr/n+6a2l17-FF                               \
-  pr/n+6b3l13f-FF                              \
-  pr/n+7l24-FF                                 \
-  pr/n+8l20-FF                                 \
-  pr/nJml24f-lmlmlo                            \
-  pr/nJml24f-lmlolm                            \
-  pr/nN1+3l24f-bl                              \
-  pr/nN15l24f-bl                               \
-  pr/nSml20-bl-FF                              \
-  pr/nSml20-t-t-FF                             \
-  pr/nSml20-t-tFFFF                            \
-  pr/nSml24-bl-FF                              \
-  pr/nSml24-t-t-FF                             \
-  pr/nSml24-t-tFFFF                            \
-  pr/nl24f-bl                                  \
-  pr/o3Jml24f-lm-lo                            \
-  pr/o3a3Sl24f-tn                              \
-  pr/o3a3Snl24f-tn                             \
-  pr/o3a3l24f-tn                               \
-  pr/o3b3Sl24f-tn                              \
-  pr/o3b3Snl24f-tn                             \
-  pr/o3b3l24f-tn                               \
-  pr/o3mSl24f-bl-tn                            \
-  pr/o3mSnl24fbltn                             \
-  pr/o3ml24f-bl-tn                             \
-  pr/t-0FF                                     \
-  pr/t-FF                                      \
-  pr/t-bl                                      \
-  pr/t-t                                       \
-  pr/tFFn                                      \
-  pr/tFFt                                      \
-  pr/tFFt-bl                                   \
-  pr/tFFt-ll                                   \
-  pr/tFFt-lm                                   \
-  pr/tFnFt                                     \
-  pr/t_notab                                   \
-  pr/t_tab                                     \
-  pr/t_tab_                                    \
-  pr/ta3-0FF                                   \
-  pr/ta3-FF                                    \
-  pr/tb3-0FF                                   \
-  pr/tb3-FF                                    \
-  pr/tn                                                \
-  pr/tn2e5o3-t_tab                             \
-  pr/tn2e8-t_tab                               \
-  pr/tn2e8o3-t_tab                             \
-  pr/tn_2e8-t_tab                              \
-  pr/tn_2e8S-t_tab                             \
-  pr/tne8-t_tab                                        \
-  pr/tne8o3-t_tab                              \
-  pr/tt-0FF                                    \
-  pr/tt-FF                                     \
-  pr/tt-bl                                     \
-  pr/tt-t                                      \
-  pr/tta3-0FF                                  \
-  pr/tta3-FF                                   \
-  pr/ttb3-0FF                                  \
-  pr/ttb3-FF                                   \
-  pr/w72l24f-ll
diff --git a/tests/chgrp/basic.sh b/tests/chgrp/basic.sh
index 8ce2f2d..f2d6e1d 100755
--- a/tests/chgrp/basic.sh
+++ b/tests/chgrp/basic.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chgrp
 require_membership_in_two_groups_
 
diff --git a/tests/chgrp/default-no-deref.sh b/tests/chgrp/default-no-deref.sh
index 5d140a8..4469d61 100755
--- a/tests/chgrp/default-no-deref.sh
+++ b/tests/chgrp/default-no-deref.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chgrp
 require_membership_in_two_groups_
 
diff --git a/tests/chgrp/deref.sh b/tests/chgrp/deref.sh
index 4c186ee..9953112 100755
--- a/tests/chgrp/deref.sh
+++ b/tests/chgrp/deref.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chgrp
 require_membership_in_two_groups_
 
diff --git a/tests/chgrp/no-x.sh b/tests/chgrp/no-x.sh
index 6e9347f..2b2edc3 100755
--- a/tests/chgrp/no-x.sh
+++ b/tests/chgrp/no-x.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chgrp
 require_membership_in_two_groups_
 skip_if_root_
diff --git a/tests/chgrp/posix-H.sh b/tests/chgrp/posix-H.sh
index 3965f1f..9f7d780 100755
--- a/tests/chgrp/posix-H.sh
+++ b/tests/chgrp/posix-H.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chgrp
 require_membership_in_two_groups_
 
diff --git a/tests/chgrp/recurse.sh b/tests/chgrp/recurse.sh
index 95a910f..7861169 100755
--- a/tests/chgrp/recurse.sh
+++ b/tests/chgrp/recurse.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chgrp
 require_membership_in_two_groups_
 
diff --git a/tests/chmod/c-option.sh b/tests/chmod/c-option.sh
index 0fc8391..a7f01da 100755
--- a/tests/chmod/c-option.sh
+++ b/tests/chmod/c-option.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 
 umask 0
diff --git a/tests/chmod/equal-x.sh b/tests/chmod/equal-x.sh
index e2cac34..a15e581 100755
--- a/tests/chmod/equal-x.sh
+++ b/tests/chmod/equal-x.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 
 file=f
diff --git a/tests/chmod/equals.sh b/tests/chmod/equals.sh
index fd92055..6974ee5 100755
--- a/tests/chmod/equals.sh
+++ b/tests/chmod/equals.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 
 touch f || framework_failure_
diff --git a/tests/chmod/inaccessible.sh b/tests/chmod/inaccessible.sh
index c904068..37a28a8 100755
--- a/tests/chmod/inaccessible.sh
+++ b/tests/chmod/inaccessible.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 
 mkdir -p d/e || framework_failure_
diff --git a/tests/chmod/no-x.sh b/tests/chmod/no-x.sh
index e802b35..24a0b2f 100755
--- a/tests/chmod/no-x.sh
+++ b/tests/chmod/no-x.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 skip_if_root_
 
diff --git a/tests/chmod/octal.sh b/tests/chmod/octal.sh
index 845116b..a8ae555 100755
--- a/tests/chmod/octal.sh
+++ b/tests/chmod/octal.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 
 
diff --git a/tests/chmod/setgid.sh b/tests/chmod/setgid.sh
index 7fc6db2..6579e9c 100755
--- a/tests/chmod/setgid.sh
+++ b/tests/chmod/setgid.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 
 umask 0
diff --git a/tests/chmod/silent.sh b/tests/chmod/silent.sh
index 00e2348..f878765 100755
--- a/tests/chmod/silent.sh
+++ b/tests/chmod/silent.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chgrp chmod chown
 
 chmod -f 0   no-such 2> out && fail=1
diff --git a/tests/chmod/thru-dangling.sh b/tests/chmod/thru-dangling.sh
index 7812400..0dac1c2 100755
--- a/tests/chmod/thru-dangling.sh
+++ b/tests/chmod/thru-dangling.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 
 ln -s non-existent dangle || framework_failure_
diff --git a/tests/chmod/umask-x.sh b/tests/chmod/umask-x.sh
index dc133e1..80ca018 100755
--- a/tests/chmod/umask-x.sh
+++ b/tests/chmod/umask-x.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 
 touch file
diff --git a/tests/chmod/usage.sh b/tests/chmod/usage.sh
index 9dd65f7..e556a9d 100755
--- a/tests/chmod/usage.sh
+++ b/tests/chmod/usage.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chmod
 
 
diff --git a/tests/chown/basic.sh b/tests/chown/basic.sh
index 6225400..5209415 100755
--- a/tests/chown/basic.sh
+++ b/tests/chown/basic.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chown
 require_root_
 
diff --git a/tests/chown/deref.sh b/tests/chown/deref.sh
index d42a054..76de4b5 100755
--- a/tests/chown/deref.sh
+++ b/tests/chown/deref.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chown
 
 ln -s no-such dangle || framework_failure_
diff --git a/tests/chown/preserve-root.sh b/tests/chown/preserve-root.sh
index ffad222..edeb566 100755
--- a/tests/chown/preserve-root.sh
+++ b/tests/chown/preserve-root.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chown
 skip_if_root_
 
diff --git a/tests/chown/separator.sh b/tests/chown/separator.sh
index d4264a8..132d8e9 100755
--- a/tests/chown/separator.sh
+++ b/tests/chown/separator.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chown
 
 id_u=$(id -u) || framework_failure_
diff --git a/tests/cp/abuse.sh b/tests/cp/abuse.sh
index 6338e1f..5f00550 100755
--- a/tests/cp/abuse.sh
+++ b/tests/cp/abuse.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir a b c || framework_failure_
diff --git a/tests/cp/acl.sh b/tests/cp/acl.sh
index 4520fc9..801d124 100755
--- a/tests/cp/acl.sh
+++ b/tests/cp/acl.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp getfacl setfacl
 
 require_acl_
diff --git a/tests/cp/attr-existing.sh b/tests/cp/attr-existing.sh
index 9cf0ffc..4517841 100755
--- a/tests/cp/attr-existing.sh
+++ b/tests/cp/attr-existing.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 printf '1' > file1
diff --git a/tests/cp/backup-1.sh b/tests/cp/backup-1.sh
index c7ece5f..c79bc26 100755
--- a/tests/cp/backup-1.sh
+++ b/tests/cp/backup-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 suffix=.b
diff --git a/tests/cp/backup-dir.sh b/tests/cp/backup-dir.sh
index bc05bd9..5f2658c 100755
--- a/tests/cp/backup-dir.sh
+++ b/tests/cp/backup-dir.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir x y || framework_failure_
diff --git a/tests/cp/backup-is-src.sh b/tests/cp/backup-is-src.sh
index 98e2ed0..d349527 100755
--- a/tests/cp/backup-is-src.sh
+++ b/tests/cp/backup-is-src.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 echo a > a || framework_failure_
diff --git a/tests/cp/capability.sh b/tests/cp/capability.sh
index 94e5aea..b9e7612 100755
--- a/tests/cp/capability.sh
+++ b/tests/cp/capability.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 require_root_
 working_umask_or_skip_
diff --git a/tests/cp/cp-HL.sh b/tests/cp/cp-HL.sh
index bbbd75a..d1ccfd0 100755
--- a/tests/cp/cp-HL.sh
+++ b/tests/cp/cp-HL.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir src-dir dest-dir || framework_failure_
diff --git a/tests/cp/cp-a-selinux.sh b/tests/cp/cp-a-selinux.sh
index b852984..f398ffb 100755
--- a/tests/cp/cp-a-selinux.sh
+++ b/tests/cp/cp-a-selinux.sh
@@ -19,7 +19,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 require_root_
 require_selinux_
diff --git a/tests/cp/cp-deref.sh b/tests/cp/cp-deref.sh
index 08a1485..4d62e86 100755
--- a/tests/cp/cp-deref.sh
+++ b/tests/cp/cp-deref.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir a b c d || framework_failure_
diff --git a/tests/cp/cp-i.sh b/tests/cp/cp-i.sh
index 746dc27..16c80ee 100755
--- a/tests/cp/cp-i.sh
+++ b/tests/cp/cp-i.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir -p a b/a/c || framework_failure_
diff --git a/tests/cp/cp-mv-backup.sh b/tests/cp/cp-mv-backup.sh
index 030f722..85812b5 100755
--- a/tests/cp/cp-mv-backup.sh
+++ b/tests/cp/cp-mv-backup.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 umask 022
diff --git a/tests/cp/cp-mv-enotsup-xattr.sh b/tests/cp/cp-mv-enotsup-xattr.sh
index 66e54cf..2318cc2 100755
--- a/tests/cp/cp-mv-enotsup-xattr.sh
+++ b/tests/cp/cp-mv-enotsup-xattr.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp mv
 
 require_root_
diff --git a/tests/cp/cp-parents.sh b/tests/cp/cp-parents.sh
index 506e708..97a8c9e 100755
--- a/tests/cp/cp-parents.sh
+++ b/tests/cp/cp-parents.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 working_umask_or_skip_
diff --git a/tests/cp/deref-slink.sh b/tests/cp/deref-slink.sh
index 93f5cb8..9a96c48 100755
--- a/tests/cp/deref-slink.sh
+++ b/tests/cp/deref-slink.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 touch f slink-target || framework_failure_
diff --git a/tests/cp/dir-rm-dest.sh b/tests/cp/dir-rm-dest.sh
index b2f0e72..046e8d2 100755
--- a/tests/cp/dir-rm-dest.sh
+++ b/tests/cp/dir-rm-dest.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir d e || framework_failure_
diff --git a/tests/cp/dir-slash.sh b/tests/cp/dir-slash.sh
index b14aad8..846d8e5 100755
--- a/tests/cp/dir-slash.sh
+++ b/tests/cp/dir-slash.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir dir1 dir2 || framework_failure_
diff --git a/tests/cp/dir-vs-file.sh b/tests/cp/dir-vs-file.sh
index c8e388f..f2fa791 100755
--- a/tests/cp/dir-vs-file.sh
+++ b/tests/cp/dir-vs-file.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir dir || framework_failure_
diff --git a/tests/cp/existing-perm-dir.sh b/tests/cp/existing-perm-dir.sh
index 40b55a3..bd14ee9 100755
--- a/tests/cp/existing-perm-dir.sh
+++ b/tests/cp/existing-perm-dir.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 umask 002
diff --git a/tests/cp/existing-perm-race.sh b/tests/cp/existing-perm-race.sh
index 35c1556..b683d35 100755
--- a/tests/cp/existing-perm-race.sh
+++ b/tests/cp/existing-perm-race.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 require_membership_in_two_groups_
diff --git a/tests/cp/fail-perm.sh b/tests/cp/fail-perm.sh
index 2c37d6f..4098d1f 100755
--- a/tests/cp/fail-perm.sh
+++ b/tests/cp/fail-perm.sh
@@ -15,7 +15,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 skip_if_root_
 
diff --git a/tests/cp/fiemap-2.sh b/tests/cp/fiemap-2.sh
index f24baf2..3fd47cc 100755
--- a/tests/cp/fiemap-2.sh
+++ b/tests/cp/fiemap-2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 # Require a fiemap-enabled FS.
diff --git a/tests/cp/fiemap-empty.sh b/tests/cp/fiemap-empty.sh
index 4ba4ee3..fb7bb35 100755
--- a/tests/cp/fiemap-empty.sh
+++ b/tests/cp/fiemap-empty.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 # FIXME: enable any part of this test that is still relevant,
diff --git a/tests/cp/fiemap-perf.sh b/tests/cp/fiemap-perf.sh
index ca093b5..bb6f5bc 100755
--- a/tests/cp/fiemap-perf.sh
+++ b/tests/cp/fiemap-perf.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 # Require a fiemap-enabled FS.
diff --git a/tests/cp/file-perm-race.sh b/tests/cp/file-perm-race.sh
index fbc9a86..c917117 100755
--- a/tests/cp/file-perm-race.sh
+++ b/tests/cp/file-perm-race.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 # cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
diff --git a/tests/cp/into-self.sh b/tests/cp/into-self.sh
index 6121f0a..2f123e3 100755
--- a/tests/cp/into-self.sh
+++ b/tests/cp/into-self.sh
@@ -21,7 +21,7 @@
 # Now it gives this:
 #   cp: can't copy a directory 'dir' into itself 'dir/dir'
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir a dir || framework_failure_
diff --git a/tests/cp/link-heap.sh b/tests/cp/link-heap.sh
index 7e948de..d243c81 100755
--- a/tests/cp/link-heap.sh
+++ b/tests/cp/link-heap.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 expensive_
 require_ulimit_
diff --git a/tests/cp/link-no-deref.sh b/tests/cp/link-no-deref.sh
index af48fd0..ac6bc44 100755
--- a/tests/cp/link-no-deref.sh
+++ b/tests/cp/link-no-deref.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 ln -s no-such-file dangling-slink || framework_failure_
diff --git a/tests/cp/link-preserve.sh b/tests/cp/link-preserve.sh
index 9ca1705..0c75d30 100755
--- a/tests/cp/link-preserve.sh
+++ b/tests/cp/link-preserve.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 touch a || framework_failure_
diff --git a/tests/cp/link-symlink.sh b/tests/cp/link-symlink.sh
index 57bc9c7..5186887 100755
--- a/tests/cp/link-symlink.sh
+++ b/tests/cp/link-symlink.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 # Check that the timestamps of the symlink are copied
diff --git a/tests/cp/link.sh b/tests/cp/link.sh
index 3a899f3..3e15bf0 100755
--- a/tests/cp/link.sh
+++ b/tests/cp/link.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 touch src || framework_failure_
diff --git a/tests/cp/nfs-removal-race.sh b/tests/cp/nfs-removal-race.sh
index cb8aba3..63382c8 100755
--- a/tests/cp/nfs-removal-race.sh
+++ b/tests/cp/nfs-removal-race.sh
@@ -28,7 +28,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 # Replace each stat call with a call to this wrapper.
diff --git a/tests/cp/no-deref-link1.sh b/tests/cp/no-deref-link1.sh
index c2a5657..9ae7eb1 100755
--- a/tests/cp/no-deref-link1.sh
+++ b/tests/cp/no-deref-link1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir a b
diff --git a/tests/cp/no-deref-link2.sh b/tests/cp/no-deref-link2.sh
index 5840299..52a42ec 100755
--- a/tests/cp/no-deref-link2.sh
+++ b/tests/cp/no-deref-link2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir b
diff --git a/tests/cp/no-deref-link3.sh b/tests/cp/no-deref-link3.sh
index 5f63f26..c16668d 100755
--- a/tests/cp/no-deref-link3.sh
+++ b/tests/cp/no-deref-link3.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 msg=bar
diff --git a/tests/cp/parent-perm-race.sh b/tests/cp/parent-perm-race.sh
index 41486fc..209dcea 100755
--- a/tests/cp/parent-perm-race.sh
+++ b/tests/cp/parent-perm-race.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 # cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
diff --git a/tests/cp/parent-perm.sh b/tests/cp/parent-perm.sh
index bac38c6..7e3eba0 100755
--- a/tests/cp/parent-perm.sh
+++ b/tests/cp/parent-perm.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 working_umask_or_skip_
diff --git a/tests/cp/perm.sh b/tests/cp/perm.sh
index a93df71..74d948b 100755
--- a/tests/cp/perm.sh
+++ b/tests/cp/perm.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp mv
 
 very_expensive_
diff --git a/tests/cp/preserve-2.sh b/tests/cp/preserve-2.sh
index fea4b6c..9ee2149 100755
--- a/tests/cp/preserve-2.sh
+++ b/tests/cp/preserve-2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 # cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
diff --git a/tests/cp/preserve-gid.sh b/tests/cp/preserve-gid.sh
index 746c57a..fbafe1c 100755
--- a/tests/cp/preserve-gid.sh
+++ b/tests/cp/preserve-gid.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 require_root_
diff --git a/tests/cp/preserve-link.sh b/tests/cp/preserve-link.sh
index 5f069af..428edc3 100755
--- a/tests/cp/preserve-link.sh
+++ b/tests/cp/preserve-link.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 same_inode()
diff --git a/tests/cp/preserve-slink-time.sh b/tests/cp/preserve-slink-time.sh
index dc5d1cd..38110c3 100755
--- a/tests/cp/preserve-slink-time.sh
+++ b/tests/cp/preserve-slink-time.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 grep '^#define HAVE_UTIMENSAT 1' "$CONFIG_HEADER" > /dev/null ||
diff --git a/tests/cp/proc-short-read.sh b/tests/cp/proc-short-read.sh
index 632418e..df8c127 100755
--- a/tests/cp/proc-short-read.sh
+++ b/tests/cp/proc-short-read.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 kall=/proc/kallsyms
diff --git a/tests/cp/proc-zero-len.sh b/tests/cp/proc-zero-len.sh
index b8b9e9c..d51cc1d 100755
--- a/tests/cp/proc-zero-len.sh
+++ b/tests/cp/proc-zero-len.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 touch empty || framework_failure_
diff --git a/tests/cp/r-vs-symlink.sh b/tests/cp/r-vs-symlink.sh
index e96c584..3c579fc 100755
--- a/tests/cp/r-vs-symlink.sh
+++ b/tests/cp/r-vs-symlink.sh
@@ -20,7 +20,7 @@
 # though now such usage evokes a warning:
 # cp: 'slink': WARNING: using -r to copy symbolic links is not portable
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 echo abc > foo || framework_failure_
diff --git a/tests/cp/reflink-auto.sh b/tests/cp/reflink-auto.sh
index 036148c..7b6eb19 100755
--- a/tests/cp/reflink-auto.sh
+++ b/tests/cp/reflink-auto.sh
@@ -16,11 +16,11 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 a_other="$other_partition_tmpdir/a"
 rm -f "$a_other" || framework_failure_
 
diff --git a/tests/cp/reflink-perm.sh b/tests/cp/reflink-perm.sh
index c229993..22be261 100755
--- a/tests/cp/reflink-perm.sh
+++ b/tests/cp/reflink-perm.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 
diff --git a/tests/cp/same-file.sh b/tests/cp/same-file.sh
index 2ca7bf6..d653b2d 100755
--- a/tests/cp/same-file.sh
+++ b/tests/cp/same-file.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 # Unset CDPATH.  Otherwise, output from the 'cd dir' command
diff --git a/tests/cp/slink-2-slink.sh b/tests/cp/slink-2-slink.sh
index bf32387..d7e1e4f 100755
--- a/tests/cp/slink-2-slink.sh
+++ b/tests/cp/slink-2-slink.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 touch file || framework_failure_
diff --git a/tests/cp/sparse-fiemap.sh b/tests/cp/sparse-fiemap.sh
index f2e5f33..65b8e60 100755
--- a/tests/cp/sparse-fiemap.sh
+++ b/tests/cp/sparse-fiemap.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 require_perl_
 
@@ -102,7 +102,7 @@ for i in $(seq 1 2 21); do
       # exclude the physical block numbers; they always differ
       filefrag -v j1 > ff1 || framework_failure_
       filefrag -vs j2 > ff2 || framework_failure_
-      { f ff1; f ff2; } | $PERL $abs_top_srcdir/tests/filefrag-extent-compare \
+      { f ff1; f ff2; } | $PERL $abs_srcdir/tests/filefrag-extent-compare \
         || {
              warn_ ignoring filefrag-reported extent map differences
              # Show the differing extent maps.
diff --git a/tests/cp/sparse-to-pipe.sh b/tests/cp/sparse-to-pipe.sh
index 0cfda8d..9987a3f 100755
--- a/tests/cp/sparse-to-pipe.sh
+++ b/tests/cp/sparse-to-pipe.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 require_sparse_support_
diff --git a/tests/cp/sparse.sh b/tests/cp/sparse.sh
index a552028..8965e9a 100755
--- a/tests/cp/sparse.sh
+++ b/tests/cp/sparse.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 require_sparse_support_
 
diff --git a/tests/cp/special-bits.sh b/tests/cp/special-bits.sh
index 4a00891..8058ad3 100755
--- a/tests/cp/special-bits.sh
+++ b/tests/cp/special-bits.sh
@@ -20,7 +20,7 @@
 # This test would fail due to a bug introduced in 4.0y.
 # The bug was fixed in 4.0z.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 require_root_
 
diff --git a/tests/cp/special-f.sh b/tests/cp/special-f.sh
index a47655e..0dea82b 100755
--- a/tests/cp/special-f.sh
+++ b/tests/cp/special-f.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkfifo_or_skip_ fifo
diff --git a/tests/cp/src-base-dot.sh b/tests/cp/src-base-dot.sh
index 14438d0..ecab078 100755
--- a/tests/cp/src-base-dot.sh
+++ b/tests/cp/src-base-dot.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir x y || framework_failure_
diff --git a/tests/cp/symlink-slash.sh b/tests/cp/symlink-slash.sh
index 95c9cfa..fa4e297 100755
--- a/tests/cp/symlink-slash.sh
+++ b/tests/cp/symlink-slash.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 mkdir dir || framework_failure_
diff --git a/tests/cp/thru-dangling.sh b/tests/cp/thru-dangling.sh
index f8527af..c992c9c 100755
--- a/tests/cp/thru-dangling.sh
+++ b/tests/cp/thru-dangling.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 
 ln -s no-such dangle || framework_failure_
diff --git a/tests/dd/bytes.sh b/tests/dd/bytes.sh
index 2d40f06..d110518 100755
--- a/tests/dd/bytes.sh
+++ b/tests/dd/bytes.sh
@@ -15,7 +15,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 # count_bytes
diff --git a/tests/dd/direct.sh b/tests/dd/direct.sh
index c231bee..a00f1cd 100755
--- a/tests/dd/direct.sh
+++ b/tests/dd/direct.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 truncate -s 8192 in || framework_failure_
diff --git a/tests/dd/misc.sh b/tests/dd/misc.sh
index 52a5b20..9a9bba1 100755
--- a/tests/dd/misc.sh
+++ b/tests/dd/misc.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 tmp_in=dd-in
diff --git a/tests/dd/nocache.sh b/tests/dd/nocache.sh
index 274bb8a..5849b28 100755
--- a/tests/dd/nocache.sh
+++ b/tests/dd/nocache.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 # This should not call posix_fadvise
diff --git a/tests/dd/not-rewound.sh b/tests/dd/not-rewound.sh
index 5364f90..d469e5b 100755
--- a/tests/dd/not-rewound.sh
+++ b/tests/dd/not-rewound.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 
diff --git a/tests/dd/reblock.sh b/tests/dd/reblock.sh
index 92253fb..68e4a56 100755
--- a/tests/dd/reblock.sh
+++ b/tests/dd/reblock.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 # 2 short reads -> 1 full write + 1 partial write
diff --git a/tests/dd/skip-seek-past-dev.sh b/tests/dd/skip-seek-past-dev.sh
index f4184b1..5f6ba9d 100755
--- a/tests/dd/skip-seek-past-dev.sh
+++ b/tests/dd/skip-seek-past-dev.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 # need write access to local device
diff --git a/tests/dd/skip-seek-past-file.sh b/tests/dd/skip-seek-past-file.sh
index 0a8e1fd..c728b3a 100755
--- a/tests/dd/skip-seek-past-file.sh
+++ b/tests/dd/skip-seek-past-file.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 require_sparse_support_ # for 'truncate --size=$OFF_T_MAX'
 eval $(getlimits) # for OFF_T limits
diff --git a/tests/dd/skip-seek2.sh b/tests/dd/skip-seek2.sh
index 7f5e056..d01e1ef 100755
--- a/tests/dd/skip-seek2.sh
+++ b/tests/dd/skip-seek2.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 
diff --git a/tests/dd/sparse.sh b/tests/dd/sparse.sh
index 35ddda9..0c48140 100755
--- a/tests/dd/sparse.sh
+++ b/tests/dd/sparse.sh
@@ -15,7 +15,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 require_sparse_support_
 
diff --git a/tests/dd/stderr.sh b/tests/dd/stderr.sh
index 2c06278..81e9e55 100755
--- a/tests/dd/stderr.sh
+++ b/tests/dd/stderr.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 p=$abs_top_builddir
diff --git a/tests/dd/unblock-sync.sh b/tests/dd/unblock-sync.sh
index 68239f2..d185609 100755
--- a/tests/dd/unblock-sync.sh
+++ b/tests/dd/unblock-sync.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ dd
 
 printf 000100020003xx > in || framework_failure_
diff --git a/tests/df/df-P.sh b/tests/df/df-P.sh
index dfce414..523dc56 100755
--- a/tests/df/df-P.sh
+++ b/tests/df/df-P.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ df
 
 
diff --git a/tests/df/header.sh b/tests/df/header.sh
index 4fc626e..0bf2858 100755
--- a/tests/df/header.sh
+++ b/tests/df/header.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ df
 
 case $(df .) in
diff --git a/tests/df/no-mtab-status.sh b/tests/df/no-mtab-status.sh
index e434f5f..ff0316e 100755
--- a/tests/df/no-mtab-status.sh
+++ b/tests/df/no-mtab-status.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ df
 
 df || skip_ "df fails"
diff --git a/tests/df/problematic-chars.sh b/tests/df/problematic-chars.sh
index 801c4d9..d4f7c51 100755
--- a/tests/df/problematic-chars.sh
+++ b/tests/df/problematic-chars.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ df
 require_root_
 
diff --git a/tests/df/total-unprocessed.sh b/tests/df/total-unprocessed.sh
index aa49836..1bc947d 100755
--- a/tests/df/total-unprocessed.sh
+++ b/tests/df/total-unprocessed.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ df
 require_mount_list_
 
diff --git a/tests/df/total-verify.sh b/tests/df/total-verify.sh
index 948b002..45c838e 100755
--- a/tests/df/total-verify.sh
+++ b/tests/df/total-verify.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ df
 require_perl_
 
diff --git a/tests/df/unreadable.sh b/tests/df/unreadable.sh
index b0ef3fc..c2af041 100755
--- a/tests/df/unreadable.sh
+++ b/tests/df/unreadable.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ df
 skip_if_root_
 
diff --git a/tests/du/2g.sh b/tests/du/2g.sh
index 96cf62d..010d8ce 100755
--- a/tests/du/2g.sh
+++ b/tests/du/2g.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 # Creating a 2GB file counts as 'very expensive'.
diff --git a/tests/du/8gb.sh b/tests/du/8gb.sh
index 556423e..c000718 100755
--- a/tests/du/8gb.sh
+++ b/tests/du/8gb.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 require_sparse_support_
 
diff --git a/tests/du/basic.sh b/tests/du/basic.sh
index d8acf64..b05508f 100755
--- a/tests/du/basic.sh
+++ b/tests/du/basic.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 mkdir -p a/b d d/sub || framework_failure_
diff --git a/tests/du/bigtime.sh b/tests/du/bigtime.sh
index 964fb71..70f69bf 100755
--- a/tests/du/bigtime.sh
+++ b/tests/du/bigtime.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 
 export LC_ALL=C
 export TZ=UTC0
diff --git a/tests/du/bind-mount-dir-cycle.sh b/tests/du/bind-mount-dir-cycle.sh
index 516ceae..d8d381a 100755
--- a/tests/du/bind-mount-dir-cycle.sh
+++ b/tests/du/bind-mount-dir-cycle.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 require_root_
 
diff --git a/tests/du/deref-args.sh b/tests/du/deref-args.sh
index 098e01a..b4761e5 100755
--- a/tests/du/deref-args.sh
+++ b/tests/du/deref-args.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 mkdir -p dir/a || framework_failure_
diff --git a/tests/du/deref.sh b/tests/du/deref.sh
index 90b7650..77c61c7 100755
--- a/tests/du/deref.sh
+++ b/tests/du/deref.sh
@@ -19,7 +19,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 mkdir -p a/sub || framework_failure_
diff --git a/tests/du/exclude.sh b/tests/du/exclude.sh
index cad2d7f..eba0dd2 100755
--- a/tests/du/exclude.sh
+++ b/tests/du/exclude.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 mkdir -p a/b/c a/x/y a/u/v || framework_failure_
diff --git a/tests/du/fd-leak.sh b/tests/du/fd-leak.sh
index 84a2276..cb68650 100755
--- a/tests/du/fd-leak.sh
+++ b/tests/du/fd-leak.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 # Call this an expensive test.  It's not that expensive, but command line
diff --git a/tests/du/files0-from-dir.sh b/tests/du/files0-from-dir.sh
index 86bfe26..20eb82f 100755
--- a/tests/du/files0-from-dir.sh
+++ b/tests/du/files0-from-dir.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du wc
 
 mkdir dir
diff --git a/tests/du/hard-link.sh b/tests/du/hard-link.sh
index 0e0641e..ede8bc8 100755
--- a/tests/du/hard-link.sh
+++ b/tests/du/hard-link.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 mkdir -p dir/sub
diff --git a/tests/du/inacc-dest.sh b/tests/du/inacc-dest.sh
index c9c7097..54010b3 100755
--- a/tests/du/inacc-dest.sh
+++ b/tests/du/inacc-dest.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 skip_if_root_
 
diff --git a/tests/du/inacc-dir.sh b/tests/du/inacc-dir.sh
index 8395c56..f03d054 100755
--- a/tests/du/inacc-dir.sh
+++ b/tests/du/inacc-dir.sh
@@ -15,7 +15,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 skip_if_root_
 
diff --git a/tests/du/inaccessible-cwd.sh b/tests/du/inaccessible-cwd.sh
index bfc8cf9..0372ad0 100755
--- a/tests/du/inaccessible-cwd.sh
+++ b/tests/du/inaccessible-cwd.sh
@@ -20,7 +20,7 @@
 # Before the switch to an fts-based implementation in coreutils 5.0.92,
 # this test would fail.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 # Skip this test if your system has neither the openat-style functions
diff --git a/tests/du/long-from-unreadable.sh b/tests/du/long-from-unreadable.sh
index 7fc129c..8362e98 100755
--- a/tests/du/long-from-unreadable.sh
+++ b/tests/du/long-from-unreadable.sh
@@ -28,7 +28,7 @@
 # on Linux+PROC_FS systems because its fts implementation would revert
 # unnecessarily to using FTS_NOCHDIR mode in this corner case.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 proc_file=/proc/self/fd
diff --git a/tests/du/long-sloop.sh b/tests/du/long-sloop.sh
index 48e2e30..583009d 100755
--- a/tests/du/long-sloop.sh
+++ b/tests/du/long-sloop.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 # Create lots of directories, each containing a single symlink
diff --git a/tests/du/max-depth.sh b/tests/du/max-depth.sh
index 30671c4..25e2a12 100755
--- a/tests/du/max-depth.sh
+++ b/tests/du/max-depth.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 
 mkdir -p a/b/c/d/e || framework_failure_
 printf 'a/b/c\na/b\na\n' > exp || framework_failure_
diff --git a/tests/du/move-dir-while-traversing.sh 
b/tests/du/move-dir-while-traversing.sh
index 4f603a0..0998d8c 100755
--- a/tests/du/move-dir-while-traversing.sh
+++ b/tests/du/move-dir-while-traversing.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 # We use a python-inotify script, so...
diff --git a/tests/du/no-deref.sh b/tests/du/no-deref.sh
index 2f20551..e476d8b 100755
--- a/tests/du/no-deref.sh
+++ b/tests/du/no-deref.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 mkdir -p dir/a/b || framework_failure_
diff --git a/tests/du/no-x.sh b/tests/du/no-x.sh
index 28f7976..420ae4b 100755
--- a/tests/du/no-x.sh
+++ b/tests/du/no-x.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 skip_if_root_
 
diff --git a/tests/du/one-file-system.sh b/tests/du/one-file-system.sh
index 110080f..a0e6f0e 100755
--- a/tests/du/one-file-system.sh
+++ b/tests/du/one-file-system.sh
@@ -16,10 +16,10 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 mkdir -p b/c y/z d "$other_partition_tmpdir/x" || framework_failure_
 ln -s "$other_partition_tmpdir/x" d || framework_failure_
diff --git a/tests/du/restore-wd.sh b/tests/du/restore-wd.sh
index 19ed5fa..836ce05 100755
--- a/tests/du/restore-wd.sh
+++ b/tests/du/restore-wd.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 mkdir a b || framework_failure_
diff --git a/tests/du/slash.sh b/tests/du/slash.sh
index 9501241..25820c7 100755
--- a/tests/du/slash.sh
+++ b/tests/du/slash.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 require_readable_root_
 
diff --git a/tests/du/slink.sh b/tests/du/slink.sh
index 674e6a2..eba1e45 100755
--- a/tests/du/slink.sh
+++ b/tests/du/slink.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 # Determine if '.' is on a local (would non-NFS be sufficient?) file system.
diff --git a/tests/du/trailing-slash.sh b/tests/du/trailing-slash.sh
index 4efda6c..feb9d06 100755
--- a/tests/du/trailing-slash.sh
+++ b/tests/du/trailing-slash.sh
@@ -19,7 +19,7 @@
 
 # Before coreutils-4.5.3, it would remove a single trailing slash.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 mkdir -p dir/1/2 || framework_failure_
diff --git a/tests/du/two-args.sh b/tests/du/two-args.sh
index 10c0a05..6a6bbec 100755
--- a/tests/du/two-args.sh
+++ b/tests/du/two-args.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ du
 
 # Run this test from a sub-directory one level deeper than normal,
diff --git a/tests/fmt/goal-option.sh b/tests/fmt/goal-option.sh
index 2efb8c5..21d0be4 100755
--- a/tests/fmt/goal-option.sh
+++ b/tests/fmt/goal-option.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ fmt
 
 cat <<\_EOF_ > base || fail=1
diff --git a/tests/fmt/long-line.sh b/tests/fmt/long-line.sh
index 04674e2..69994c2 100755
--- a/tests/fmt/long-line.sh
+++ b/tests/fmt/long-line.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ fmt
 
 printf '%2030s\n' ' '|sed 's/../ y/g' > in || framework_failure_
diff --git a/tests/id/gnu-zero-uids.sh b/tests/id/gnu-zero-uids.sh
index 6ca8dc6..ef47c6c 100755
--- a/tests/id/gnu-zero-uids.sh
+++ b/tests/id/gnu-zero-uids.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ id
 
 require_gnu_
diff --git a/tests/id/no-context.sh b/tests/id/no-context.sh
index 94111b8..0632955 100755
--- a/tests/id/no-context.sh
+++ b/tests/id/no-context.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ id
 
 # We don't need selinux *FS* support to test id,
diff --git a/tests/install/basic-1.sh b/tests/install/basic-1.sh
index aa80fcf..08055f5 100755
--- a/tests/install/basic-1.sh
+++ b/tests/install/basic-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ginstall
 skip_if_root_
 
diff --git a/tests/install/create-leading.sh b/tests/install/create-leading.sh
index 0ecf4d9..6a71919 100755
--- a/tests/install/create-leading.sh
+++ b/tests/install/create-leading.sh
@@ -19,7 +19,7 @@
 # Note that the tests below use 'ginstall', not install, because
 # that's the name of the binary in ../../src.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ginstall
 
 
diff --git a/tests/install/d-slashdot.sh b/tests/install/d-slashdot.sh
index 2abdd57..5e6cb55 100755
--- a/tests/install/d-slashdot.sh
+++ b/tests/install/d-slashdot.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ install
 
 
diff --git a/tests/install/install-C-root.sh b/tests/install/install-C-root.sh
index 5fbae05..9a203e9 100755
--- a/tests/install/install-C-root.sh
+++ b/tests/install/install-C-root.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ginstall
 require_root_
 skip_if_setgid_
diff --git a/tests/install/install-C-selinux.sh 
b/tests/install/install-C-selinux.sh
index db2a5d2..c8a21e9 100755
--- a/tests/install/install-C-selinux.sh
+++ b/tests/install/install-C-selinux.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ginstall
 require_selinux_
 
diff --git a/tests/install/install-C.sh b/tests/install/install-C.sh
index 0883d9e..c373971 100755
--- a/tests/install/install-C.sh
+++ b/tests/install/install-C.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ginstall
 skip_if_setgid_
 
diff --git a/tests/install/strip-program.sh b/tests/install/strip-program.sh
index 5916141..d38b4f4 100755
--- a/tests/install/strip-program.sh
+++ b/tests/install/strip-program.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ginstall
 
 working_umask_or_skip_
diff --git a/tests/install/trap.sh b/tests/install/trap.sh
index e3ccf54..ea7153b 100755
--- a/tests/install/trap.sh
+++ b/tests/install/trap.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ginstall
 
 
diff --git a/tests/ln/backup-1.sh b/tests/ln/backup-1.sh
index ffd630b..ecd77f5 100755
--- a/tests/ln/backup-1.sh
+++ b/tests/ln/backup-1.sh
@@ -19,7 +19,7 @@
 
 # Based on a problem report from Jamie Lokier.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ln
 
 touch a b || framework_failure_
diff --git a/tests/ln/hard-backup.sh b/tests/ln/hard-backup.sh
index bc38bbe..fe87f6a 100755
--- a/tests/ln/hard-backup.sh
+++ b/tests/ln/hard-backup.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ln
 
 touch f || framework_failure_
diff --git a/tests/ln/hard-to-sym.sh b/tests/ln/hard-to-sym.sh
index 358b930..3b30a71 100755
--- a/tests/ln/hard-to-sym.sh
+++ b/tests/ln/hard-to-sym.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ln
 
 
diff --git a/tests/ln/misc.sh b/tests/ln/misc.sh
index 4da0eda..79e2bea 100755
--- a/tests/ln/misc.sh
+++ b/tests/ln/misc.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ln
 
 t=tln-symlink
diff --git a/tests/ln/relative.sh b/tests/ln/relative.sh
index cfc3469..9028b43 100755
--- a/tests/ln/relative.sh
+++ b/tests/ln/relative.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ln
 
 mkdir -p usr/bin || framework_failure_
diff --git a/tests/ln/sf-1.sh b/tests/ln/sf-1.sh
index 824c224..6efea75 100755
--- a/tests/ln/sf-1.sh
+++ b/tests/ln/sf-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ln
 
 echo foo > a || framework_failure_
diff --git a/tests/ln/slash-decorated-nonexistent-dest.sh 
b/tests/ln/slash-decorated-nonexistent-dest.sh
index 5da855e..ae24cdc 100755
--- a/tests/ln/slash-decorated-nonexistent-dest.sh
+++ b/tests/ln/slash-decorated-nonexistent-dest.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ln
 
 touch f || framework_failure_
diff --git a/tests/ln/target-1.sh b/tests/ln/target-1.sh
index 1d511e5..7dc1829 100755
--- a/tests/ln/target-1.sh
+++ b/tests/ln/target-1.sh
@@ -21,7 +21,7 @@
 # ln: 'd/.': cannot overwrite directory
 # Based on a test case from Dmitry V. Levin.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ln
 
 mkdir d || framework_failure_
diff --git a/tests/local.mk b/tests/local.mk
new file mode 100644
index 0000000..30b21af
--- /dev/null
+++ b/tests/local.mk
@@ -0,0 +1,801 @@
+## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+
+## Copyright (C) 2007-2012 Free Software Foundation, Inc.
+
+## This 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/>.
+
+# Indirections required so that we'll still be able to know the
+# complete list of our tests even if the user override TESTS from the
+# command line (which he's allowed to do by the test harness API).
+TESTS = $(all_tests)
+root_tests = $(all_root_tests)
+
+EXTRA_DIST += $(all_tests)
+
+# Ensure that all version-controlled filestable files are listed
+# in $(all_tests).
+vc_exe_in_TESTS:
+       $(AM_V_GEN)test -d $(top_srcdir)/.git || exit 1;                \
+       bs="\\";                                                        \
+       test_extensions_rx=`echo $(TEST_EXTENSIONS)                     \
+         | sed -e "s/ /|/g" -e "s/$$bs./$$bs$$bs./g"`;                 \
+       {                                                               \
+         for t in $(all_tests); do echo $$t; done;                     \
+         cd $(top_srcdir);                                             \
+         $(SHELL) build-aux/vc-list-files $(subdir)                    \
+           | grep -v '^tests/init\.sh$$'                               \
+           | $(EGREP) "$$test_extensions_rx\$$";                       \
+       } | sort | uniq -u | grep . && exit 1; :
+
+check-local: vc_exe_in_TESTS
+.PHONY: vc_exe_in_TESTS
+
+TEST_EXTENSIONS = .sh .pl .xpl
+
+if HAVE_PERL
+TESTSUITE_PERL = $(PERL)
+else
+TESTSUITE_PERL = $(SHELL) $(srcdir)/no-perl
+endif
+
+# Options passed to the perl invocations running the perl test scripts.
+TESTSUITE_PERL_OPTIONS = -w -I$(srcdir)/tests -MCoreutils -MCuSkip
+# '$f' is set by the Automake-generated test harness to the path of the
+# current test script stripped of VPATH components, and is used by the
+# CuTmpdir module to determine the name of the temporary files to be
+# used.  Note that $f is a shell variable, not a make macro, so the use
+# of '$$f' below is correct, and not a typo.
+TESTSUITE_PERL_OPTIONS += -M"CuTmpdir qw($$f)"
+
+SH_LOG_COMPILER = $(SHELL)
+PL_LOG_COMPILER = $(TESTSUITE_PERL) $(TESTSUITE_PERL_OPTIONS)
+# Perl scripts that must be run in tainted mode.
+XPL_LOG_COMPILER = $(TESTSUITE_PERL) -T $(TESTSUITE_PERL_OPTIONS)
+
+# Note that the first lines are statements.  They ensure that environment
+# variables that can perturb tests are unset or set to expected values.
+# The rest are envvar settings that propagate build-related Makefile
+# variables to test scripts.
+AM_TESTS_ENVIRONMENT =                         \
+  . $(srcdir)/tests/lang-default;              \
+  tmp__=$${TMPDIR-/tmp};                       \
+  test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;   \
+  . $(srcdir)/tests/envvar-check;              \
+  TMPDIR=$$tmp__; export TMPDIR;               \
+  export                                       \
+  VERSION='$(VERSION)'                         \
+  LOCALE_FR='$(LOCALE_FR)'                     \
+  LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'           \
+  abs_top_builddir='$(abs_top_builddir)'       \
+  abs_top_srcdir='$(abs_top_srcdir)'           \
+  abs_srcdir='$(abs_srcdir)'                   \
+  built_programs='$(built_programs)'           \
+  host_os=$(host_os)                           \
+  host_triplet='$(host_triplet)'               \
+  srcdir='$(srcdir)'                           \
+  top_srcdir='$(top_srcdir)'                   \
+  CONFIG_HEADER='$(abs_top_builddir)/$(CONFIG_INCLUDE)' \
+  CU_TEST_NAME=`basename '$(abs_srcdir)'`,`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
+  CC='$(CC)'                                   \
+  AWK='$(AWK)'                                 \
+  EGREP='$(EGREP)'                             \
+  EXEEXT='$(EXEEXT)'                           \
+  MAKE=$(MAKE)                                 \
+  PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'     \
+  PACKAGE_VERSION=$(PACKAGE_VERSION)           \
+  PERL='$(PERL)'                               \
+  PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
+  ; test -d /usr/xpg4/bin && PATH='/usr/xpg4/bin$(PATH_SEPARATOR)'"$$PATH"; \
+  PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
+  ; 9>&2
+
+# On failure, display the global testsuite log on stdout.
+VERBOSE = yes
+
+EXTRA_DIST +=                  \
+  tests/Coreutils.pm           \
+  tests/CuSkip.pm              \
+  tests/CuTmpdir.pm            \
+  tests/d_type-check           \
+  tests/envvar-check           \
+  tests/filefrag-extent-compare \
+  tests/fiemap-capable         \
+  init.cfg                     \
+  tests/init.sh                        \
+  tests/lang-default           \
+  tests/no-perl                        \
+  tests/other-fs-tmpdir                \
+  tests/sample-test            \
+  $(pr_data)
+
+all_root_tests =                               \
+  tests/chown/basic.sh                         \
+  tests/cp/cp-a-selinux.sh                     \
+  tests/cp/preserve-gid.sh                     \
+  tests/cp/special-bits.sh                     \
+  tests/cp/cp-mv-enotsup-xattr.sh              \
+  tests/cp/capability.sh                       \
+  tests/cp/sparse-fiemap.sh                    \
+  tests/dd/skip-seek-past-dev.sh               \
+  tests/df/problematic-chars.sh                        \
+  tests/du/bind-mount-dir-cycle.sh             \
+  tests/install/install-C-root.sh              \
+  tests/ls/capability.sh                       \
+  tests/ls/nameless-uid.sh                     \
+  tests/misc/chcon.sh                          \
+  tests/misc/chroot-credentials.sh             \
+  tests/misc/id-setgid.sh                      \
+  tests/misc/selinux.sh                                \
+  tests/misc/truncate-owned-by-other.sh                \
+  tests/mkdir/writable-under-readonly.sh       \
+  tests/mv/sticky-to-xpart.sh                  \
+  tests/rm/fail-2eperm.sh                      \
+  tests/rm/no-give-up.sh                       \
+  tests/rm/one-file-system.sh                  \
+  tests/rm/read-only.sh                                \
+  tests/tail-2/append-only.sh                  \
+  tests/touch/now-owned-by-other.sh
+
+ALL_RECURSIVE_TARGETS += check-root
+.PHONY: check-root
+check-root:
+       $(MAKE) check TESTS='$(root_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.
+
+# Notes on the ordering of these tests:
+# Place early in the list tests of the tools that
+# are most commonly used in test scripts themselves.
+# E.g., nearly every test script uses rm and chmod.
+# help-version comes early because it's a basic sanity test.
+# Put seq early, since lots of other tests use it.
+# Put tests that sleep early, but not all together, so in parallel builds
+# they share time with tests that burn CPU, not with others that sleep.
+# Put head-elide-tail early, because it's long-running.
+
+all_tests =                                    \
+  tests/misc/help-version.sh                   \
+  tests/tail-2/inotify-race.sh                 \
+  tests/misc/invalid-opt.pl                    \
+  tests/rm/ext3-perf.sh                                \
+  tests/rm/cycle.sh                            \
+  tests/cp/link-heap.sh                                \
+  tests/misc/tty-eof.pl                                \
+  tests/tail-2/inotify-hash-abuse.sh           \
+  tests/tail-2/inotify-hash-abuse2.sh          \
+  tests/tail-2/F-vs-missing.sh                 \
+  tests/tail-2/F-vs-rename.sh                  \
+  tests/tail-2/inotify-rotate.sh               \
+  tests/chmod/no-x.sh                          \
+  tests/chgrp/basic.sh                         \
+  tests/rm/dangling-symlink.sh                 \
+  tests/misc/ls-time.sh                                \
+  tests/rm/d-1.sh                              \
+  tests/rm/d-2.sh                              \
+  tests/rm/d-3.sh                              \
+  tests/rm/deep-1.sh                           \
+  tests/rm/deep-2.sh                           \
+  tests/rm/dir-no-w.sh                         \
+  tests/rm/dir-nonrecur.sh                     \
+  tests/rm/dot-rel.sh                          \
+  tests/rm/isatty.sh                           \
+  tests/rm/empty-inacc.sh                      \
+  tests/rm/empty-name.pl                       \
+  tests/rm/f-1.sh                              \
+  tests/rm/fail-eacces.sh                      \
+  tests/rm/fail-eperm.xpl                      \
+  tests/tail-2/assert.sh                       \
+  tests/rm/hash.sh                             \
+  tests/rm/i-1.sh                              \
+  tests/rm/i-never.sh                          \
+  tests/rm/i-no-r.sh                           \
+  tests/tail-2/infloop-1.sh                    \
+  tests/rm/ignorable.sh                                \
+  tests/rm/inaccessible.sh                     \
+  tests/rm/interactive-always.sh               \
+  tests/rm/interactive-once.sh                 \
+  tests/rm/ir-1.sh                             \
+  tests/rm/one-file-system2.sh                 \
+  tests/rm/r-1.sh                              \
+  tests/rm/r-2.sh                              \
+  tests/rm/r-3.sh                              \
+  tests/rm/r-4.sh                              \
+  tests/rm/readdir-bug.sh                      \
+  tests/rm/rm1.sh                              \
+  tests/touch/empty-file.sh                    \
+  tests/rm/rm2.sh                              \
+  tests/rm/rm3.sh                              \
+  tests/rm/rm4.sh                              \
+  tests/rm/rm5.sh                              \
+  tests/rm/sunos-1.sh                          \
+  tests/rm/unread2.sh                          \
+  tests/rm/unread3.sh                          \
+  tests/rm/unreadable.pl                       \
+  tests/rm/v-slash.sh                          \
+  tests/rm/many-dir-entries-vs-OOM.sh          \
+  tests/chgrp/default-no-deref.sh              \
+  tests/chgrp/deref.sh                         \
+  tests/chgrp/no-x.sh                          \
+  tests/chgrp/posix-H.sh                       \
+  tests/chgrp/recurse.sh                       \
+  tests/fmt/base.pl                            \
+  tests/fmt/long-line.sh                       \
+  tests/fmt/goal-option.sh                     \
+  tests/misc/env.sh                            \
+  tests/misc/ptx.pl                            \
+  tests/misc/test.pl                           \
+  tests/misc/seq.pl                            \
+  tests/misc/seq-long-double.sh                        \
+  tests/misc/head.pl                           \
+  tests/misc/head-elide-tail.pl                        \
+  tests/tail-2/tail-n0f.sh                     \
+  tests/misc/ls-misc.pl                                \
+  tests/misc/date.pl                           \
+  tests/misc/date-next-dow.pl                  \
+  tests/misc/ptx-overrun.sh                    \
+  tests/misc/xstrtol.pl                                \
+  tests/tail-2/pid.sh                          \
+  tests/misc/od.pl                             \
+  tests/misc/od-float.sh                       \
+  tests/misc/mktemp.pl                         \
+  tests/misc/arch.sh                           \
+  tests/misc/pr.pl                             \
+  tests/misc/join.pl                           \
+  tests/pr/pr-tests.pl                         \
+  tests/misc/pwd-option.sh                     \
+  tests/misc/chcon-fail.sh                     \
+  tests/misc/cut.pl                            \
+  tests/misc/wc.pl                             \
+  tests/misc/wc-files0-from.pl                 \
+  tests/misc/wc-files0.sh                      \
+  tests/misc/wc-parallel.sh                    \
+  tests/misc/cat-proc.sh                       \
+  tests/misc/cat-buf.sh                                \
+  tests/misc/base64.pl                         \
+  tests/misc/basename.pl                       \
+  tests/misc/close-stdout.sh                   \
+  tests/misc/chroot-fail.sh                    \
+  tests/misc/comm.pl                           \
+  tests/misc/csplit.sh                         \
+  tests/misc/csplit-1000.sh                    \
+  tests/misc/csplit-heap.sh                    \
+  tests/misc/date-sec.sh                       \
+  tests/misc/dircolors.pl                      \
+  tests/misc/dirname.pl                                \
+  tests/misc/env-null.sh                       \
+  tests/misc/expand.pl                         \
+  tests/misc/expr.pl                           \
+  tests/misc/factor.pl                         \
+  tests/misc/false-status.sh                   \
+  tests/misc/fold.pl                           \
+  tests/misc/groups-dash.sh                    \
+  tests/misc/groups-version.sh                 \
+  tests/misc/head-c.sh                         \
+  tests/misc/head-pos.sh                       \
+  tests/misc/id-context.sh                     \
+  tests/misc/id-groups.sh                      \
+  tests/misc/id-setgid.sh                      \
+  tests/misc/md5sum.pl                         \
+  tests/misc/md5sum-bsd.sh                     \
+  tests/misc/md5sum-newline.pl                 \
+  tests/misc/md5sum-parallel.sh                        \
+  tests/misc/mknod.sh                          \
+  tests/misc/nice.sh                           \
+  tests/misc/nice-fail.sh                      \
+  tests/misc/nl.sh                             \
+  tests/misc/nohup.sh                          \
+  tests/misc/nproc-avail.sh                    \
+  tests/misc/nproc-positive.sh                 \
+  tests/misc/od-N.sh                           \
+  tests/misc/od-multiple-t.sh                  \
+  tests/misc/od-x8.sh                          \
+  tests/misc/paste.pl                          \
+  tests/misc/pathchk1.sh                       \
+  tests/misc/printenv.sh                       \
+  tests/misc/printf.sh                         \
+  tests/misc/printf-cov.pl                     \
+  tests/misc/printf-hex.sh                     \
+  tests/misc/printf-surprise.sh                        \
+  tests/misc/pwd-long.sh                       \
+  tests/misc/readlink-fp-loop.sh               \
+  tests/misc/readlink-root.sh                  \
+  tests/misc/realpath.sh                       \
+  tests/misc/runcon-no-reorder.sh              \
+  tests/misc/sha1sum.pl                                \
+  tests/misc/sha1sum-vec.pl                    \
+  tests/misc/sha224sum.pl                      \
+  tests/misc/sha256sum.pl                      \
+  tests/misc/sha384sum.pl                      \
+  tests/misc/sha512sum.pl                      \
+  tests/misc/shred-exact.sh                    \
+  tests/misc/shred-passes.sh                   \
+  tests/misc/shred-remove.sh                   \
+  tests/misc/shuf.sh                           \
+  tests/misc/sort.pl                           \
+  tests/misc/sort-benchmark-random.sh          \
+  tests/misc/sort-compress.sh                  \
+  tests/misc/sort-compress-hang.sh             \
+  tests/misc/sort-compress-proc.sh             \
+  tests/misc/sort-continue.sh                  \
+  tests/misc/sort-debug-keys.sh                        \
+  tests/misc/sort-debug-warn.sh                        \
+  tests/misc/sort-discrim.sh                   \
+  tests/misc/sort-files0-from.pl               \
+  tests/misc/sort-float.sh                     \
+  tests/misc/sort-merge.pl                     \
+  tests/misc/sort-merge-fdlimit.sh             \
+  tests/misc/sort-month.sh                     \
+  tests/misc/sort-exit-early.sh                        \
+  tests/misc/sort-rand.sh                      \
+  tests/misc/sort-spinlock-abuse.sh            \
+  tests/misc/sort-stale-thread-mem.sh          \
+  tests/misc/sort-unique.sh                    \
+  tests/misc/sort-unique-segv.sh               \
+  tests/misc/sort-version.sh                   \
+  tests/misc/sort-NaN-infloop.sh               \
+  tests/misc/sort-u-FMR.sh                     \
+  tests/split/filter.sh                                \
+  tests/split/suffix-auto-length.sh            \
+  tests/split/suffix-length.sh                 \
+  tests/split/additional-suffix.sh             \
+  tests/split/b-chunk.sh                       \
+  tests/split/fail.sh                          \
+  tests/split/lines.sh                         \
+  tests/split/l-chunk.sh                       \
+  tests/split/r-chunk.sh                       \
+  tests/split/numeric.sh                       \
+  tests/split/guard-input.sh                   \
+  tests/misc/stat-birthtime.sh                 \
+  tests/misc/stat-fmt.sh                       \
+  tests/misc/stat-hyphen.sh                    \
+  tests/misc/stat-mount.sh                     \
+  tests/misc/stat-nanoseconds.sh               \
+  tests/misc/stat-printf.pl                    \
+  tests/misc/stat-slash.sh                     \
+  tests/misc/stdbuf.sh                         \
+  tests/misc/stty.sh                           \
+  tests/misc/stty-invalid.sh                   \
+  tests/misc/stty-pairs.sh                     \
+  tests/misc/stty-row-col.sh                   \
+  tests/misc/sum.pl                            \
+  tests/misc/sum-sysv.sh                       \
+  tests/misc/tac.pl                            \
+  tests/misc/tac-continue.sh                   \
+  tests/misc/tac-2-nonseekable.sh              \
+  tests/misc/tail.pl                           \
+  tests/misc/tee.sh                            \
+  tests/misc/tee-dash.sh                       \
+  tests/misc/test-diag.pl                      \
+  tests/misc/timeout.sh                                \
+  tests/misc/timeout-group.sh                  \
+  tests/misc/timeout-parameters.sh             \
+  tests/misc/tr.pl                             \
+  tests/misc/tr-case-class.sh                  \
+  tests/misc/truncate-dangling-symlink.sh      \
+  tests/misc/truncate-dir-fail.sh              \
+  tests/misc/truncate-fail-diag.sh             \
+  tests/misc/truncate-fifo.sh                  \
+  tests/misc/truncate-no-create-missing.sh     \
+  tests/misc/truncate-overflow.sh              \
+  tests/misc/truncate-parameters.sh            \
+  tests/misc/truncate-relative.sh              \
+  tests/misc/tsort.pl                          \
+  tests/misc/unexpand.pl                       \
+  tests/misc/uniq.pl                           \
+  tests/misc/uniq-perf.sh                      \
+  tests/misc/xattr.sh                          \
+  tests/tail-2/wait.sh                         \
+  tests/chmod/c-option.sh                      \
+  tests/chmod/equal-x.sh                       \
+  tests/chmod/equals.sh                                \
+  tests/chmod/inaccessible.sh                  \
+  tests/chmod/octal.sh                         \
+  tests/chmod/setgid.sh                                \
+  tests/chmod/silent.sh                                \
+  tests/chmod/thru-dangling.sh                 \
+  tests/chmod/umask-x.sh                       \
+  tests/chmod/usage.sh                         \
+  tests/chown/deref.sh                         \
+  tests/chown/preserve-root.sh                 \
+  tests/chown/separator.sh                     \
+  tests/cp/abuse.sh                            \
+  tests/cp/acl.sh                              \
+  tests/cp/attr-existing.sh                    \
+  tests/cp/backup-1.sh                         \
+  tests/cp/backup-dir.sh                       \
+  tests/cp/backup-is-src.sh                    \
+  tests/cp/cp-HL.sh                            \
+  tests/cp/cp-deref.sh                         \
+  tests/cp/cp-i.sh                             \
+  tests/cp/cp-mv-backup.sh                     \
+  tests/cp/cp-parents.sh                       \
+  tests/cp/deref-slink.sh                      \
+  tests/cp/dir-rm-dest.sh                      \
+  tests/cp/dir-slash.sh                                \
+  tests/cp/dir-vs-file.sh                      \
+  tests/cp/existing-perm-dir.sh                        \
+  tests/cp/existing-perm-race.sh               \
+  tests/cp/fail-perm.sh                                \
+  tests/cp/fiemap-empty.sh                     \
+  tests/cp/fiemap-perf.sh                      \
+  tests/cp/fiemap-2.sh                         \
+  tests/cp/file-perm-race.sh                   \
+  tests/cp/into-self.sh                                \
+  tests/cp/link.sh                             \
+  tests/cp/link-no-deref.sh                    \
+  tests/cp/link-preserve.sh                    \
+  tests/cp/link-symlink.sh                     \
+  tests/cp/nfs-removal-race.sh                 \
+  tests/cp/no-deref-link1.sh                   \
+  tests/cp/no-deref-link2.sh                   \
+  tests/cp/no-deref-link3.sh                   \
+  tests/cp/parent-perm.sh                      \
+  tests/cp/parent-perm-race.sh                 \
+  tests/cp/perm.sh                             \
+  tests/cp/preserve-2.sh                       \
+  tests/cp/preserve-link.sh                    \
+  tests/cp/preserve-slink-time.sh              \
+  tests/cp/proc-short-read.sh                  \
+  tests/cp/proc-zero-len.sh                    \
+  tests/cp/r-vs-symlink.sh                     \
+  tests/cp/reflink-auto.sh                     \
+  tests/cp/reflink-perm.sh                     \
+  tests/cp/same-file.sh                                \
+  tests/cp/slink-2-slink.sh                    \
+  tests/cp/sparse.sh                           \
+  tests/cp/sparse-to-pipe.sh                   \
+  tests/cp/special-f.sh                                \
+  tests/cp/src-base-dot.sh                     \
+  tests/cp/symlink-slash.sh                    \
+  tests/cp/thru-dangling.sh                    \
+  tests/df/header.sh                           \
+  tests/df/df-P.sh                             \
+  tests/df/unreadable.sh                       \
+  tests/df/total-unprocessed.sh                        \
+  tests/df/no-mtab-status.sh                   \
+  tests/dd/direct.sh                           \
+  tests/dd/misc.sh                             \
+  tests/dd/nocache.sh                          \
+  tests/dd/not-rewound.sh                      \
+  tests/dd/reblock.sh                          \
+  tests/dd/skip-seek.pl                                \
+  tests/dd/skip-seek2.sh                       \
+  tests/dd/bytes.sh                            \
+  tests/dd/skip-seek-past-file.sh              \
+  tests/dd/sparse.sh                           \
+  tests/dd/stderr.sh                           \
+  tests/dd/unblock.pl                          \
+  tests/dd/unblock-sync.sh                     \
+  tests/df/total-verify.sh                     \
+  tests/du/2g.sh                               \
+  tests/du/8gb.sh                              \
+  tests/du/basic.sh                            \
+  tests/du/bigtime.sh                          \
+  tests/du/deref.sh                            \
+  tests/du/deref-args.sh                       \
+  tests/du/exclude.sh                          \
+  tests/du/fd-leak.sh                          \
+  tests/du/files0-from.pl                      \
+  tests/du/files0-from-dir.sh                  \
+  tests/du/hard-link.sh                                \
+  tests/du/inacc-dest.sh                       \
+  tests/du/inacc-dir.sh                                \
+  tests/du/inaccessible-cwd.sh                 \
+  tests/du/long-from-unreadable.sh             \
+  tests/du/long-sloop.sh                       \
+  tests/du/max-depth.sh                                \
+  tests/du/move-dir-while-traversing.sh                \
+  tests/du/no-deref.sh                         \
+  tests/du/no-x.sh                             \
+  tests/du/one-file-system.sh                  \
+  tests/du/restore-wd.sh                       \
+  tests/du/slash.sh                            \
+  tests/du/slink.sh                            \
+  tests/du/trailing-slash.sh                   \
+  tests/du/two-args.sh                         \
+  tests/id/gnu-zero-uids.sh                    \
+  tests/id/no-context.sh                       \
+  tests/install/basic-1.sh                     \
+  tests/install/create-leading.sh              \
+  tests/install/d-slashdot.sh                  \
+  tests/install/install-C.sh                   \
+  tests/install/install-C-selinux.sh           \
+  tests/install/strip-program.sh               \
+  tests/install/trap.sh                                \
+  tests/ln/backup-1.sh                         \
+  tests/ln/hard-backup.sh                      \
+  tests/ln/hard-to-sym.sh                      \
+  tests/ln/misc.sh                             \
+  tests/ln/relative.sh                         \
+  tests/ln/sf-1.sh                             \
+  tests/ln/slash-decorated-nonexistent-dest.sh \
+  tests/ln/target-1.sh                         \
+  tests/ls/abmon-align.sh                      \
+  tests/ls/block-size.sh                       \
+  tests/ls/color-clear-to-eol.sh               \
+  tests/ls/color-dtype-dir.sh                  \
+  tests/ls/color-norm.sh                       \
+  tests/ls/dangle.sh                           \
+  tests/ls/dired.sh                            \
+  tests/ls/file-type.sh                                \
+  tests/ls/follow-slink.sh                     \
+  tests/ls/getxattr-speedup.sh                 \
+  tests/ls/infloop.sh                          \
+  tests/ls/inode.sh                            \
+  tests/ls/m-option.sh                         \
+  tests/ls/multihardlink.sh                    \
+  tests/ls/no-arg.sh                           \
+  tests/ls/no-cap.sh                           \
+  tests/ls/proc-selinux-segfault.sh            \
+  tests/ls/readdir-mountpoint-inode.sh         \
+  tests/ls/recursive.sh                                \
+  tests/ls/root-rel-symlink-color.sh           \
+  tests/ls/rt-1.sh                             \
+  tests/ls/slink-acl.sh                                \
+  tests/ls/stat-dtype.sh                       \
+  tests/ls/stat-failed.sh                      \
+  tests/ls/stat-free-color.sh                  \
+  tests/ls/stat-free-symlinks.sh               \
+  tests/ls/stat-vs-dirent.sh                   \
+  tests/ls/symlink-slash.sh                    \
+  tests/ls/time-style-diag.sh                  \
+  tests/ls/x-option.sh                         \
+  tests/mkdir/p-1.sh                           \
+  tests/mkdir/p-2.sh                           \
+  tests/mkdir/p-3.sh                           \
+  tests/mkdir/p-slashdot.sh                    \
+  tests/mkdir/p-thru-slink.sh                  \
+  tests/mkdir/p-v.sh                           \
+  tests/mkdir/parents.sh                       \
+  tests/mkdir/perm.sh                          \
+  tests/mkdir/selinux.sh                       \
+  tests/mkdir/special-1.sh                     \
+  tests/mkdir/t-slash.sh                       \
+  tests/mv/acl.sh                              \
+  tests/mv/atomic.sh                           \
+  tests/mv/atomic2.sh                          \
+  tests/mv/backup-dir.sh                       \
+  tests/mv/backup-is-src.sh                    \
+  tests/mv/childproof.sh                       \
+  tests/mv/diag.sh                             \
+  tests/mv/dir-file.sh                         \
+  tests/mv/dir2dir.sh                          \
+  tests/mv/dup-source.sh                       \
+  tests/mv/force.sh                            \
+  tests/mv/hard-2.sh                           \
+  tests/mv/hard-3.sh                           \
+  tests/mv/hard-4.sh                           \
+  tests/mv/hard-link-1.sh                      \
+  tests/mv/hard-verbose.sh                     \
+  tests/mv/i-1.pl                              \
+  tests/mv/i-2.sh                              \
+  tests/mv/i-3.sh                              \
+  tests/mv/i-4.sh                              \
+  tests/mv/i-5.sh                              \
+  tests/mv/i-link-no.sh                                \
+  tests/mv/into-self.sh                                \
+  tests/mv/into-self-2.sh                      \
+  tests/mv/into-self-3.sh                      \
+  tests/mv/into-self-4.sh                      \
+  tests/mv/leak-fd.sh                          \
+  tests/mv/mv-n.sh                             \
+  tests/mv/mv-special-1.sh                     \
+  tests/mv/no-target-dir.sh                    \
+  tests/mv/part-fail.sh                                \
+  tests/mv/part-hardlink.sh                    \
+  tests/mv/part-rename.sh                      \
+  tests/mv/part-symlink.sh                     \
+  tests/mv/partition-perm.sh                   \
+  tests/mv/perm-1.sh                           \
+  tests/mv/symlink-onto-hardlink.sh            \
+  tests/mv/symlink-onto-hardlink-to-self.sh    \
+  tests/mv/to-symlink.sh                       \
+  tests/mv/trailing-slash.sh                   \
+  tests/mv/update.sh                           \
+  tests/readlink/can-e.sh                      \
+  tests/readlink/can-f.sh                      \
+  tests/readlink/can-m.sh                      \
+  tests/readlink/rl-1.sh                       \
+  tests/rmdir/fail-perm.sh                     \
+  tests/rmdir/ignore.sh                                \
+  tests/rmdir/t-slash.sh                       \
+  tests/tail-2/assert-2.sh                     \
+  tests/tail-2/big-4gb.sh                      \
+  tests/tail-2/flush-initial.sh                        \
+  tests/tail-2/follow-name.sh                  \
+  tests/tail-2/follow-stdin.sh                 \
+  tests/tail-2/pipe-f.sh                       \
+  tests/tail-2/pipe-f2.sh                      \
+  tests/tail-2/proc-ksyms.sh                   \
+  tests/tail-2/start-middle.sh                 \
+  tests/touch/60-seconds.sh                    \
+  tests/touch/dangling-symlink.sh              \
+  tests/touch/dir-1.sh                         \
+  tests/touch/fail-diag.sh                     \
+  tests/touch/fifo.sh                          \
+  tests/touch/no-create-missing.sh             \
+  tests/touch/no-dereference.sh                        \
+  tests/touch/no-rights.sh                     \
+  tests/touch/not-owner.sh                     \
+  tests/touch/obsolescent.sh                   \
+  tests/touch/read-only.sh                     \
+  tests/touch/relative.sh                      \
+  tests/touch/trailing-slash.sh                        \
+  $(all_root_tests)
+
+pr_data =                                      \
+  tests/pr/0F                                  \
+  tests/pr/0FF                                 \
+  tests/pr/0FFnt                               \
+  tests/pr/0FFt                                        \
+  tests/pr/0FnFnt                              \
+  tests/pr/0FnFt                               \
+  tests/pr/0Fnt                                        \
+  tests/pr/0Ft                                 \
+  tests/pr/2-S_f-t_notab                       \
+  tests/pr/2-Sf-t_notab                                \
+  tests/pr/2f-t_notab                          \
+  tests/pr/2s_f-t_notab                                \
+  tests/pr/2s_w60f-t_nota                      \
+  tests/pr/2sf-t_notab                         \
+  tests/pr/2sw60f-t_notab                      \
+  tests/pr/2w60f-t_notab                       \
+  tests/pr/3-0F                                        \
+  tests/pr/3-5l24f-t                           \
+  tests/pr/3-FF                                        \
+  tests/pr/3a2l17-FF                           \
+  tests/pr/3a3f-0F                             \
+  tests/pr/3a3l15-t                            \
+  tests/pr/3a3l15f-t                           \
+  tests/pr/3b2l17-FF                           \
+  tests/pr/3b3f-0F                             \
+  tests/pr/3b3f-0FF                            \
+  tests/pr/3b3f-FF                             \
+  tests/pr/3b3l15-t                            \
+  tests/pr/3b3l15f-t                           \
+  tests/pr/3f-0F                               \
+  tests/pr/3f-FF                               \
+  tests/pr/3l24-t                              \
+  tests/pr/3l24f-t                             \
+  tests/pr/3ml24-FF                            \
+  tests/pr/3ml24-t                             \
+  tests/pr/3ml24-t-FF                          \
+  tests/pr/3ml24f-t                            \
+  tests/pr/4-7l24-FF                           \
+  tests/pr/4l24-FF                             \
+  tests/pr/FF                                  \
+  tests/pr/FFn                                 \
+  tests/pr/FFtn                                        \
+  tests/pr/FnFn                                        \
+  tests/pr/Ja3l24f-lm                          \
+  tests/pr/Jb3l24f-lm                          \
+  tests/pr/Jml24f-lm-lo                                \
+  tests/pr/W-72l24f-ll                         \
+  tests/pr/W20l24f-ll                          \
+  tests/pr/W26l24f-ll                          \
+  tests/pr/W27l24f-ll                          \
+  tests/pr/W28l24f-ll                          \
+  tests/pr/W35Ja3l24f-lm                       \
+  tests/pr/W35Jb3l24f-lm                       \
+  tests/pr/W35Jml24f-lmlo                      \
+  tests/pr/W35a3l24f-lm                                \
+  tests/pr/W35b3l24f-lm                                \
+  tests/pr/W35ml24f-lm-lo                      \
+  tests/pr/W72Jl24f-ll                         \
+  tests/pr/a2l15-FF                            \
+  tests/pr/a2l17-FF                            \
+  tests/pr/a3-0F                               \
+  tests/pr/a3f-0F                              \
+  tests/pr/a3f-0FF                             \
+  tests/pr/a3f-FF                              \
+  tests/pr/a3l15-t                             \
+  tests/pr/a3l15f-t                            \
+  tests/pr/a3l24f-lm                           \
+  tests/pr/b2l15-FF                            \
+  tests/pr/b2l17-FF                            \
+  tests/pr/b3-0F                               \
+  tests/pr/b3f-0F                              \
+  tests/pr/b3f-0FF                             \
+  tests/pr/b3f-FF                              \
+  tests/pr/b3l15-t                             \
+  tests/pr/b3l15f-t                            \
+  tests/pr/b3l24f-lm                           \
+  tests/pr/l24-FF                              \
+  tests/pr/l24-t                               \
+  tests/pr/l24f-t                              \
+  tests/pr/loli                                        \
+  tests/pr/ml20-FF-t                           \
+  tests/pr/ml24-FF                             \
+  tests/pr/ml24-t                              \
+  tests/pr/ml24-t-FF                           \
+  tests/pr/ml24f-0F                            \
+  tests/pr/ml24f-lm-lo                         \
+  tests/pr/ml24f-t                             \
+  tests/pr/ml24f-t-0F                          \
+  tests/pr/n+2-5l24f-0FF                       \
+  tests/pr/n+2l24f-0FF                         \
+  tests/pr/n+2l24f-bl                          \
+  tests/pr/n+3-7l24-FF                         \
+  tests/pr/n+3l24f-0FF                         \
+  tests/pr/n+3l24f-bl                          \
+  tests/pr/n+3ml20f-bl-FF                      \
+  tests/pr/n+3ml24f-bl-tn                      \
+  tests/pr/n+3ml24f-tn-bl                      \
+  tests/pr/n+4-8a2l17-FF                       \
+  tests/pr/n+4b2l17f-0FF                       \
+  tests/pr/n+5-8b3l17f-FF                      \
+  tests/pr/n+5a3l13f-0FF                       \
+  tests/pr/n+6a2l17-FF                         \
+  tests/pr/n+6b3l13f-FF                                \
+  tests/pr/n+7l24-FF                           \
+  tests/pr/n+8l20-FF                           \
+  tests/pr/nJml24f-lmlmlo                      \
+  tests/pr/nJml24f-lmlolm                      \
+  tests/pr/nN1+3l24f-bl                                \
+  tests/pr/nN15l24f-bl                         \
+  tests/pr/nSml20-bl-FF                                \
+  tests/pr/nSml20-t-t-FF                       \
+  tests/pr/nSml20-t-tFFFF                      \
+  tests/pr/nSml24-bl-FF                                \
+  tests/pr/nSml24-t-t-FF                       \
+  tests/pr/nSml24-t-tFFFF                      \
+  tests/pr/nl24f-bl                            \
+  tests/pr/o3Jml24f-lm-lo                      \
+  tests/pr/o3a3Sl24f-tn                                \
+  tests/pr/o3a3Snl24f-tn                       \
+  tests/pr/o3a3l24f-tn                         \
+  tests/pr/o3b3Sl24f-tn                                \
+  tests/pr/o3b3Snl24f-tn                       \
+  tests/pr/o3b3l24f-tn                         \
+  tests/pr/o3mSl24f-bl-tn                      \
+  tests/pr/o3mSnl24fbltn                       \
+  tests/pr/o3ml24f-bl-tn                       \
+  tests/pr/t-0FF                               \
+  tests/pr/t-FF                                        \
+  tests/pr/t-bl                                        \
+  tests/pr/t-t                                 \
+  tests/pr/tFFn                                        \
+  tests/pr/tFFt                                        \
+  tests/pr/tFFt-bl                             \
+  tests/pr/tFFt-ll                             \
+  tests/pr/tFFt-lm                             \
+  tests/pr/tFnFt                               \
+  tests/pr/t_notab                             \
+  tests/pr/t_tab                               \
+  tests/pr/t_tab_                              \
+  tests/pr/ta3-0FF                             \
+  tests/pr/ta3-FF                              \
+  tests/pr/tb3-0FF                             \
+  tests/pr/tb3-FF                              \
+  tests/pr/tn                                  \
+  tests/pr/tn2e5o3-t_tab                       \
+  tests/pr/tn2e8-t_tab                         \
+  tests/pr/tn2e8o3-t_tab                       \
+  tests/pr/tn_2e8-t_tab                                \
+  tests/pr/tn_2e8S-t_tab                       \
+  tests/pr/tne8-t_tab                          \
+  tests/pr/tne8o3-t_tab                                \
+  tests/pr/tt-0FF                              \
+  tests/pr/tt-FF                               \
+  tests/pr/tt-bl                               \
+  tests/pr/tt-t                                        \
+  tests/pr/tta3-0FF                            \
+  tests/pr/tta3-FF                             \
+  tests/pr/ttb3-0FF                            \
+  tests/pr/ttb3-FF                             \
+  tests/pr/w72l24f-ll
diff --git a/tests/ls/abmon-align.sh b/tests/ls/abmon-align.sh
index 4285d07..086e1e6 100755
--- a/tests/ls/abmon-align.sh
+++ b/tests/ls/abmon-align.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 for mon in $(seq -w 12); do
diff --git a/tests/ls/block-size.sh b/tests/ls/block-size.sh
index 9975020..ff3378e 100755
--- a/tests/ls/block-size.sh
+++ b/tests/ls/block-size.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 TZ=UTC0
diff --git a/tests/ls/capability.sh b/tests/ls/capability.sh
index d5d5ee0..82bc6ad 100755
--- a/tests/ls/capability.sh
+++ b/tests/ls/capability.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 require_root_
 
diff --git a/tests/ls/color-clear-to-eol.sh b/tests/ls/color-clear-to-eol.sh
index 5dc6d16..8acbfa9 100755
--- a/tests/ls/color-clear-to-eol.sh
+++ b/tests/ls/color-clear-to-eol.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 long_name=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.foo
diff --git a/tests/ls/color-dtype-dir.sh b/tests/ls/color-dtype-dir.sh
index 69dffd7..60af3d5 100755
--- a/tests/ls/color-dtype-dir.sh
+++ b/tests/ls/color-dtype-dir.sh
@@ -19,7 +19,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 # Don't let a different umask perturb the results.
diff --git a/tests/ls/color-norm.sh b/tests/ls/color-norm.sh
index 28366fb..2b6ba0e 100755
--- a/tests/ls/color-norm.sh
+++ b/tests/ls/color-norm.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 # Don't let a different umask perturb the results.
diff --git a/tests/ls/dangle.sh b/tests/ls/dangle.sh
index dbc2447..46cac9b 100755
--- a/tests/ls/dangle.sh
+++ b/tests/ls/dangle.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 ln -s no-such-file dangle || framework_failure_
diff --git a/tests/ls/dired.sh b/tests/ls/dired.sh
index 6b55f43..c2db8af 100755
--- a/tests/ls/dired.sh
+++ b/tests/ls/dired.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 mkdir dir || framework_failure_
diff --git a/tests/ls/file-type.sh b/tests/ls/file-type.sh
index 3bb7937..20afa9b 100755
--- a/tests/ls/file-type.sh
+++ b/tests/ls/file-type.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 mkdir sub
diff --git a/tests/ls/follow-slink.sh b/tests/ls/follow-slink.sh
index d3c0d6e..328318f 100755
--- a/tests/ls/follow-slink.sh
+++ b/tests/ls/follow-slink.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 # Isolate output files from directory being listed
diff --git a/tests/ls/getxattr-speedup.sh b/tests/ls/getxattr-speedup.sh
index 967f7c9..9fe9817 100755
--- a/tests/ls/getxattr-speedup.sh
+++ b/tests/ls/getxattr-speedup.sh
@@ -19,7 +19,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 # Replace each getxattr and lgetxattr call with a call to these stubs.
diff --git a/tests/ls/infloop.sh b/tests/ls/infloop.sh
index 9652112..ba311f1 100755
--- a/tests/ls/infloop.sh
+++ b/tests/ls/infloop.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 mkdir loop || framework_failure_
diff --git a/tests/ls/inode.sh b/tests/ls/inode.sh
index 8bf5ba1..66ebda5 100755
--- a/tests/ls/inode.sh
+++ b/tests/ls/inode.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 touch f || framework_failure_
diff --git a/tests/ls/m-option.sh b/tests/ls/m-option.sh
index cc72e73..c1c78e2 100755
--- a/tests/ls/m-option.sh
+++ b/tests/ls/m-option.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 seq 2000 > b || framework_failure_
diff --git a/tests/ls/multihardlink.sh b/tests/ls/multihardlink.sh
index 68a5872..c621e9a 100755
--- a/tests/ls/multihardlink.sh
+++ b/tests/ls/multihardlink.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 working_umask_or_skip_
 
diff --git a/tests/ls/nameless-uid.sh b/tests/ls/nameless-uid.sh
index 5b45b09..372f381 100755
--- a/tests/ls/nameless-uid.sh
+++ b/tests/ls/nameless-uid.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 require_root_
diff --git a/tests/ls/no-arg.sh b/tests/ls/no-arg.sh
index 8e7d1d6..4c45de9 100755
--- a/tests/ls/no-arg.sh
+++ b/tests/ls/no-arg.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 mkdir -p dir/subdir || framework_failure_
diff --git a/tests/ls/no-cap.sh b/tests/ls/no-cap.sh
index 5e1e788..11d9336 100755
--- a/tests/ls/no-cap.sh
+++ b/tests/ls/no-cap.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 require_strace_ capget
 
diff --git a/tests/ls/proc-selinux-segfault.sh 
b/tests/ls/proc-selinux-segfault.sh
index da17ec4..824fafc 100755
--- a/tests/ls/proc-selinux-segfault.sh
+++ b/tests/ls/proc-selinux-segfault.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 f=/proc/sys
diff --git a/tests/ls/readdir-mountpoint-inode.sh 
b/tests/ls/readdir-mountpoint-inode.sh
index d46208b..bfe3898 100755
--- a/tests/ls/readdir-mountpoint-inode.sh
+++ b/tests/ls/readdir-mountpoint-inode.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 # We use --local here so as to not activate
diff --git a/tests/ls/recursive.sh b/tests/ls/recursive.sh
index 79fdc7f..e0fe3a3 100755
--- a/tests/ls/recursive.sh
+++ b/tests/ls/recursive.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 mkdir x y a b c a/1 a/2 a/3 || framework_failure_
diff --git a/tests/ls/root-rel-symlink-color.sh 
b/tests/ls/root-rel-symlink-color.sh
index d795432..f4a50ad 100755
--- a/tests/ls/root-rel-symlink-color.sh
+++ b/tests/ls/root-rel-symlink-color.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 symlink_to_rel=
diff --git a/tests/ls/rt-1.sh b/tests/ls/rt-1.sh
index f7d78df..f663500 100755
--- a/tests/ls/rt-1.sh
+++ b/tests/ls/rt-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls touch
 
 date=1998-01-15
diff --git a/tests/ls/slink-acl.sh b/tests/ls/slink-acl.sh
index ae9af50..00ebf75 100755
--- a/tests/ls/slink-acl.sh
+++ b/tests/ls/slink-acl.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 require_setfacl_
diff --git a/tests/ls/stat-dtype.sh b/tests/ls/stat-dtype.sh
index b84d5d5..e22f5a4 100755
--- a/tests/ls/stat-dtype.sh
+++ b/tests/ls/stat-dtype.sh
@@ -21,7 +21,7 @@
 # The trick is to create an un-stat'able symlink and to see if ls
 # can report its type nonetheless, using dirent.d_type.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 # Skip this test unless "." is on a file system with useful d_type info.
diff --git a/tests/ls/stat-failed.sh b/tests/ls/stat-failed.sh
index 464406b..c93295a 100755
--- a/tests/ls/stat-failed.sh
+++ b/tests/ls/stat-failed.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 skip_if_root_
 
diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
index daff2eb..4758f04 100755
--- a/tests/ls/stat-free-color.sh
+++ b/tests/ls/stat-free-color.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 require_strace_ stat
 require_dirent_d_type_
diff --git a/tests/ls/stat-free-symlinks.sh b/tests/ls/stat-free-symlinks.sh
index 8e04e2e..dbeee30 100755
--- a/tests/ls/stat-free-symlinks.sh
+++ b/tests/ls/stat-free-symlinks.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 require_strace_ stat
 
diff --git a/tests/ls/stat-vs-dirent.sh b/tests/ls/stat-vs-dirent.sh
index 1dd6e66..349ae8c 100755
--- a/tests/ls/stat-vs-dirent.sh
+++ b/tests/ls/stat-vs-dirent.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 
diff --git a/tests/ls/symlink-slash.sh b/tests/ls/symlink-slash.sh
index 28c7d32..048a7b8 100755
--- a/tests/ls/symlink-slash.sh
+++ b/tests/ls/symlink-slash.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 mkdir dir || framework_failure_
diff --git a/tests/ls/time-style-diag.sh b/tests/ls/time-style-diag.sh
index ae41c93..9fd6a84 100755
--- a/tests/ls/time-style-diag.sh
+++ b/tests/ls/time-style-diag.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 ls -l --time-style=XX > out 2> err
diff --git a/tests/ls/x-option.sh b/tests/ls/x-option.sh
index 38faa72..06f1b58 100755
--- a/tests/ls/x-option.sh
+++ b/tests/ls/x-option.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 mkdir subdir || framework_failure_
diff --git a/tests/misc/arch.sh b/tests/misc/arch.sh
index e1d7308..787ac1a 100755
--- a/tests/misc/arch.sh
+++ b/tests/misc/arch.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ arch
 
 require_built_ arch
diff --git a/tests/misc/cat-buf.sh b/tests/misc/cat-buf.sh
index 2b6ba2a..c8fbcd2 100755
--- a/tests/misc/cat-buf.sh
+++ b/tests/misc/cat-buf.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cat
 
 # Use a fifo rather than a pipe in the tests below
diff --git a/tests/misc/cat-proc.sh b/tests/misc/cat-proc.sh
index 082c727..0db0ebb 100755
--- a/tests/misc/cat-proc.sh
+++ b/tests/misc/cat-proc.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cat
 
 
diff --git a/tests/misc/chcon-fail.sh b/tests/misc/chcon-fail.sh
index d9f6c21..3e91afb 100755
--- a/tests/misc/chcon-fail.sh
+++ b/tests/misc/chcon-fail.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chcon
 
 
diff --git a/tests/misc/chcon.sh b/tests/misc/chcon.sh
index 6b44580..1a675b1 100755
--- a/tests/misc/chcon.sh
+++ b/tests/misc/chcon.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chcon
 require_root_
 require_selinux_
diff --git a/tests/misc/chroot-credentials.sh b/tests/misc/chroot-credentials.sh
index bae9d42..24842a8 100755
--- a/tests/misc/chroot-credentials.sh
+++ b/tests/misc/chroot-credentials.sh
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chroot
 
 require_root_
diff --git a/tests/misc/chroot-fail.sh b/tests/misc/chroot-fail.sh
index 6a5ecf3..4294cb9 100755
--- a/tests/misc/chroot-fail.sh
+++ b/tests/misc/chroot-fail.sh
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chroot
 
 
diff --git a/tests/misc/close-stdout.sh b/tests/misc/close-stdout.sh
index 8584dfe..ed6a38a 100755
--- a/tests/misc/close-stdout.sh
+++ b/tests/misc/close-stdout.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 p=$abs_top_builddir
diff --git a/tests/misc/csplit-1000.sh b/tests/misc/csplit-1000.sh
index 217097e..618575c 100755
--- a/tests/misc/csplit-1000.sh
+++ b/tests/misc/csplit-1000.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ csplit
 
 # Before coreutils-8.7, this would overrun the 6-byte filename_space buffer.
diff --git a/tests/misc/csplit-heap.sh b/tests/misc/csplit-heap.sh
index f12f9fe..cc86ce9 100755
--- a/tests/misc/csplit-heap.sh
+++ b/tests/misc/csplit-heap.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ csplit
 
 require_ulimit_
diff --git a/tests/misc/csplit.sh b/tests/misc/csplit.sh
index aea2e91..28f07c9 100755
--- a/tests/misc/csplit.sh
+++ b/tests/misc/csplit.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ csplit
 
 
diff --git a/tests/misc/date-sec.sh b/tests/misc/date-sec.sh
index a46b479..8a8c8cc 100755
--- a/tests/misc/date-sec.sh
+++ b/tests/misc/date-sec.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ date
 
 
diff --git a/tests/misc/env-null.sh b/tests/misc/env-null.sh
index 0190bf4..844b4a8 100755
--- a/tests/misc/env-null.sh
+++ b/tests/misc/env-null.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ env printenv
 
 # POSIX is clear that environ may, but need not be, sorted.
diff --git a/tests/misc/env.sh b/tests/misc/env.sh
index 6f8c064..2a4ac3e 100755
--- a/tests/misc/env.sh
+++ b/tests/misc/env.sh
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ env
 
 
diff --git a/tests/misc/false-status.sh b/tests/misc/false-status.sh
index d192bbd..6af1859 100755
--- a/tests/misc/false-status.sh
+++ b/tests/misc/false-status.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ false
 
 false --version > /dev/null && fail=1
diff --git a/tests/misc/groups-dash.sh b/tests/misc/groups-dash.sh
index 24e7b9a..efaef12 100755
--- a/tests/misc/groups-dash.sh
+++ b/tests/misc/groups-dash.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ groups
 require_built_ groups
 
diff --git a/tests/misc/groups-version.sh b/tests/misc/groups-version.sh
index 9a8bf39..c06c0b1 100755
--- a/tests/misc/groups-version.sh
+++ b/tests/misc/groups-version.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ groups
 require_built_ groups
 
diff --git a/tests/misc/head-c.sh b/tests/misc/head-c.sh
index 32f86d2..a79ff1b 100755
--- a/tests/misc/head-c.sh
+++ b/tests/misc/head-c.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ head
 
 echo abc > in || framework_failure_
diff --git a/tests/misc/head-pos.sh b/tests/misc/head-pos.sh
index fa3284e..e4043fc 100755
--- a/tests/misc/head-pos.sh
+++ b/tests/misc/head-pos.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ head
 
 (echo a; echo b) > in || framework_failure_
diff --git a/tests/misc/help-version.sh b/tests/misc/help-version.sh
index f2ac0e9..ebbaff5 100755
--- a/tests/misc/help-version.sh
+++ b/tests/misc/help-version.sh
@@ -23,7 +23,7 @@
 test "x$SHELL" = x && SHELL=/bin/sh
 export SHELL
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 
 expected_failure_status_chroot=125
 expected_failure_status_env=125
diff --git a/tests/misc/id-context.sh b/tests/misc/id-context.sh
index 73645a0..225cb7a 100755
--- a/tests/misc/id-context.sh
+++ b/tests/misc/id-context.sh
@@ -15,7 +15,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ id
 # Require selinux - when selinux is disabled, id never prints scontext.
 require_selinux_
diff --git a/tests/misc/id-groups.sh b/tests/misc/id-groups.sh
index 815dd55..c642929 100755
--- a/tests/misc/id-groups.sh
+++ b/tests/misc/id-groups.sh
@@ -15,7 +15,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ id
 
 id -G $(id -nu) || fail=1
diff --git a/tests/misc/id-setgid.sh b/tests/misc/id-setgid.sh
index 12fab38..30aaffc 100755
--- a/tests/misc/id-setgid.sh
+++ b/tests/misc/id-setgid.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ id
 require_root_
 
diff --git a/tests/misc/ls-time.sh b/tests/misc/ls-time.sh
index 7d1f205..2eaa37d 100755
--- a/tests/misc/ls-time.sh
+++ b/tests/misc/ls-time.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ls
 
 # Avoid any possible glitches due to daylight-saving changes near the
diff --git a/tests/misc/md5sum-bsd.sh b/tests/misc/md5sum-bsd.sh
index ce41176..1337c3d 100755
--- a/tests/misc/md5sum-bsd.sh
+++ b/tests/misc/md5sum-bsd.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ md5sum
 
 ## BSD alternate format tests ##
diff --git a/tests/misc/md5sum-parallel.sh b/tests/misc/md5sum-parallel.sh
index 0bf5fa9..ee9f575 100755
--- a/tests/misc/md5sum-parallel.sh
+++ b/tests/misc/md5sum-parallel.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ md5sum
 
 (mkdir tmp && cd tmp && seq 500 | xargs touch)
diff --git a/tests/misc/mknod.sh b/tests/misc/mknod.sh
index b9e33ad..1378b57 100755
--- a/tests/misc/mknod.sh
+++ b/tests/misc/mknod.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mknod
 
 # Ensure fifos are supported
diff --git a/tests/misc/nice-fail.sh b/tests/misc/nice-fail.sh
index 599c981..252c79a 100755
--- a/tests/misc/nice-fail.sh
+++ b/tests/misc/nice-fail.sh
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ nice
 
 
diff --git a/tests/misc/nice.sh b/tests/misc/nice.sh
index ac8ea04..a73e371 100755
--- a/tests/misc/nice.sh
+++ b/tests/misc/nice.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ nice
 
 tests='
diff --git a/tests/misc/nl.sh b/tests/misc/nl.sh
index b5a4ac6..1239643 100755
--- a/tests/misc/nl.sh
+++ b/tests/misc/nl.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ nl
 
 
diff --git a/tests/misc/nohup.sh b/tests/misc/nohup.sh
index 76f676d..2f3fb4e 100755
--- a/tests/misc/nohup.sh
+++ b/tests/misc/nohup.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ nohup
 
 
diff --git a/tests/misc/nproc-avail.sh b/tests/misc/nproc-avail.sh
index cf0846c..86b7aa1 100755
--- a/tests/misc/nproc-avail.sh
+++ b/tests/misc/nproc-avail.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ nproc
 
 all=$(nproc --all)
diff --git a/tests/misc/nproc-positive.sh b/tests/misc/nproc-positive.sh
index d930fb8..4737b7c 100755
--- a/tests/misc/nproc-positive.sh
+++ b/tests/misc/nproc-positive.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ nproc
 
 for mode in --all ''; do
diff --git a/tests/misc/od-N.sh b/tests/misc/od-N.sh
index 00d956a..81d8b66 100755
--- a/tests/misc/od-N.sh
+++ b/tests/misc/od-N.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ od
 
 echo abcdefg > in || framework_failure_
diff --git a/tests/misc/od-float.sh b/tests/misc/od-float.sh
index a23a8f3..3b1ae91 100755
--- a/tests/misc/od-float.sh
+++ b/tests/misc/od-float.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ od
 
 export LC_ALL=C
diff --git a/tests/misc/od-multiple-t.sh b/tests/misc/od-multiple-t.sh
index 049273c..f7cbc97 100755
--- a/tests/misc/od-multiple-t.sh
+++ b/tests/misc/od-multiple-t.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ od
 
 # Choose 48 bytes for the input, as that is lcm for 1, 2, 4, 8, 12, 16;
diff --git a/tests/misc/od-x8.sh b/tests/misc/od-x8.sh
index 98a9fe9..7037942 100755
--- a/tests/misc/od-x8.sh
+++ b/tests/misc/od-x8.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ od
 
 od -t x8 /dev/null >/dev/null ||
diff --git a/tests/misc/pathchk1.sh b/tests/misc/pathchk1.sh
index 373b545..ccc97ed 100755
--- a/tests/misc/pathchk1.sh
+++ b/tests/misc/pathchk1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ pathchk
 skip_if_root_
 
diff --git a/tests/misc/printenv.sh b/tests/misc/printenv.sh
index bbce8ef..95085f1 100755
--- a/tests/misc/printenv.sh
+++ b/tests/misc/printenv.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ printenv
 
 # Without arguments, printenv behaves like env.  Some shells provide
diff --git a/tests/misc/printf-hex.sh b/tests/misc/printf-hex.sh
index 23a218f..82b4897 100755
--- a/tests/misc/printf-hex.sh
+++ b/tests/misc/printf-hex.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ printf
 
 env printf '\x7e3\n' > out || fail=1
diff --git a/tests/misc/printf-surprise.sh b/tests/misc/printf-surprise.sh
index b6f6275..ad01a61 100755
--- a/tests/misc/printf-surprise.sh
+++ b/tests/misc/printf-surprise.sh
@@ -18,7 +18,7 @@
 
 prog=printf
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ printf
 
 require_ulimit_
diff --git a/tests/misc/printf.sh b/tests/misc/printf.sh
index 987e452..5a272b6 100755
--- a/tests/misc/printf.sh
+++ b/tests/misc/printf.sh
@@ -18,7 +18,7 @@
 
 prog='env printf'
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ printf
 
 getlimits_
diff --git a/tests/misc/ptx-overrun.sh b/tests/misc/ptx-overrun.sh
index e7eaf0b..3450657 100755
--- a/tests/misc/ptx-overrun.sh
+++ b/tests/misc/ptx-overrun.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ ptx
 
 # Using a long file name makes an abort more likely.
diff --git a/tests/misc/pwd-long.sh b/tests/misc/pwd-long.sh
index 051509a..456c64b 100755
--- a/tests/misc/pwd-long.sh
+++ b/tests/misc/pwd-long.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ pwd
 
 require_readable_root_
@@ -28,7 +28,7 @@ export ARGV_0
 
 # Don't use CuTmpdir here, since File::Temp's use of rmtree can't
 # remove the deep tree we create.
-$PERL -Tw -I"$abs_srcdir" -MCuSkip -- - <<\EOF
+$PERL -Tw -I"$abs_srcdir/tests" -MCuSkip -- - <<\EOF
 
 # Show that pwd works even when the length of the resulting
 # directory name is longer than PATH_MAX.
diff --git a/tests/misc/pwd-option.sh b/tests/misc/pwd-option.sh
index a7a4737..bd7c6a6 100755
--- a/tests/misc/pwd-option.sh
+++ b/tests/misc/pwd-option.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ pwd
 
 mkdir -p a/b || framework_failure_
diff --git a/tests/misc/readlink-fp-loop.sh b/tests/misc/readlink-fp-loop.sh
index 65fab78..b222a6d 100755
--- a/tests/misc/readlink-fp-loop.sh
+++ b/tests/misc/readlink-fp-loop.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ readlink
 cwd=$("$abs_top_builddir/src/pwd")
 
diff --git a/tests/misc/readlink-root.sh b/tests/misc/readlink-root.sh
index f69bad6..6a12e2f 100755
--- a/tests/misc/readlink-root.sh
+++ b/tests/misc/readlink-root.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ readlink
 
 stat_single=$(stat -c %d:%i /) || framework_failure_
diff --git a/tests/misc/realpath.sh b/tests/misc/realpath.sh
index 9484ac4..43445f7 100755
--- a/tests/misc/realpath.sh
+++ b/tests/misc/realpath.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ realpath
 
 stat_single=$(stat -c %d:%i /) || framework_failure_
diff --git a/tests/misc/runcon-no-reorder.sh b/tests/misc/runcon-no-reorder.sh
index 351896e..391974a 100755
--- a/tests/misc/runcon-no-reorder.sh
+++ b/tests/misc/runcon-no-reorder.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ runcon
 
 diag='runcon: runcon may be used only on a SELinux kernel'
diff --git a/tests/misc/selinux.sh b/tests/misc/selinux.sh
index 12ae15f..c2edbea 100755
--- a/tests/misc/selinux.sh
+++ b/tests/misc/selinux.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ chcon cp ls mv stat
 
 require_root_
diff --git a/tests/misc/seq-long-double.sh b/tests/misc/seq-long-double.sh
index 5a511d7..976aaff 100755
--- a/tests/misc/seq-long-double.sh
+++ b/tests/misc/seq-long-double.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ seq
 getlimits_
 
diff --git a/tests/misc/shred-exact.sh b/tests/misc/shred-exact.sh
index 22d14c3..32d9178 100755
--- a/tests/misc/shred-exact.sh
+++ b/tests/misc/shred-exact.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ shred
 
 
diff --git a/tests/misc/shred-passes.sh b/tests/misc/shred-passes.sh
index 4ff80d7..50ae96d 100755
--- a/tests/misc/shred-passes.sh
+++ b/tests/misc/shred-passes.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ shred
 
 
diff --git a/tests/misc/shred-remove.sh b/tests/misc/shred-remove.sh
index c060a21..e6f0752 100755
--- a/tests/misc/shred-remove.sh
+++ b/tests/misc/shred-remove.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ shred
 skip_if_root_
 
diff --git a/tests/misc/shuf.sh b/tests/misc/shuf.sh
index 243c049..c98e25a 100755
--- a/tests/misc/shuf.sh
+++ b/tests/misc/shuf.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ shuf
 getlimits_
 
diff --git a/tests/misc/sort-NaN-infloop.sh b/tests/misc/sort-NaN-infloop.sh
index e64d385..9a8c464 100755
--- a/tests/misc/sort-NaN-infloop.sh
+++ b/tests/misc/sort-NaN-infloop.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 echo nan > F || fail=1
diff --git a/tests/misc/sort-benchmark-random.sh 
b/tests/misc/sort-benchmark-random.sh
index 9eb9a63..bdd1cc5 100755
--- a/tests/misc/sort-benchmark-random.sh
+++ b/tests/misc/sort-benchmark-random.sh
@@ -18,7 +18,7 @@
 
 # Written by Glen Lenker.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 very_expensive_
diff --git a/tests/misc/sort-compress-hang.sh b/tests/misc/sort-compress-hang.sh
index e1b8ff0..a104689 100755
--- a/tests/misc/sort-compress-hang.sh
+++ b/tests/misc/sort-compress-hang.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 very_expensive_
 
diff --git a/tests/misc/sort-compress-proc.sh b/tests/misc/sort-compress-proc.sh
index 7ee0fd1..c800fcb 100755
--- a/tests/misc/sort-compress-proc.sh
+++ b/tests/misc/sort-compress-proc.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 expensive_
 
diff --git a/tests/misc/sort-compress.sh b/tests/misc/sort-compress.sh
index 00dcf06..3249982 100755
--- a/tests/misc/sort-compress.sh
+++ b/tests/misc/sort-compress.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 seq -w 2000 > exp || framework_failure_
diff --git a/tests/misc/sort-continue.sh b/tests/misc/sort-continue.sh
index 1491dbf..184c2f7 100755
--- a/tests/misc/sort-continue.sh
+++ b/tests/misc/sort-continue.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 # Skip the test when running under valgrind.
diff --git a/tests/misc/sort-debug-keys.sh b/tests/misc/sort-debug-keys.sh
index a284e84..c8ceecb 100755
--- a/tests/misc/sort-debug-keys.sh
+++ b/tests/misc/sort-debug-keys.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 number() { cat -n | sed 's/^ *//'; }
diff --git a/tests/misc/sort-debug-warn.sh b/tests/misc/sort-debug-warn.sh
index 504a2d2..4c195be 100755
--- a/tests/misc/sort-debug-warn.sh
+++ b/tests/misc/sort-debug-warn.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 cat <<\EOF > exp
diff --git a/tests/misc/sort-discrim.sh b/tests/misc/sort-discrim.sh
index fced204..af457ce 100755
--- a/tests/misc/sort-discrim.sh
+++ b/tests/misc/sort-discrim.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 # Set limit variables.
diff --git a/tests/misc/sort-exit-early.sh b/tests/misc/sort-exit-early.sh
index 5ad6d41..ce5f498 100755
--- a/tests/misc/sort-exit-early.sh
+++ b/tests/misc/sort-exit-early.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 skip_if_root_
 
diff --git a/tests/misc/sort-float.sh b/tests/misc/sort-float.sh
index b585b9b..67e0767 100755
--- a/tests/misc/sort-float.sh
+++ b/tests/misc/sort-float.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 # Return 0 if LDBL_MIN is smaller than DBL_MIN, else 1.
diff --git a/tests/misc/sort-merge-fdlimit.sh b/tests/misc/sort-merge-fdlimit.sh
index 7ce109c..d3f8cf3 100755
--- a/tests/misc/sort-merge-fdlimit.sh
+++ b/tests/misc/sort-merge-fdlimit.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 require_ulimit_
 
diff --git a/tests/misc/sort-month.sh b/tests/misc/sort-month.sh
index fa1e695..18e5c26 100755
--- a/tests/misc/sort-month.sh
+++ b/tests/misc/sort-month.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 locale --version >/dev/null 2>&1 ||
diff --git a/tests/misc/sort-rand.sh b/tests/misc/sort-rand.sh
index 1782a9a..56de19a 100755
--- a/tests/misc/sort-rand.sh
+++ b/tests/misc/sort-rand.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 seq 100 > in || framework_failure_
diff --git a/tests/misc/sort-spinlock-abuse.sh 
b/tests/misc/sort-spinlock-abuse.sh
index 628326f..7ac43f8 100755
--- a/tests/misc/sort-spinlock-abuse.sh
+++ b/tests/misc/sort-spinlock-abuse.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 # This isn't terribly expensive, but it must not be run under heavy load.
diff --git a/tests/misc/sort-stale-thread-mem.sh 
b/tests/misc/sort-stale-thread-mem.sh
index 05cc9ba..3ed0b6e 100755
--- a/tests/misc/sort-stale-thread-mem.sh
+++ b/tests/misc/sort-stale-thread-mem.sh
@@ -18,7 +18,7 @@
 
 # written by Jim Meyering and Paul Eggert
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 very_expensive_
diff --git a/tests/misc/sort-u-FMR.sh b/tests/misc/sort-u-FMR.sh
index 303b429..d628566 100755
--- a/tests/misc/sort-u-FMR.sh
+++ b/tests/misc/sort-u-FMR.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 require_valgrind_
 
diff --git a/tests/misc/sort-unique-segv.sh b/tests/misc/sort-unique-segv.sh
index b853cfe..5ef0d02 100755
--- a/tests/misc/sort-unique-segv.sh
+++ b/tests/misc/sort-unique-segv.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null ||
diff --git a/tests/misc/sort-unique.sh b/tests/misc/sort-unique.sh
index 275cbeb..a379348 100755
--- a/tests/misc/sort-unique.sh
+++ b/tests/misc/sort-unique.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 cat > in <<\EOF
diff --git a/tests/misc/sort-version.sh b/tests/misc/sort-version.sh
index cb9acab..84b1606 100755
--- a/tests/misc/sort-version.sh
+++ b/tests/misc/sort-version.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sort
 
 cat > in << _EOF_
diff --git a/tests/misc/stat-birthtime.sh b/tests/misc/stat-birthtime.sh
index dd68e67..524de88 100755
--- a/tests/misc/stat-birthtime.sh
+++ b/tests/misc/stat-birthtime.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stat
 
 # Whether birthtime is supported or not, it better not change even when
diff --git a/tests/misc/stat-fmt.sh b/tests/misc/stat-fmt.sh
index 8952a7a..bc23555 100755
--- a/tests/misc/stat-fmt.sh
+++ b/tests/misc/stat-fmt.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stat
 
 
diff --git a/tests/misc/stat-hyphen.sh b/tests/misc/stat-hyphen.sh
index a6b5243..292e70e 100755
--- a/tests/misc/stat-hyphen.sh
+++ b/tests/misc/stat-hyphen.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stat
 
 printf -- '-\n' > exp || framework_failure_
diff --git a/tests/misc/stat-mount.sh b/tests/misc/stat-mount.sh
index c93d8dc..d262ceb 100755
--- a/tests/misc/stat-mount.sh
+++ b/tests/misc/stat-mount.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stat
 
 df_mnt=$(df -P . | sed -n '2s/.* \([^ ]*$\)/\1/p')
diff --git a/tests/misc/stat-nanoseconds.sh b/tests/misc/stat-nanoseconds.sh
index 1afb610..0659b59 100755
--- a/tests/misc/stat-nanoseconds.sh
+++ b/tests/misc/stat-nanoseconds.sh
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 print_ver_ stat
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 
 # Set this to avoid problems with weird time zones.
 TZ=UTC0
diff --git a/tests/misc/stat-slash.sh b/tests/misc/stat-slash.sh
index ff122eb..ee52beb 100755
--- a/tests/misc/stat-slash.sh
+++ b/tests/misc/stat-slash.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stat
 
 touch file || framework_failure_
diff --git a/tests/misc/stdbuf.sh b/tests/misc/stdbuf.sh
index 3164df1..ecc211e 100755
--- a/tests/misc/stdbuf.sh
+++ b/tests/misc/stdbuf.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stdbuf
 
 getlimits_
diff --git a/tests/misc/stty-invalid.sh b/tests/misc/stty-invalid.sh
index 3b035ec..d07e3ad 100755
--- a/tests/misc/stty-invalid.sh
+++ b/tests/misc/stty-invalid.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stty
 require_controlling_input_terminal_
 trap '' TTOU # Ignore SIGTTOU
diff --git a/tests/misc/stty-pairs.sh b/tests/misc/stty-pairs.sh
index e59da04..5398673 100755
--- a/tests/misc/stty-pairs.sh
+++ b/tests/misc/stty-pairs.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stty
 
 expensive_
diff --git a/tests/misc/stty-row-col.sh b/tests/misc/stty-row-col.sh
index d7151d5..f5a42d5 100755
--- a/tests/misc/stty-row-col.sh
+++ b/tests/misc/stty-row-col.sh
@@ -28,7 +28,7 @@ export COLUMNS
 LC_ALL=C
 export LC_ALL
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stty
 
 require_controlling_input_terminal_
diff --git a/tests/misc/stty.sh b/tests/misc/stty.sh
index ae65656..6d04c78 100755
--- a/tests/misc/stty.sh
+++ b/tests/misc/stty.sh
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure there's a tty on stdin.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ stty
 
 require_controlling_input_terminal_
diff --git a/tests/misc/sum-sysv.sh b/tests/misc/sum-sysv.sh
index 9cdf07f..147749c 100755
--- a/tests/misc/sum-sysv.sh
+++ b/tests/misc/sum-sysv.sh
@@ -22,7 +22,7 @@
 LC_ALL=C
 export LC_ALL
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ sum
 
 require_perl_
diff --git a/tests/misc/tac-2-nonseekable.sh b/tests/misc/tac-2-nonseekable.sh
index f980f3b..32fa90d 100755
--- a/tests/misc/tac-2-nonseekable.sh
+++ b/tests/misc/tac-2-nonseekable.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tac
 
 echo x | tac - - > out 2> err || fail=1
diff --git a/tests/misc/tac-continue.sh b/tests/misc/tac-continue.sh
index d9cc550..10129bf 100755
--- a/tests/misc/tac-continue.sh
+++ b/tests/misc/tac-continue.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tac
 
 # See if the envvar is defined.
diff --git a/tests/misc/tee-dash.sh b/tests/misc/tee-dash.sh
index 8ee0820..bcc1e13 100755
--- a/tests/misc/tee-dash.sh
+++ b/tests/misc/tee-dash.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tee
 
 tee - </dev/null || fail=1
diff --git a/tests/misc/tee.sh b/tests/misc/tee.sh
index 4c17316..d461810 100755
--- a/tests/misc/tee.sh
+++ b/tests/misc/tee.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tee
 
 echo line >sample || framework_failure_
diff --git a/tests/misc/timeout-group.sh b/tests/misc/timeout-group.sh
index 7a08bb3..4cefc33 100755
--- a/tests/misc/timeout-group.sh
+++ b/tests/misc/timeout-group.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ timeout
 
 # construct a program group hierarchy as follows:
diff --git a/tests/misc/timeout-parameters.sh b/tests/misc/timeout-parameters.sh
index c7d6630..e78c89f 100755
--- a/tests/misc/timeout-parameters.sh
+++ b/tests/misc/timeout-parameters.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ timeout
 getlimits_
 
diff --git a/tests/misc/timeout.sh b/tests/misc/timeout.sh
index 5f4e9ec..57a4e15 100755
--- a/tests/misc/timeout.sh
+++ b/tests/misc/timeout.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ timeout
 
 # no timeout
diff --git a/tests/misc/tr-case-class.sh b/tests/misc/tr-case-class.sh
index 2f70f4e..ef00a28 100755
--- a/tests/misc/tr-case-class.sh
+++ b/tests/misc/tr-case-class.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tr
 
 # Ensure we support translation of case classes with extension
diff --git a/tests/misc/truncate-dangling-symlink.sh 
b/tests/misc/truncate-dangling-symlink.sh
index d9175d4..b077fd0 100755
--- a/tests/misc/truncate-dangling-symlink.sh
+++ b/tests/misc/truncate-dangling-symlink.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ truncate
 
 ln -s truncate-target t-symlink
diff --git a/tests/misc/truncate-dir-fail.sh b/tests/misc/truncate-dir-fail.sh
index 54a3147..aad0ff4 100755
--- a/tests/misc/truncate-dir-fail.sh
+++ b/tests/misc/truncate-dir-fail.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ truncate
 
 # truncate on dir not allowed
diff --git a/tests/misc/truncate-fail-diag.sh b/tests/misc/truncate-fail-diag.sh
index 994ee0b..5957fbe 100755
--- a/tests/misc/truncate-fail-diag.sh
+++ b/tests/misc/truncate-fail-diag.sh
@@ -20,7 +20,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ truncate
 skip_if_root_
 
diff --git a/tests/misc/truncate-fifo.sh b/tests/misc/truncate-fifo.sh
index 6588f0a..bd701db 100755
--- a/tests/misc/truncate-fifo.sh
+++ b/tests/misc/truncate-fifo.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ truncate
 
 mkfifo_or_skip_ fifo
diff --git a/tests/misc/truncate-no-create-missing.sh 
b/tests/misc/truncate-no-create-missing.sh
index 56b2ac1..eccb35d 100755
--- a/tests/misc/truncate-no-create-missing.sh
+++ b/tests/misc/truncate-no-create-missing.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ truncate
 
 
diff --git a/tests/misc/truncate-overflow.sh b/tests/misc/truncate-overflow.sh
index 9ec353f..8d32d49 100755
--- a/tests/misc/truncate-overflow.sh
+++ b/tests/misc/truncate-overflow.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ truncate
 getlimits_
 
diff --git a/tests/misc/truncate-owned-by-other.sh 
b/tests/misc/truncate-owned-by-other.sh
index 9316086..520fa69 100755
--- a/tests/misc/truncate-owned-by-other.sh
+++ b/tests/misc/truncate-owned-by-other.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ truncate
 
 require_root_
diff --git a/tests/misc/truncate-parameters.sh 
b/tests/misc/truncate-parameters.sh
index 13a8475..f524711 100755
--- a/tests/misc/truncate-parameters.sh
+++ b/tests/misc/truncate-parameters.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ truncate
 
 
diff --git a/tests/misc/truncate-relative.sh b/tests/misc/truncate-relative.sh
index 19543db..353dd84 100755
--- a/tests/misc/truncate-relative.sh
+++ b/tests/misc/truncate-relative.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ truncate
 
 
diff --git a/tests/misc/uniq-perf.sh b/tests/misc/uniq-perf.sh
index 57794c3..99739d7 100755
--- a/tests/misc/uniq-perf.sh
+++ b/tests/misc/uniq-perf.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ uniq
 
 seq 100 > in || fail=1
diff --git a/tests/misc/wc-files0.sh b/tests/misc/wc-files0.sh
index 9a0d050..e6e6a32 100755
--- a/tests/misc/wc-files0.sh
+++ b/tests/misc/wc-files0.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ wc
 
 echo 2 > 2b || framework_failure_
diff --git a/tests/misc/wc-parallel.sh b/tests/misc/wc-parallel.sh
index 6611b47..4893b35 100755
--- a/tests/misc/wc-parallel.sh
+++ b/tests/misc/wc-parallel.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ wc
 
 (mkdir tmp && cd tmp && seq 2000 | xargs touch)
diff --git a/tests/misc/xattr.sh b/tests/misc/xattr.sh
index ff50e6c..9871adf 100755
--- a/tests/misc/xattr.sh
+++ b/tests/misc/xattr.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp mv ginstall
 
 # Skip this test if cp was built without xattr support:
@@ -28,7 +28,7 @@ cp --preserve=xattr -n src dest \
 
 # this code was taken from test mv/backup-is-src
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 b_other="$other_partition_tmpdir/b"
 rm -f "$b_other" || framework_failure_
 
diff --git a/tests/mkdir/p-1.sh b/tests/mkdir/p-1.sh
index cd8e676..0ae322c 100755
--- a/tests/mkdir/p-1.sh
+++ b/tests/mkdir/p-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 
 mkdir --parents "$(pwd)/t" || fail=1
diff --git a/tests/mkdir/p-2.sh b/tests/mkdir/p-2.sh
index d0c487e..6ddedbc 100755
--- a/tests/mkdir/p-2.sh
+++ b/tests/mkdir/p-2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 
 mkdir --parents "$(pwd)/t/u" || fail=1
diff --git a/tests/mkdir/p-3.sh b/tests/mkdir/p-3.sh
index 7031b2e..a80fa37 100755
--- a/tests/mkdir/p-3.sh
+++ b/tests/mkdir/p-3.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 skip_if_root_
 
diff --git a/tests/mkdir/p-slashdot.sh b/tests/mkdir/p-slashdot.sh
index 76d21d0..e59198a 100755
--- a/tests/mkdir/p-slashdot.sh
+++ b/tests/mkdir/p-slashdot.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 
 
diff --git a/tests/mkdir/p-thru-slink.sh b/tests/mkdir/p-thru-slink.sh
index 3f59932..3c8baf6 100755
--- a/tests/mkdir/p-thru-slink.sh
+++ b/tests/mkdir/p-thru-slink.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 
 ln -s . slink || framework_failure_
diff --git a/tests/mkdir/p-v.sh b/tests/mkdir/p-v.sh
index d6dcfdd..ea37246 100755
--- a/tests/mkdir/p-v.sh
+++ b/tests/mkdir/p-v.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 
 mkdir -pv foo/a/b/c/d >out || fail=1
diff --git a/tests/mkdir/parents.sh b/tests/mkdir/parents.sh
index 0543e67..876c5a0 100755
--- a/tests/mkdir/parents.sh
+++ b/tests/mkdir/parents.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 skip_if_setgid_
 
diff --git a/tests/mkdir/perm.sh b/tests/mkdir/perm.sh
index f9b207f..3cdd37f 100755
--- a/tests/mkdir/perm.sh
+++ b/tests/mkdir/perm.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 skip_if_setgid_
 
diff --git a/tests/mkdir/selinux.sh b/tests/mkdir/selinux.sh
index 7632362..bb1aab9 100755
--- a/tests/mkdir/selinux.sh
+++ b/tests/mkdir/selinux.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir mkfifo mknod
 
 # Note: on an SELinux/enforcing system running mcstransd older than
diff --git a/tests/mkdir/special-1.sh b/tests/mkdir/special-1.sh
index d478930..d9305bb 100755
--- a/tests/mkdir/special-1.sh
+++ b/tests/mkdir/special-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 
 set_mode_string=u=rwx,g=rx,o=w,-s,+t
diff --git a/tests/mkdir/t-slash.sh b/tests/mkdir/t-slash.sh
index 7b3c1ba..5645a07 100755
--- a/tests/mkdir/t-slash.sh
+++ b/tests/mkdir/t-slash.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 
 
diff --git a/tests/mkdir/writable-under-readonly.sh 
b/tests/mkdir/writable-under-readonly.sh
index 93e46d5..16f4a92 100755
--- a/tests/mkdir/writable-under-readonly.sh
+++ b/tests/mkdir/writable-under-readonly.sh
@@ -24,7 +24,7 @@
 #
 # Demonstrate the problem, as root:
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mkdir
 require_root_
 
diff --git a/tests/mv/acl.sh b/tests/mv/acl.sh
index 2354ed9..9fe26e4 100755
--- a/tests/mv/acl.sh
+++ b/tests/mv/acl.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv getfacl setfacl
 
 require_acl_
@@ -27,7 +27,7 @@ grep '^#define USE_ACL 1' $CONFIG_HEADER > /dev/null ||
   skip_ "insufficient ACL support"
 
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 touch file || framework_failure_
 t1=$other_partition_tmpdir/t1
diff --git a/tests/mv/atomic.sh b/tests/mv/atomic.sh
index e5391c3..79894ac 100755
--- a/tests/mv/atomic.sh
+++ b/tests/mv/atomic.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 require_strace_ unlink
 
diff --git a/tests/mv/atomic2.sh b/tests/mv/atomic2.sh
index d9c55e2..139b02f 100755
--- a/tests/mv/atomic2.sh
+++ b/tests/mv/atomic2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 require_strace_ unlink
 
diff --git a/tests/mv/backup-dir.sh b/tests/mv/backup-dir.sh
index 40f2c75..7a486da 100755
--- a/tests/mv/backup-dir.sh
+++ b/tests/mv/backup-dir.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 mkdir A B || framework_failure_
diff --git a/tests/mv/backup-is-src.sh b/tests/mv/backup-is-src.sh
index e1383a1..0d4c3e7 100755
--- a/tests/mv/backup-is-src.sh
+++ b/tests/mv/backup-is-src.sh
@@ -16,10 +16,10 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 a="$other_partition_tmpdir/a"
 a2="$other_partition_tmpdir/a~"
diff --git a/tests/mv/childproof.sh b/tests/mv/childproof.sh
index efe7225..94fb5cd 100755
--- a/tests/mv/childproof.sh
+++ b/tests/mv/childproof.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp mv ln
 
 skip_if_root_
diff --git a/tests/mv/diag.sh b/tests/mv/diag.sh
index d7c2870..511f3b5 100755
--- a/tests/mv/diag.sh
+++ b/tests/mv/diag.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 touch f1 || framework_failure_
diff --git a/tests/mv/dir-file.sh b/tests/mv/dir-file.sh
index fb1a594..0704d03 100755
--- a/tests/mv/dir-file.sh
+++ b/tests/mv/dir-file.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 mkdir -p dir/file || framework_failure_
diff --git a/tests/mv/dir2dir.sh b/tests/mv/dir2dir.sh
index 4322fd2..4e3242b 100755
--- a/tests/mv/dir2dir.sh
+++ b/tests/mv/dir2dir.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 mkdir -p a/t b/t || framework_failure_
diff --git a/tests/mv/dup-source.sh b/tests/mv/dup-source.sh
index ea88a04..641a2e4 100755
--- a/tests/mv/dup-source.sh
+++ b/tests/mv/dup-source.sh
@@ -19,7 +19,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp mv
 
 skip_if_root_
diff --git a/tests/mv/force.sh b/tests/mv/force.sh
index 6bed83b..dc6651a 100755
--- a/tests/mv/force.sh
+++ b/tests/mv/force.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 ff=mvforce
diff --git a/tests/mv/hard-2.sh b/tests/mv/hard-2.sh
index e0fc174..276dbbb 100755
--- a/tests/mv/hard-2.sh
+++ b/tests/mv/hard-2.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp mv
 
 skip_if_root_
diff --git a/tests/mv/hard-3.sh b/tests/mv/hard-3.sh
index a62167a..4caec49 100755
--- a/tests/mv/hard-3.sh
+++ b/tests/mv/hard-3.sh
@@ -30,7 +30,7 @@
 # directory, because it requires use of the --preserve=link option that
 # mv enables by default.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp
 skip_if_root_
 
diff --git a/tests/mv/hard-4.sh b/tests/mv/hard-4.sh
index 645ead3..2bbc2ca 100755
--- a/tests/mv/hard-4.sh
+++ b/tests/mv/hard-4.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 touch a || framework_failure_
 ln a b || framework_failure_
diff --git a/tests/mv/hard-link-1.sh b/tests/mv/hard-link-1.sh
index 78a555a..386f2b5 100755
--- a/tests/mv/hard-link-1.sh
+++ b/tests/mv/hard-link-1.sh
@@ -17,10 +17,10 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 dir=hlink
 
diff --git a/tests/mv/hard-verbose.sh b/tests/mv/hard-verbose.sh
index 41c4187..85f2da7 100755
--- a/tests/mv/hard-verbose.sh
+++ b/tests/mv/hard-verbose.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 touch x || framework_failure_
diff --git a/tests/mv/i-2.sh b/tests/mv/i-2.sh
index f248019..b856850 100755
--- a/tests/mv/i-2.sh
+++ b/tests/mv/i-2.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp mv
 
 skip_if_root_
diff --git a/tests/mv/i-3.sh b/tests/mv/i-3.sh
index 3912842..073c070 100755
--- a/tests/mv/i-3.sh
+++ b/tests/mv/i-3.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 require_controlling_input_terminal_
 skip_if_root_
diff --git a/tests/mv/i-4.sh b/tests/mv/i-4.sh
index 8ef6ca7..4b1da69 100755
--- a/tests/mv/i-4.sh
+++ b/tests/mv/i-4.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 for i in a b; do
diff --git a/tests/mv/i-5.sh b/tests/mv/i-5.sh
index 76cacab..773c47a 100755
--- a/tests/mv/i-5.sh
+++ b/tests/mv/i-5.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 mkdir a || framework_failure_
diff --git a/tests/mv/i-link-no.sh b/tests/mv/i-link-no.sh
index 4615eaa..7a9894a 100755
--- a/tests/mv/i-link-no.sh
+++ b/tests/mv/i-link-no.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 mkdir a b || framework_failure_
diff --git a/tests/mv/into-self-2.sh b/tests/mv/into-self-2.sh
index 3e6ace7..db57fec 100755
--- a/tests/mv/into-self-2.sh
+++ b/tests/mv/into-self-2.sh
@@ -18,10 +18,10 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 file="$other_partition_tmpdir/file"
 symlink=symlink
diff --git a/tests/mv/into-self-3.sh b/tests/mv/into-self-3.sh
index b2b8f83..569b081 100755
--- a/tests/mv/into-self-3.sh
+++ b/tests/mv/into-self-3.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 dir1=is3-dir1
diff --git a/tests/mv/into-self-4.sh b/tests/mv/into-self-4.sh
index 5119e8f..86beb72 100755
--- a/tests/mv/into-self-4.sh
+++ b/tests/mv/into-self-4.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 touch file || framework_failure_
diff --git a/tests/mv/into-self.sh b/tests/mv/into-self.sh
index 231d69c..06b36a4 100755
--- a/tests/mv/into-self.sh
+++ b/tests/mv/into-self.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 dir=toself-dir
diff --git a/tests/mv/leak-fd.sh b/tests/mv/leak-fd.sh
index d349a3f..1dd006f 100755
--- a/tests/mv/leak-fd.sh
+++ b/tests/mv/leak-fd.sh
@@ -18,11 +18,11 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # limit so don't run it by default.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 skip_if_root_
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 # This test is relatively expensive, and might well evoke a
 # framework-failure on systems with a smaller command-line length
diff --git a/tests/mv/mv-n.sh b/tests/mv/mv-n.sh
index 9a9b115..89a62f6 100755
--- a/tests/mv/mv-n.sh
+++ b/tests/mv/mv-n.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 
diff --git a/tests/mv/mv-special-1.sh b/tests/mv/mv-special-1.sh
index dac55d0..d5914cb 100755
--- a/tests/mv/mv-special-1.sh
+++ b/tests/mv/mv-special-1.sh
@@ -16,10 +16,10 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 null=mv-null
 dir=mv-dir
diff --git a/tests/mv/no-target-dir.sh b/tests/mv/no-target-dir.sh
index c1443cd..61cf48e 100755
--- a/tests/mv/no-target-dir.sh
+++ b/tests/mv/no-target-dir.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 mkdir -p d/sub empty src d2/sub e2 || framework_failure_
diff --git a/tests/mv/part-fail.sh b/tests/mv/part-fail.sh
index 499a6b6..6bfddb2 100755
--- a/tests/mv/part-fail.sh
+++ b/tests/mv/part-fail.sh
@@ -19,11 +19,11 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 skip_if_root_
 cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 touch k "$other_partition_tmpdir/k" || framework_failure_
 chmod u-w "$other_partition_tmpdir" || framework_failure_
diff --git a/tests/mv/part-hardlink.sh b/tests/mv/part-hardlink.sh
index af773a2..c93cd85 100755
--- a/tests/mv/part-hardlink.sh
+++ b/tests/mv/part-hardlink.sh
@@ -19,10 +19,10 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 touch f || framework_failure_
 ln f g || framework_failure_
diff --git a/tests/mv/part-rename.sh b/tests/mv/part-rename.sh
index 19d9ecb..33fdaa8 100755
--- a/tests/mv/part-rename.sh
+++ b/tests/mv/part-rename.sh
@@ -18,10 +18,10 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 mkdir foo || framework_failure_
 
diff --git a/tests/mv/part-symlink.sh b/tests/mv/part-symlink.sh
index e57de3c..1f9c812 100755
--- a/tests/mv/part-symlink.sh
+++ b/tests/mv/part-symlink.sh
@@ -17,11 +17,11 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp mv
 
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 # On NFS on Linux 2.6.9 at least we get:
 # mv: preserving permissions for 'rem_sl': Operation not supported
diff --git a/tests/mv/partition-perm.sh b/tests/mv/partition-perm.sh
index bbda9da..19864e4 100755
--- a/tests/mv/partition-perm.sh
+++ b/tests/mv/partition-perm.sh
@@ -16,10 +16,10 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 : > file
 chmod a=rwx file
diff --git a/tests/mv/perm-1.sh b/tests/mv/perm-1.sh
index 3a7944a..dd7a99d 100755
--- a/tests/mv/perm-1.sh
+++ b/tests/mv/perm-1.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 skip_if_root_
 
diff --git a/tests/mv/sticky-to-xpart.sh b/tests/mv/sticky-to-xpart.sh
index 6df6502..c3a9bcd 100755
--- a/tests/mv/sticky-to-xpart.sh
+++ b/tests/mv/sticky-to-xpart.sh
@@ -19,12 +19,12 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 require_root_
 
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 # Set up to run a test where non-root user tries to move a root-owned
 # file from a sticky tmpdir to a directory owned by that user on
diff --git a/tests/mv/symlink-onto-hardlink-to-self.sh 
b/tests/mv/symlink-onto-hardlink-to-self.sh
index f53f6ef..77c7dc8 100755
--- a/tests/mv/symlink-onto-hardlink-to-self.sh
+++ b/tests/mv/symlink-onto-hardlink-to-self.sh
@@ -19,7 +19,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 # Create a file f, and a symlink s1 to that file.
diff --git a/tests/mv/symlink-onto-hardlink.sh 
b/tests/mv/symlink-onto-hardlink.sh
index 2dac484..675871d 100755
--- a/tests/mv/symlink-onto-hardlink.sh
+++ b/tests/mv/symlink-onto-hardlink.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 touch f || framework_failure_
diff --git a/tests/mv/to-symlink.sh b/tests/mv/to-symlink.sh
index c203d7a..b0c9bab 100755
--- a/tests/mv/to-symlink.sh
+++ b/tests/mv/to-symlink.sh
@@ -17,10 +17,10 @@
 # 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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 rem_file="$other_partition_tmpdir/file"
 rem_symlink="$other_partition_tmpdir/symlink"
diff --git a/tests/mv/trailing-slash.sh b/tests/mv/trailing-slash.sh
index 26f8802..cec0483 100755
--- a/tests/mv/trailing-slash.sh
+++ b/tests/mv/trailing-slash.sh
@@ -19,7 +19,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ mv
 
 mkdir foo || framework_failure_
diff --git a/tests/mv/update.sh b/tests/mv/update.sh
index f0beb40..1514a8c 100755
--- a/tests/mv/update.sh
+++ b/tests/mv/update.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ cp mv
 
 echo old > old || framework_failure_
diff --git a/tests/pr/pr-tests.pl b/tests/pr/pr-tests.pl
index 259c9d6..f202414 100755
--- a/tests/pr/pr-tests.pl
+++ b/tests/pr/pr-tests.pl
@@ -412,7 +412,7 @@ my @tv = (
 # Convert the above old-style test vectors to the newer
 # format used by Coreutils.pm.
 
-my $pfx = "$ENV{abs_srcdir}/pr";
+my $pfx = "$ENV{abs_srcdir}/tests/pr";
 
 # Normalize otherwise-variable output page headers.
 my $common_option_prefix = '--date-format="-- Date/Time --" -h x';
diff --git a/tests/readlink/can-e.sh b/tests/readlink/can-e.sh
index 32b75c5..ee7def6 100755
--- a/tests/readlink/can-e.sh
+++ b/tests/readlink/can-e.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ readlink
 
 pwd=$(pwd)
diff --git a/tests/readlink/can-f.sh b/tests/readlink/can-f.sh
index 3f29601..480ced0 100755
--- a/tests/readlink/can-f.sh
+++ b/tests/readlink/can-f.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ readlink
 
 pwd=$(pwd)
diff --git a/tests/readlink/can-m.sh b/tests/readlink/can-m.sh
index 09a96f5..5ecc504 100755
--- a/tests/readlink/can-m.sh
+++ b/tests/readlink/can-m.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ readlink
 
 pwd=$(pwd)
diff --git a/tests/readlink/rl-1.sh b/tests/readlink/rl-1.sh
index 511a989..7730764 100755
--- a/tests/readlink/rl-1.sh
+++ b/tests/readlink/rl-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ readlink
 
 mkdir subdir || framework_failure_
diff --git a/tests/rm/cycle.sh b/tests/rm/cycle.sh
index 33e1283..3379f0b 100755
--- a/tests/rm/cycle.sh
+++ b/tests/rm/cycle.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/d-1.sh b/tests/rm/d-1.sh
index f35e951..0c8b1bc 100755
--- a/tests/rm/d-1.sh
+++ b/tests/rm/d-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir a || framework_failure_
diff --git a/tests/rm/d-2.sh b/tests/rm/d-2.sh
index a63cff6..b62c2ee 100755
--- a/tests/rm/d-2.sh
+++ b/tests/rm/d-2.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir d || framework_failure_
diff --git a/tests/rm/d-3.sh b/tests/rm/d-3.sh
index 2f2cf74..d5075f5 100755
--- a/tests/rm/d-3.sh
+++ b/tests/rm/d-3.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir d || framework_failure_
diff --git a/tests/rm/dangling-symlink.sh b/tests/rm/dangling-symlink.sh
index 92a5906..ad81231 100755
--- a/tests/rm/dangling-symlink.sh
+++ b/tests/rm/dangling-symlink.sh
@@ -19,7 +19,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 ln -s no-file dangle
diff --git a/tests/rm/deep-1.sh b/tests/rm/deep-1.sh
index f739eb5..7a144cc 100755
--- a/tests/rm/deep-1.sh
+++ b/tests/rm/deep-1.sh
@@ -23,7 +23,7 @@
 
 # If this test takes too long on your system, blame the OS.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 umask 022
diff --git a/tests/rm/deep-2.sh b/tests/rm/deep-2.sh
index 2660977..5e6c1a1 100755
--- a/tests/rm/deep-2.sh
+++ b/tests/rm/deep-2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 require_perl_
 
diff --git a/tests/rm/dir-no-w.sh b/tests/rm/dir-no-w.sh
index ce33b98..4a1a54a 100755
--- a/tests/rm/dir-no-w.sh
+++ b/tests/rm/dir-no-w.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir --mode=0500 unwritable-dir || framework_failure_
diff --git a/tests/rm/dir-nonrecur.sh b/tests/rm/dir-nonrecur.sh
index 8876e94..bdb8f5b 100755
--- a/tests/rm/dir-nonrecur.sh
+++ b/tests/rm/dir-nonrecur.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir d || framework_failure_
diff --git a/tests/rm/dot-rel.sh b/tests/rm/dot-rel.sh
index fc69359..fa9b960 100755
--- a/tests/rm/dot-rel.sh
+++ b/tests/rm/dot-rel.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir a b || framework_failure_
diff --git a/tests/rm/empty-inacc.sh b/tests/rm/empty-inacc.sh
index e23cb85..24bdfe7 100755
--- a/tests/rm/empty-inacc.sh
+++ b/tests/rm/empty-inacc.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/ext3-perf.sh b/tests/rm/ext3-perf.sh
index 97b0a17..f6be006 100755
--- a/tests/rm/ext3-perf.sh
+++ b/tests/rm/ext3-perf.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 very_expensive_
diff --git a/tests/rm/f-1.sh b/tests/rm/f-1.sh
index e1ed8d4..bfdb92a 100755
--- a/tests/rm/f-1.sh
+++ b/tests/rm/f-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir -p d || framework_failure_
diff --git a/tests/rm/fail-2eperm.sh b/tests/rm/fail-2eperm.sh
index fa2f432..ab157aa 100755
--- a/tests/rm/fail-2eperm.sh
+++ b/tests/rm/fail-2eperm.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 require_root_
 
diff --git a/tests/rm/fail-eacces.sh b/tests/rm/fail-eacces.sh
index 947dfac..9defa0b 100755
--- a/tests/rm/fail-eacces.sh
+++ b/tests/rm/fail-eacces.sh
@@ -19,7 +19,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/hash.sh b/tests/rm/hash.sh
index 344325e..2185b2e 100755
--- a/tests/rm/hash.sh
+++ b/tests/rm/hash.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 expensive_
 
diff --git a/tests/rm/i-1.sh b/tests/rm/i-1.sh
index 67df853..f4764f3 100755
--- a/tests/rm/i-1.sh
+++ b/tests/rm/i-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 t=t
diff --git a/tests/rm/i-never.sh b/tests/rm/i-never.sh
index 80e1fcd..591c86d 100755
--- a/tests/rm/i-never.sh
+++ b/tests/rm/i-never.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/i-no-r.sh b/tests/rm/i-no-r.sh
index 6b22e1c..30fa732 100755
--- a/tests/rm/i-no-r.sh
+++ b/tests/rm/i-no-r.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir dir || framework_failure_
diff --git a/tests/rm/ignorable.sh b/tests/rm/ignorable.sh
index bcf3b7e..a6beaa4 100755
--- a/tests/rm/ignorable.sh
+++ b/tests/rm/ignorable.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/inaccessible.sh b/tests/rm/inaccessible.sh
index 2f04581..5a3f42e 100755
--- a/tests/rm/inaccessible.sh
+++ b/tests/rm/inaccessible.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 # Skip this test if your system has neither the openat-style functions
diff --git a/tests/rm/interactive-always.sh b/tests/rm/interactive-always.sh
index 6312cba..a8aaaad 100755
--- a/tests/rm/interactive-always.sh
+++ b/tests/rm/interactive-always.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 touch file1-1 file1-2 file2-1 file2-2 file3-1 file3-2 file4-1 file4-2 \
diff --git a/tests/rm/interactive-once.sh b/tests/rm/interactive-once.sh
index 982d1a4..4985c84 100755
--- a/tests/rm/interactive-once.sh
+++ b/tests/rm/interactive-once.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir -p dir1-1 dir2-1 dir2-2 || framework_failure_
diff --git a/tests/rm/ir-1.sh b/tests/rm/ir-1.sh
index 01b33bc..60a24d1 100755
--- a/tests/rm/ir-1.sh
+++ b/tests/rm/ir-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 t=t
diff --git a/tests/rm/isatty.sh b/tests/rm/isatty.sh
index f28653c..799d839 100755
--- a/tests/rm/isatty.sh
+++ b/tests/rm/isatty.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/many-dir-entries-vs-OOM.sh 
b/tests/rm/many-dir-entries-vs-OOM.sh
index b5f10da..d2ee152 100755
--- a/tests/rm/many-dir-entries-vs-OOM.sh
+++ b/tests/rm/many-dir-entries-vs-OOM.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm du chmod
 
 expensive_
diff --git a/tests/rm/no-give-up.sh b/tests/rm/no-give-up.sh
index 0deb262..760a676 100755
--- a/tests/rm/no-give-up.sh
+++ b/tests/rm/no-give-up.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 require_root_
 
diff --git a/tests/rm/one-file-system.sh b/tests/rm/one-file-system.sh
index 675c3fd..f4c990b 100755
--- a/tests/rm/one-file-system.sh
+++ b/tests/rm/one-file-system.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 require_root_
 
@@ -28,7 +28,7 @@ cleanup_()
   umount a/b
   rm -rf "$other_partition_tmpdir"
 }
-. "$abs_srcdir/other-fs-tmpdir"
+. "$abs_srcdir/tests/other-fs-tmpdir"
 
 t=$other_partition_tmpdir
 mkdir -p a/b $t/y
diff --git a/tests/rm/one-file-system2.sh b/tests/rm/one-file-system2.sh
index 077df76..9a56ba7 100755
--- a/tests/rm/one-file-system2.sh
+++ b/tests/rm/one-file-system2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir -p a/b
diff --git a/tests/rm/r-1.sh b/tests/rm/r-1.sh
index 858269d..5f0b43f 100755
--- a/tests/rm/r-1.sh
+++ b/tests/rm/r-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir a a/a || framework_failure_
diff --git a/tests/rm/r-2.sh b/tests/rm/r-2.sh
index c946f63..555acce 100755
--- a/tests/rm/r-2.sh
+++ b/tests/rm/r-2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir t t/a t/a/b || framework_failure_
diff --git a/tests/rm/r-3.sh b/tests/rm/r-3.sh
index 71c8a0f..2bac150 100755
--- a/tests/rm/r-3.sh
+++ b/tests/rm/r-3.sh
@@ -23,7 +23,7 @@
 # And the rm from coreutils-5.0 exposes the same problem when there
 # are 338 or more files in a directory on a Darwin-6.5 system
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir t || framework_failure_
diff --git a/tests/rm/r-4.sh b/tests/rm/r-4.sh
index 0bfb760..735cf9f 100755
--- a/tests/rm/r-4.sh
+++ b/tests/rm/r-4.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir d || framework_failure_
diff --git a/tests/rm/read-only.sh b/tests/rm/read-only.sh
index 018648b..8e65b0c 100755
--- a/tests/rm/read-only.sh
+++ b/tests/rm/read-only.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 require_root_
 
diff --git a/tests/rm/readdir-bug.sh b/tests/rm/readdir-bug.sh
index 711e1bc..1e3a96e 100755
--- a/tests/rm/readdir-bug.sh
+++ b/tests/rm/readdir-bug.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 # Create a directory containing many files.
diff --git a/tests/rm/rm1.sh b/tests/rm/rm1.sh
index aa90c57..81e048c 100755
--- a/tests/rm/rm1.sh
+++ b/tests/rm/rm1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/rm2.sh b/tests/rm/rm2.sh
index 7bbdfea..bf3c964 100755
--- a/tests/rm/rm2.sh
+++ b/tests/rm/rm2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/rm3.sh b/tests/rm/rm3.sh
index 37ee87b..5ffa275 100755
--- a/tests/rm/rm3.sh
+++ b/tests/rm/rm3.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/rm4.sh b/tests/rm/rm4.sh
index 3e22aad..290f109 100755
--- a/tests/rm/rm4.sh
+++ b/tests/rm/rm4.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/rm5.sh b/tests/rm/rm5.sh
index 56c6bbc..31b11e1 100755
--- a/tests/rm/rm5.sh
+++ b/tests/rm/rm5.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/sunos-1.sh b/tests/rm/sunos-1.sh
index 584236a..2e649a9 100755
--- a/tests/rm/sunos-1.sh
+++ b/tests/rm/sunos-1.sh
@@ -21,7 +21,7 @@
 # actually remove files with names of entries in the current directory
 # but relative to '/' rather than relative to the current directory.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 rm -r '' > /dev/null 2>&1 && fail=1
diff --git a/tests/rm/unread2.sh b/tests/rm/unread2.sh
index 46fc98c..dd472c2 100755
--- a/tests/rm/unread2.sh
+++ b/tests/rm/unread2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/unread3.sh b/tests/rm/unread3.sh
index 4b8bbc2..b212184 100755
--- a/tests/rm/unread3.sh
+++ b/tests/rm/unread3.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 skip_if_root_
 
diff --git a/tests/rm/v-slash.sh b/tests/rm/v-slash.sh
index 2fae859..504f4ff 100755
--- a/tests/rm/v-slash.sh
+++ b/tests/rm/v-slash.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rm
 
 mkdir a || framework_failure_
diff --git a/tests/rmdir/fail-perm.sh b/tests/rmdir/fail-perm.sh
index 49cfb00..2b4abec 100755
--- a/tests/rmdir/fail-perm.sh
+++ b/tests/rmdir/fail-perm.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rmdir
 
 mkdir d d/e d/e/f || framework_failure_
diff --git a/tests/rmdir/ignore.sh b/tests/rmdir/ignore.sh
index 92463b8..97001bb 100755
--- a/tests/rmdir/ignore.sh
+++ b/tests/rmdir/ignore.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rmdir
 
 cwd=$(pwd)
diff --git a/tests/rmdir/t-slash.sh b/tests/rmdir/t-slash.sh
index 38e9f20..2fd709c 100755
--- a/tests/rmdir/t-slash.sh
+++ b/tests/rmdir/t-slash.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ rmdir
 
 mkdir dir || framework_failure_
diff --git a/tests/sample-test b/tests/sample-test
index 7d1f6e9..a67a5dd 100644
--- a/tests/sample-test
+++ b/tests/sample-test
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ FIXME
 
 # FIXME: skip_if_root_
@@ -24,7 +24,7 @@ print_ver_ FIXME
 
 # If used, these must *follow* init.sh.
 # FIXME: cleanup_() { rm -rf "$other_partition_tmpdir"; }
-# FIXME: . "$abs_srcdir/other-fs-tmpdir"
+# FIXME: . "$abs_srcdir/tests/other-fs-tmpdir"
 
 FIXME > out || fail=1
 cat <<\EOF > exp || fail=1
diff --git a/tests/split/additional-suffix.sh b/tests/split/additional-suffix.sh
index 8cfd3c1..3cb7805 100755
--- a/tests/split/additional-suffix.sh
+++ b/tests/split/additional-suffix.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 
 printf '1\n2\n3\n4\n5\n' > in || framework_failure_
diff --git a/tests/split/b-chunk.sh b/tests/split/b-chunk.sh
index dd8b6cb..b83d3c8 100755
--- a/tests/split/b-chunk.sh
+++ b/tests/split/b-chunk.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 
 # N can be greater than the file size
diff --git a/tests/split/fail.sh b/tests/split/fail.sh
index 83251e9..d77c039 100755
--- a/tests/split/fail.sh
+++ b/tests/split/fail.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 getlimits_
 
diff --git a/tests/split/filter.sh b/tests/split/filter.sh
index 7a55818..21ce5bc 100755
--- a/tests/split/filter.sh
+++ b/tests/split/filter.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 xz --version || skip_ "xz (better than gzip/bzip2) required"
 
diff --git a/tests/split/guard-input.sh b/tests/split/guard-input.sh
index 7a6fba3..e0f7ff5 100755
--- a/tests/split/guard-input.sh
+++ b/tests/split/guard-input.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 
 seq 10 | tee exp-1 > xaa
diff --git a/tests/split/l-chunk.sh b/tests/split/l-chunk.sh
index 8199883..732b595 100755
--- a/tests/split/l-chunk.sh
+++ b/tests/split/l-chunk.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 
 # invalid number of chunks
diff --git a/tests/split/lines.sh b/tests/split/lines.sh
index 35eb3eb..501b99f 100755
--- a/tests/split/lines.sh
+++ b/tests/split/lines.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 
 printf '1\n2\n3\n4\n5\n' > in || framework_failure_
diff --git a/tests/split/numeric.sh b/tests/split/numeric.sh
index ad22df6..e1e50a1 100755
--- a/tests/split/numeric.sh
+++ b/tests/split/numeric.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 
 # Check default start from 0
diff --git a/tests/split/r-chunk.sh b/tests/split/r-chunk.sh
index afd9bf4..cd0c525 100755
--- a/tests/split/r-chunk.sh
+++ b/tests/split/r-chunk.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 
 require_ulimit_
diff --git a/tests/split/suffix-auto-length.sh 
b/tests/split/suffix-auto-length.sh
index dacc951..4fa9fc4 100755
--- a/tests/split/suffix-auto-length.sh
+++ b/tests/split/suffix-auto-length.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 
 
diff --git a/tests/split/suffix-length.sh b/tests/split/suffix-length.sh
index bc65e9f..58e8cfd 100755
--- a/tests/split/suffix-length.sh
+++ b/tests/split/suffix-length.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ split
 
 a_z='a b c d e f g h i j k l m n o p q r s t u v w x y z'
diff --git a/tests/tail-2/F-vs-missing.sh b/tests/tail-2/F-vs-missing.sh
index fbdb533..e099081 100755
--- a/tests/tail-2/F-vs-missing.sh
+++ b/tests/tail-2/F-vs-missing.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 debug='---disable-inotify'
diff --git a/tests/tail-2/F-vs-rename.sh b/tests/tail-2/F-vs-rename.sh
index 53bc00d..a4305b1 100755
--- a/tests/tail-2/F-vs-rename.sh
+++ b/tests/tail-2/F-vs-rename.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 touch a b || framework_failure_
diff --git a/tests/tail-2/append-only.sh b/tests/tail-2/append-only.sh
index c79bb7b..be1f49d 100755
--- a/tests/tail-2/append-only.sh
+++ b/tests/tail-2/append-only.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 require_root_
 
diff --git a/tests/tail-2/assert-2.sh b/tests/tail-2/assert-2.sh
index d94d3d8..020f53d 100755
--- a/tests/tail-2/assert-2.sh
+++ b/tests/tail-2/assert-2.sh
@@ -18,7 +18,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 # Not "expensive" per se, but sleeping for so long is annoying.
diff --git a/tests/tail-2/assert.sh b/tests/tail-2/assert.sh
index 043e259..84b0a6e 100755
--- a/tests/tail-2/assert.sh
+++ b/tests/tail-2/assert.sh
@@ -23,7 +23,7 @@
 #   Aborted
 # due to a race condition in which a dev/inode pair is reused.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 # Not "expensive" per se, but sleeping for so long is annoying.
diff --git a/tests/tail-2/big-4gb.sh b/tests/tail-2/big-4gb.sh
index 8ace318..93e5e93 100755
--- a/tests/tail-2/big-4gb.sh
+++ b/tests/tail-2/big-4gb.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 expensive_
 
diff --git a/tests/tail-2/flush-initial.sh b/tests/tail-2/flush-initial.sh
index bf68ce7..c675770 100755
--- a/tests/tail-2/flush-initial.sh
+++ b/tests/tail-2/flush-initial.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 echo line > in || fail=1
diff --git a/tests/tail-2/follow-name.sh b/tests/tail-2/follow-name.sh
index 2ab1c01..d847505 100755
--- a/tests/tail-2/follow-name.sh
+++ b/tests/tail-2/follow-name.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 cat <<\EOF > exp || framework_failure_
diff --git a/tests/tail-2/follow-stdin.sh b/tests/tail-2/follow-stdin.sh
index ee0d1ae..3f822c6 100755
--- a/tests/tail-2/follow-stdin.sh
+++ b/tests/tail-2/follow-stdin.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 echo line > exp || framework_failure_
diff --git a/tests/tail-2/infloop-1.sh b/tests/tail-2/infloop-1.sh
index 3f45f77..ced9ed1 100755
--- a/tests/tail-2/infloop-1.sh
+++ b/tests/tail-2/infloop-1.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 yes > t &
diff --git a/tests/tail-2/inotify-hash-abuse.sh 
b/tests/tail-2/inotify-hash-abuse.sh
index deec76d..3cb6f6b 100755
--- a/tests/tail-2/inotify-hash-abuse.sh
+++ b/tests/tail-2/inotify-hash-abuse.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 # 9 is a magic number, related to internal details of tail.c and hash.c
diff --git a/tests/tail-2/inotify-hash-abuse2.sh 
b/tests/tail-2/inotify-hash-abuse2.sh
index eb192a6..2d01f14 100755
--- a/tests/tail-2/inotify-hash-abuse2.sh
+++ b/tests/tail-2/inotify-hash-abuse2.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 touch f || framework_failure_
diff --git a/tests/tail-2/inotify-race.sh b/tests/tail-2/inotify-race.sh
index ab25f67..7476283 100755
--- a/tests/tail-2/inotify-race.sh
+++ b/tests/tail-2/inotify-race.sh
@@ -20,7 +20,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 # Don't run this test by default because sometimes it's skipped as noted below.
diff --git a/tests/tail-2/inotify-rotate.sh b/tests/tail-2/inotify-rotate.sh
index 311633a..9a56acd 100755
--- a/tests/tail-2/inotify-rotate.sh
+++ b/tests/tail-2/inotify-rotate.sh
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
   tail --version
 fi
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 expensive_
 
 # Wait several seconds for grep REGEXP FILE to succeed.
diff --git a/tests/tail-2/pid.sh b/tests/tail-2/pid.sh
index 0a26f8d..1870193 100755
--- a/tests/tail-2/pid.sh
+++ b/tests/tail-2/pid.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 getlimits_
 
diff --git a/tests/tail-2/pipe-f.sh b/tests/tail-2/pipe-f.sh
index e3d8a70..60ae62e 100755
--- a/tests/tail-2/pipe-f.sh
+++ b/tests/tail-2/pipe-f.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 echo foo | timeout 10 tail -f -c3 > out || fail=1
diff --git a/tests/tail-2/pipe-f2.sh b/tests/tail-2/pipe-f2.sh
index fffd43a..dc23c34 100755
--- a/tests/tail-2/pipe-f2.sh
+++ b/tests/tail-2/pipe-f2.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 mkfifo_or_skip_ fifo
diff --git a/tests/tail-2/proc-ksyms.sh b/tests/tail-2/proc-ksyms.sh
index ad446d3..a2d4d55 100755
--- a/tests/tail-2/proc-ksyms.sh
+++ b/tests/tail-2/proc-ksyms.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 
diff --git a/tests/tail-2/start-middle.sh b/tests/tail-2/start-middle.sh
index 5b40de4..431dc6c 100755
--- a/tests/tail-2/start-middle.sh
+++ b/tests/tail-2/start-middle.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 (echo 1; echo 2) > k || framework_failure_
diff --git a/tests/tail-2/tail-n0f.sh b/tests/tail-2/tail-n0f.sh
index 2b2147a..857d5d8 100755
--- a/tests/tail-2/tail-n0f.sh
+++ b/tests/tail-2/tail-n0f.sh
@@ -21,7 +21,7 @@
 # It skips the test if your system lacks a /proc/$pid/status
 # file, or if its contents don't look right.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 require_proc_pid_status_
diff --git a/tests/tail-2/wait.sh b/tests/tail-2/wait.sh
index 587b449..a5eefa3 100755
--- a/tests/tail-2/wait.sh
+++ b/tests/tail-2/wait.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ tail
 
 touch here || framework_failure_
diff --git a/tests/touch/60-seconds.sh b/tests/touch/60-seconds.sh
index 915a1d0..4f1a818 100755
--- a/tests/touch/60-seconds.sh
+++ b/tests/touch/60-seconds.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 echo 60.000000000 > exp || framework_failure_
diff --git a/tests/touch/dangling-symlink.sh b/tests/touch/dangling-symlink.sh
index 1eb2ed3..8e9235b 100755
--- a/tests/touch/dangling-symlink.sh
+++ b/tests/touch/dangling-symlink.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 rm -f touch-target t-symlink
diff --git a/tests/touch/dir-1.sh b/tests/touch/dir-1.sh
index b4c04fe..cb0e172 100755
--- a/tests/touch/dir-1.sh
+++ b/tests/touch/dir-1.sh
@@ -2,7 +2,7 @@
 # Make sure touch can operate on a directory.
 # This was broken in the 4.0[efg] test releases.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 touch . || fail=1
diff --git a/tests/touch/empty-file.sh b/tests/touch/empty-file.sh
index a150bd5..3ab0ee1 100755
--- a/tests/touch/empty-file.sh
+++ b/tests/touch/empty-file.sh
@@ -21,7 +21,7 @@
 # fails to work on SunOS 4.1.3 with 'most of the recommended patches' when
 # the empty file is on an NFS-mounted 4.2 volume.
 
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 DEFAULT_SLEEP_SECONDS=2
diff --git a/tests/touch/fail-diag.sh b/tests/touch/fail-diag.sh
index b74d2a5..d56dbf3 100755
--- a/tests/touch/fail-diag.sh
+++ b/tests/touch/fail-diag.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 skip_if_root_
 
diff --git a/tests/touch/fifo.sh b/tests/touch/fifo.sh
index 65f4328..06a8bc4 100755
--- a/tests/touch/fifo.sh
+++ b/tests/touch/fifo.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 mkfifo_or_skip_ fifo
diff --git a/tests/touch/no-create-missing.sh b/tests/touch/no-create-missing.sh
index 88a079a..202a92a 100755
--- a/tests/touch/no-create-missing.sh
+++ b/tests/touch/no-create-missing.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 
diff --git a/tests/touch/no-dereference.sh b/tests/touch/no-dereference.sh
index aee9a5c..6df02a6 100755
--- a/tests/touch/no-dereference.sh
+++ b/tests/touch/no-dereference.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 ln -s nowhere dangling || framework_failure_
diff --git a/tests/touch/no-rights.sh b/tests/touch/no-rights.sh
index abebc52..66631a9 100755
--- a/tests/touch/no-rights.sh
+++ b/tests/touch/no-rights.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 # Make sure t2 is newer than t1.
diff --git a/tests/touch/not-owner.sh b/tests/touch/not-owner.sh
index 63b8af2..4d3a61b 100755
--- a/tests/touch/not-owner.sh
+++ b/tests/touch/not-owner.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 if env -- test -w /; then
diff --git a/tests/touch/now-owned-by-other.sh 
b/tests/touch/now-owned-by-other.sh
index 3da8d35..3c01fbf 100755
--- a/tests/touch/now-owned-by-other.sh
+++ b/tests/touch/now-owned-by-other.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 require_root_
 
diff --git a/tests/touch/obsolescent.sh b/tests/touch/obsolescent.sh
index d403127..9251913 100755
--- a/tests/touch/obsolescent.sh
+++ b/tests/touch/obsolescent.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 _POSIX2_VERSION=199209; export _POSIX2_VERSION
diff --git a/tests/touch/read-only.sh b/tests/touch/read-only.sh
index ee8c1d3..d99d5a4 100755
--- a/tests/touch/read-only.sh
+++ b/tests/touch/read-only.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 skip_if_root_
 
diff --git a/tests/touch/relative.sh b/tests/touch/relative.sh
index ba199fc..2d9d357 100755
--- a/tests/touch/relative.sh
+++ b/tests/touch/relative.sh
@@ -17,7 +17,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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure_
diff --git a/tests/touch/trailing-slash.sh b/tests/touch/trailing-slash.sh
index f09695c..f8e6b78 100755
--- a/tests/touch/trailing-slash.sh
+++ b/tests/touch/trailing-slash.sh
@@ -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=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ touch
 
 ln -s nowhere dangling || framework_failure_
-- 
1.7.12




reply via email to

[Prev in Thread] Current Thread [Next in Thread]