summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/chgrp/basic8
-rwxr-xr-xtests/chgrp/default-no-deref8
-rwxr-xr-xtests/chgrp/deref8
-rwxr-xr-xtests/chgrp/no-x8
-rwxr-xr-xtests/chgrp/posix-H8
-rwxr-xr-xtests/chgrp/recurse8
-rwxr-xr-xtests/chmod/c-option8
-rwxr-xr-xtests/chmod/equal-x8
-rwxr-xr-xtests/chmod/equals8
-rwxr-xr-xtests/chmod/inaccessible8
-rwxr-xr-xtests/chmod/no-x8
-rwxr-xr-xtests/chmod/octal8
-rwxr-xr-xtests/chmod/setgid8
-rwxr-xr-xtests/chmod/thru-dangling8
-rwxr-xr-xtests/chmod/umask-x8
-rwxr-xr-xtests/chmod/usage8
-rwxr-xr-xtests/chown/basic8
-rwxr-xr-xtests/chown/deref8
-rwxr-xr-xtests/chown/preserve-root8
-rwxr-xr-xtests/chown/separator8
-rwxr-xr-xtests/cp/abuse8
-rwxr-xr-xtests/cp/backup-18
-rwxr-xr-xtests/cp/backup-dir8
-rwxr-xr-xtests/cp/backup-is-src8
-rwxr-xr-xtests/cp/capability8
-rwxr-xr-xtests/cp/cp-HL8
-rwxr-xr-xtests/cp/cp-a-selinux8
-rwxr-xr-xtests/cp/cp-deref8
-rwxr-xr-xtests/cp/cp-i8
-rwxr-xr-xtests/cp/cp-parents8
-rwxr-xr-xtests/cp/deref-slink8
-rwxr-xr-xtests/cp/dir-rm-dest8
-rwxr-xr-xtests/cp/dir-slash8
-rwxr-xr-xtests/cp/dir-vs-file8
-rwxr-xr-xtests/cp/existing-perm-race8
-rwxr-xr-xtests/cp/fail-perm8
-rwxr-xr-xtests/cp/file-perm-race8
-rwxr-xr-xtests/cp/into-self8
-rwxr-xr-xtests/cp/link8
-rwxr-xr-xtests/cp/link-heap8
-rwxr-xr-xtests/cp/link-no-deref8
-rwxr-xr-xtests/cp/link-preserve8
-rwxr-xr-xtests/cp/no-deref-link18
-rwxr-xr-xtests/cp/no-deref-link28
-rwxr-xr-xtests/cp/no-deref-link38
-rwxr-xr-xtests/cp/parent-perm8
-rwxr-xr-xtests/cp/parent-perm-race8
-rwxr-xr-xtests/cp/preserve-28
-rwxr-xr-xtests/cp/preserve-slink-time8
-rwxr-xr-xtests/cp/proc-short-read8
-rwxr-xr-xtests/cp/proc-zero-len8
-rwxr-xr-xtests/cp/r-vs-symlink8
-rwxr-xr-xtests/cp/reflink-auto8
-rwxr-xr-xtests/cp/reflink-perm8
-rwxr-xr-xtests/cp/same-file8
-rwxr-xr-xtests/cp/slink-2-slink8
-rwxr-xr-xtests/cp/sparse8
-rwxr-xr-xtests/cp/special-bits8
-rwxr-xr-xtests/cp/special-f8
-rwxr-xr-xtests/cp/src-base-dot8
-rwxr-xr-xtests/cp/symlink-slash8
-rwxr-xr-xtests/cp/thru-dangling8
-rwxr-xr-xtests/dd/direct8
-rwxr-xr-xtests/dd/misc8
-rwxr-xr-xtests/dd/not-rewound8
-rwxr-xr-xtests/dd/reblock8
-rwxr-xr-xtests/dd/skip-seek-past-dev8
-rwxr-xr-xtests/dd/skip-seek-past-file8
-rwxr-xr-xtests/dd/skip-seek28
-rwxr-xr-xtests/dd/stderr8
-rwxr-xr-xtests/dd/unblock-sync8
-rwxr-xr-xtests/df/total-verify8
-rwxr-xr-xtests/df/unreadable8
-rwxr-xr-xtests/du/2g8
-rwxr-xr-xtests/du/8gb8
-rwxr-xr-xtests/du/basic8
-rwxr-xr-xtests/du/deref8
-rwxr-xr-xtests/du/deref-args8
-rwxr-xr-xtests/du/exclude8
-rwxr-xr-xtests/du/fd-leak8
-rwxr-xr-xtests/du/hard-link8
-rwxr-xr-xtests/du/inacc-dest8
-rwxr-xr-xtests/du/inacc-dir8
-rwxr-xr-xtests/du/inaccessible-cwd8
-rwxr-xr-xtests/du/long-from-unreadable8
-rwxr-xr-xtests/du/long-sloop8
-rwxr-xr-xtests/du/no-deref8
-rwxr-xr-xtests/du/no-x8
-rwxr-xr-xtests/du/one-file-system8
-rwxr-xr-xtests/du/restore-wd8
-rwxr-xr-xtests/du/slash8
-rwxr-xr-xtests/du/slink8
-rwxr-xr-xtests/du/trailing-slash8
-rwxr-xr-xtests/du/two-args8
-rwxr-xr-xtests/id/no-context8
-rwxr-xr-xtests/install/basic-18
-rwxr-xr-xtests/install/create-leading8
-rwxr-xr-xtests/install/d-slashdot8
-rwxr-xr-xtests/install/install-C8
-rwxr-xr-xtests/install/install-C-root8
-rwxr-xr-xtests/install/install-C-selinux8
-rwxr-xr-xtests/install/strip-program8
-rwxr-xr-xtests/install/trap8
-rwxr-xr-xtests/ln/backup-18
-rwxr-xr-xtests/ln/hard-backup8
-rwxr-xr-xtests/ln/hard-to-sym8
-rwxr-xr-xtests/ln/misc8
-rwxr-xr-xtests/ln/slash-decorated-nonexistent-dest8
-rwxr-xr-xtests/ln/target-18
-rwxr-xr-xtests/ls/abmon-align8
-rwxr-xr-xtests/ls/capability8
-rwxr-xr-xtests/ls/color-clear-to-eol8
-rwxr-xr-xtests/ls/color-dtype-dir8
-rwxr-xr-xtests/ls/color-norm8
-rwxr-xr-xtests/ls/dangle8
-rwxr-xr-xtests/ls/dired8
-rwxr-xr-xtests/ls/file-type8
-rwxr-xr-xtests/ls/follow-slink8
-rwxr-xr-xtests/ls/infloop8
-rwxr-xr-xtests/ls/inode8
-rwxr-xr-xtests/ls/m-option8
-rwxr-xr-xtests/ls/multihardlink8
-rwxr-xr-xtests/ls/no-arg8
-rwxr-xr-xtests/ls/no-cap8
-rwxr-xr-xtests/ls/proc-selinux-segfault8
-rwxr-xr-xtests/ls/readdir-mountpoint-inode8
-rwxr-xr-xtests/ls/recursive8
-rwxr-xr-xtests/ls/stat-dtype8
-rwxr-xr-xtests/ls/stat-failed8
-rwxr-xr-xtests/ls/stat-free-symlinks8
-rwxr-xr-xtests/ls/stat-vs-dirent8
-rwxr-xr-xtests/ls/symlink-slash8
-rwxr-xr-xtests/ls/x-option8
-rwxr-xr-xtests/misc/cat-buf8
-rwxr-xr-xtests/misc/cat-proc8
-rwxr-xr-xtests/misc/chcon8
-rwxr-xr-xtests/misc/chcon-fail8
-rwxr-xr-xtests/misc/chroot-credentials8
-rwxr-xr-xtests/misc/chroot-fail8
-rwxr-xr-xtests/misc/close-stdout8
-rwxr-xr-xtests/misc/csplit8
-rwxr-xr-xtests/misc/date-sec8
-rwxr-xr-xtests/misc/df8
-rwxr-xr-xtests/misc/df-P8
-rwxr-xr-xtests/misc/env8
-rwxr-xr-xtests/misc/false-status8
-rwxr-xr-xtests/misc/fmt-long-line8
-rwxr-xr-xtests/misc/groups-dash8
-rwxr-xr-xtests/misc/groups-version8
-rwxr-xr-xtests/misc/head-c8
-rwxr-xr-xtests/misc/head-pos8
-rwxr-xr-xtests/misc/id-context8
-rwxr-xr-xtests/misc/id-groups8
-rwxr-xr-xtests/misc/ls-time8
-rwxr-xr-xtests/misc/mknod8
-rwxr-xr-xtests/misc/nice8
-rwxr-xr-xtests/misc/nice-fail8
-rwxr-xr-xtests/misc/nl8
-rwxr-xr-xtests/misc/nohup8
-rwxr-xr-xtests/misc/nproc-avail8
-rwxr-xr-xtests/misc/nproc-positive8
-rwxr-xr-xtests/misc/od-N8
-rwxr-xr-xtests/misc/od-multiple-t8
-rwxr-xr-xtests/misc/od-x88
-rwxr-xr-xtests/misc/pathchk18
-rwxr-xr-xtests/misc/ptx-overrun8
-rwxr-xr-xtests/misc/readlink-fp-loop8
-rwxr-xr-xtests/misc/runcon-no-reorder8
-rwxr-xr-xtests/misc/seq-long-double8
-rwxr-xr-xtests/misc/shred-exact8
-rwxr-xr-xtests/misc/shred-passes8
-rwxr-xr-xtests/misc/shred-remove8
-rwxr-xr-xtests/misc/shuf8
-rwxr-xr-xtests/misc/sort-compress8
-rwxr-xr-xtests/misc/sort-continue8
-rwxr-xr-xtests/misc/sort-debug-keys8
-rwxr-xr-xtests/misc/sort-debug-warn8
-rwxr-xr-xtests/misc/sort-float8
-rwxr-xr-xtests/misc/sort-merge-fdlimit8
-rwxr-xr-xtests/misc/sort-month8
-rwxr-xr-xtests/misc/sort-rand8
-rwxr-xr-xtests/misc/sort-version8
-rwxr-xr-xtests/misc/split-a8
-rwxr-xr-xtests/misc/split-fail8
-rwxr-xr-xtests/misc/split-l8
-rwxr-xr-xtests/misc/stat-fmt8
-rwxr-xr-xtests/misc/stat-hyphen8
-rwxr-xr-xtests/misc/stat-slash8
-rwxr-xr-xtests/misc/stty-invalid8
-rwxr-xr-xtests/misc/tac-continue8
-rwxr-xr-xtests/misc/tee8
-rwxr-xr-xtests/misc/tee-dash8
-rwxr-xr-xtests/misc/timeout8
-rwxr-xr-xtests/misc/timeout-parameters8
-rwxr-xr-xtests/misc/truncate-dangling-symlink8
-rwxr-xr-xtests/misc/truncate-dir-fail8
-rwxr-xr-xtests/misc/truncate-fail-diag8
-rwxr-xr-xtests/misc/truncate-fifo8
-rwxr-xr-xtests/misc/truncate-no-create-missing8
-rwxr-xr-xtests/misc/truncate-overflow8
-rwxr-xr-xtests/misc/truncate-parameters8
-rwxr-xr-xtests/misc/truncate-relative8
-rwxr-xr-xtests/misc/wc-files08
-rwxr-xr-xtests/mkdir/p-18
-rwxr-xr-xtests/mkdir/p-28
-rwxr-xr-xtests/mkdir/p-38
-rwxr-xr-xtests/mkdir/p-slashdot8
-rwxr-xr-xtests/mkdir/p-thru-slink8
-rwxr-xr-xtests/mkdir/p-v8
-rwxr-xr-xtests/mkdir/parents8
-rwxr-xr-xtests/mkdir/perm8
-rwxr-xr-xtests/mkdir/special-18
-rwxr-xr-xtests/mkdir/t-slash8
-rwxr-xr-xtests/mkdir/writable-under-readonly8
-rwxr-xr-xtests/mv/atomic8
-rwxr-xr-xtests/mv/atomic28
-rwxr-xr-xtests/mv/backup-dir8
-rwxr-xr-xtests/mv/backup-is-src8
-rwxr-xr-xtests/mv/dir-file8
-rwxr-xr-xtests/mv/dir2dir8
-rwxr-xr-xtests/mv/force8
-rwxr-xr-xtests/mv/hard-38
-rwxr-xr-xtests/mv/hard-48
-rwxr-xr-xtests/mv/hard-link-18
-rwxr-xr-xtests/mv/hard-verbose8
-rwxr-xr-xtests/mv/i-38
-rwxr-xr-xtests/mv/i-48
-rwxr-xr-xtests/mv/i-58
-rwxr-xr-xtests/mv/i-link-no8
-rwxr-xr-xtests/mv/into-self8
-rwxr-xr-xtests/mv/into-self-28
-rwxr-xr-xtests/mv/into-self-38
-rwxr-xr-xtests/mv/into-self-48
-rwxr-xr-xtests/mv/leak-fd8
-rwxr-xr-xtests/mv/mv-n8
-rwxr-xr-xtests/mv/mv-special-18
-rwxr-xr-xtests/mv/no-target-dir8
-rwxr-xr-xtests/mv/part-fail8
-rwxr-xr-xtests/mv/part-hardlink8
-rwxr-xr-xtests/mv/part-rename8
-rwxr-xr-xtests/mv/partition-perm8
-rwxr-xr-xtests/mv/perm-18
-rwxr-xr-xtests/mv/sticky-to-xpart8
-rwxr-xr-xtests/mv/to-symlink8
-rwxr-xr-xtests/mv/trailing-slash8
-rwxr-xr-xtests/readlink/can-e8
-rwxr-xr-xtests/readlink/can-f8
-rwxr-xr-xtests/readlink/can-m8
-rwxr-xr-xtests/readlink/rl-18
-rwxr-xr-xtests/rm/cycle8
-rwxr-xr-xtests/rm/dangling-symlink8
-rwxr-xr-xtests/rm/deep-18
-rwxr-xr-xtests/rm/deep-28
-rwxr-xr-xtests/rm/dir-no-w8
-rwxr-xr-xtests/rm/dir-nonrecur8
-rwxr-xr-xtests/rm/dot-rel8
-rwxr-xr-xtests/rm/empty-inacc8
-rwxr-xr-xtests/rm/ext3-perf8
-rwxr-xr-xtests/rm/f-18
-rwxr-xr-xtests/rm/fail-2eperm8
-rwxr-xr-xtests/rm/fail-eacces8
-rwxr-xr-xtests/rm/hash8
-rwxr-xr-xtests/rm/i-18
-rwxr-xr-xtests/rm/i-never8
-rwxr-xr-xtests/rm/i-no-r8
-rwxr-xr-xtests/rm/ignorable8
-rwxr-xr-xtests/rm/inaccessible8
-rwxr-xr-xtests/rm/interactive-always8
-rwxr-xr-xtests/rm/interactive-once8
-rwxr-xr-xtests/rm/ir-18
-rwxr-xr-xtests/rm/isatty8
-rwxr-xr-xtests/rm/no-give-up8
-rwxr-xr-xtests/rm/one-file-system8
-rwxr-xr-xtests/rm/one-file-system28
-rwxr-xr-xtests/rm/r-18
-rwxr-xr-xtests/rm/r-28
-rwxr-xr-xtests/rm/r-38
-rwxr-xr-xtests/rm/r-48
-rwxr-xr-xtests/rm/read-only8
-rwxr-xr-xtests/rm/readdir-bug8
-rwxr-xr-xtests/rm/rm18
-rwxr-xr-xtests/rm/rm28
-rwxr-xr-xtests/rm/rm38
-rwxr-xr-xtests/rm/rm48
-rwxr-xr-xtests/rm/rm58
-rwxr-xr-xtests/rm/sunos-18
-rwxr-xr-xtests/rm/unread28
-rwxr-xr-xtests/rm/unread38
-rwxr-xr-xtests/rm/v-slash8
-rwxr-xr-xtests/rmdir/fail-perm8
-rwxr-xr-xtests/rmdir/ignore8
-rwxr-xr-xtests/rmdir/t-slash8
-rwxr-xr-xtests/tail-2/append-only8
-rwxr-xr-xtests/tail-2/assert8
-rwxr-xr-xtests/tail-2/assert-28
-rwxr-xr-xtests/tail-2/big-4gb8
-rwxr-xr-xtests/tail-2/flush-initial8
-rwxr-xr-xtests/tail-2/follow-stdin8
-rwxr-xr-xtests/tail-2/infloop-18
-rwxr-xr-xtests/tail-2/inotify-hash-abuse28
-rwxr-xr-xtests/tail-2/inotify-race8
-rwxr-xr-xtests/tail-2/pid8
-rwxr-xr-xtests/tail-2/pipe-f8
-rwxr-xr-xtests/tail-2/pipe-f28
-rwxr-xr-xtests/tail-2/proc-ksyms8
-rwxr-xr-xtests/tail-2/start-middle8
-rwxr-xr-xtests/tail-2/tail-n0f8
-rwxr-xr-xtests/tail-2/wait8
-rwxr-xr-xtests/touch/60-seconds8
-rwxr-xr-xtests/touch/dangling-symlink8
-rwxr-xr-xtests/touch/dir-18
-rwxr-xr-xtests/touch/empty-file8
-rwxr-xr-xtests/touch/fail-diag8
-rwxr-xr-xtests/touch/fifo8
-rwxr-xr-xtests/touch/no-create-missing8
-rwxr-xr-xtests/touch/no-dereference8
-rwxr-xr-xtests/touch/no-rights8
-rwxr-xr-xtests/touch/not-owner8
-rwxr-xr-xtests/touch/now-owned-by-other8
-rwxr-xr-xtests/touch/obsolescent8
-rwxr-xr-xtests/touch/read-only8
-rwxr-xr-xtests/touch/relative8
-rwxr-xr-xtests/touch/trailing-slash8
323 files changed, 646 insertions, 1938 deletions
diff --git a/tests/chgrp/basic b/tests/chgrp/basic
index 19e9602ca..7d6716624 100755
--- a/tests/chgrp/basic
+++ b/tests/chgrp/basic
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chgrp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chgrp --version
require_membership_in_two_groups_
diff --git a/tests/chgrp/default-no-deref b/tests/chgrp/default-no-deref
index b4ea299f8..77d3bcbcb 100755
--- a/tests/chgrp/default-no-deref
+++ b/tests/chgrp/default-no-deref
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chgrp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chgrp --version
require_membership_in_two_groups_
set _ $groups; shift
diff --git a/tests/chgrp/deref b/tests/chgrp/deref
index 36a320be0..e3cfed229 100755
--- a/tests/chgrp/deref
+++ b/tests/chgrp/deref
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chgrp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chgrp --version
require_membership_in_two_groups_
set _ $groups; shift
diff --git a/tests/chgrp/no-x b/tests/chgrp/no-x
index a8e49cddb..e3a4aefd0 100755
--- a/tests/chgrp/no-x
+++ b/tests/chgrp/no-x
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chgrp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chgrp --version
require_membership_in_two_groups_
skip_if_root_
diff --git a/tests/chgrp/posix-H b/tests/chgrp/posix-H
index db0b07796..6cf101c8f 100755
--- a/tests/chgrp/posix-H
+++ b/tests/chgrp/posix-H
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chgrp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chgrp --version
require_membership_in_two_groups_
set _ $groups; shift
diff --git a/tests/chgrp/recurse b/tests/chgrp/recurse
index 8fd53da4d..0f7f00f22 100755
--- a/tests/chgrp/recurse
+++ b/tests/chgrp/recurse
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chgrp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chgrp --version
require_membership_in_two_groups_
set _ $groups; shift
diff --git a/tests/chmod/c-option b/tests/chmod/c-option
index c8b8ac8d1..4db905fc6 100755
--- a/tests/chmod/c-option
+++ b/tests/chmod/c-option
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
umask 0
file=f
diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x
index cd1358a00..32226f1ff 100755
--- a/tests/chmod/equal-x
+++ b/tests/chmod/equal-x
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
file=f
touch $file || framework_failure
diff --git a/tests/chmod/equals b/tests/chmod/equals
index 79f39f46b..79e01fb04 100755
--- a/tests/chmod/equals
+++ b/tests/chmod/equals
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
touch f || framework_failure
diff --git a/tests/chmod/inaccessible b/tests/chmod/inaccessible
index 6127ad537..37dc8ffac 100755
--- a/tests/chmod/inaccessible
+++ b/tests/chmod/inaccessible
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
mkdir -p d/e || framework_failure
chmod 0 d/e d || framework_failure
diff --git a/tests/chmod/no-x b/tests/chmod/no-x
index f4e10826d..464a2544a 100755
--- a/tests/chmod/no-x
+++ b/tests/chmod/no-x
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
skip_if_root_
mkdir -p d/no-x/y a/b || framework_failure
diff --git a/tests/chmod/octal b/tests/chmod/octal
index 695dbbd38..add57775b 100755
--- a/tests/chmod/octal
+++ b/tests/chmod/octal
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
# Before coreutils-5.92, this would mistakenly succeed,
diff --git a/tests/chmod/setgid b/tests/chmod/setgid
index 01a320db9..89e971c5f 100755
--- a/tests/chmod/setgid
+++ b/tests/chmod/setgid
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
umask 0
mkdir d || framework_failure
diff --git a/tests/chmod/thru-dangling b/tests/chmod/thru-dangling
index 478db701a..8421a989c 100755
--- a/tests/chmod/thru-dangling
+++ b/tests/chmod/thru-dangling
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
ln -s non-existent dangle || framework_failure
diff --git a/tests/chmod/umask-x b/tests/chmod/umask-x
index da1cf1525..e0c5e36a9 100755
--- a/tests/chmod/umask-x
+++ b/tests/chmod/umask-x
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
touch file
chmod 755 file
diff --git a/tests/chmod/usage b/tests/chmod/usage
index 0aa1e18fc..e2d33fc32 100755
--- a/tests/chmod/usage
+++ b/tests/chmod/usage
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chmod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chmod --version
# Each line in this list is a set of arguments, followed by :,
diff --git a/tests/chown/basic b/tests/chown/basic
index f161b536b..3ad43b403 100755
--- a/tests/chown/basic
+++ b/tests/chown/basic
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chgrp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chgrp --version
require_root_
touch f || framework_failure
diff --git a/tests/chown/deref b/tests/chown/deref
index 7a269e756..85603b429 100755
--- a/tests/chown/deref
+++ b/tests/chown/deref
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chown --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chown --version
ln -s no-such dangle || framework_failure
diff --git a/tests/chown/preserve-root b/tests/chown/preserve-root
index 81483db5b..c01149629 100755
--- a/tests/chown/preserve-root
+++ b/tests/chown/preserve-root
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chown --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chown --version
skip_if_root_
mkdir d && ln -s / d/slink-to-root
diff --git a/tests/chown/separator b/tests/chown/separator
index 4c204f126..914d9cca4 100755
--- a/tests/chown/separator
+++ b/tests/chown/separator
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chown --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chown --version
id_u=`id -u` || framework_failure
test -n "$id_u" || framework_failure
diff --git a/tests/cp/abuse b/tests/cp/abuse
index 2979f0d99..fb5e4358c 100755
--- a/tests/cp/abuse
+++ b/tests/cp/abuse
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir a b c || framework_failure
ln -s ../t a/1 || framework_failure
diff --git a/tests/cp/backup-1 b/tests/cp/backup-1
index fc7202857..690846214 100755
--- a/tests/cp/backup-1
+++ b/tests/cp/backup-1
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
suffix=.b
file=b1.$$
diff --git a/tests/cp/backup-dir b/tests/cp/backup-dir
index 436812319..c1718dedc 100755
--- a/tests/cp/backup-dir
+++ b/tests/cp/backup-dir
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir x y || framework_failure
diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src
index 5944eb9b7..8a8b48069 100755
--- a/tests/cp/backup-is-src
+++ b/tests/cp/backup-is-src
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
echo a > a || framework_failure
echo a-tilde > a~ || framework_failure
diff --git a/tests/cp/capability b/tests/cp/capability
index f4ee227f5..3a241d058 100755
--- a/tests/cp/capability
+++ b/tests/cp/capability
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
require_root_
working_umask_or_skip_
diff --git a/tests/cp/cp-HL b/tests/cp/cp-HL
index 6407fb7dc..f2a2dc438 100755
--- a/tests/cp/cp-HL
+++ b/tests/cp/cp-HL
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir src-dir dest-dir || framework_failure
echo f > f || framework_failure
diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux
index cff87311f..bfc79562d 100755
--- a/tests/cp/cp-a-selinux
+++ b/tests/cp/cp-a-selinux
@@ -19,12 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
require_root_
require_selinux_
diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref
index 50efdd3b5..8315a6254 100755
--- a/tests/cp/cp-deref
+++ b/tests/cp/cp-deref
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir a b c d || framework_failure
ln -s ../c a || framework_failure
diff --git a/tests/cp/cp-i b/tests/cp/cp-i
index f5cba16e1..8e86267fa 100755
--- a/tests/cp/cp-i
+++ b/tests/cp/cp-i
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir -p a b/a/c || framework_failure
touch a/c || framework_failure
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index c77a32857..22100b502 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
working_umask_or_skip_
diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink
index de2e5e631..a11bd0dc9 100755
--- a/tests/cp/deref-slink
+++ b/tests/cp/deref-slink
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
touch f slink-target || framework_failure
ln -s slink-target slink || framework_failure
diff --git a/tests/cp/dir-rm-dest b/tests/cp/dir-rm-dest
index 523edbdc1..2923a474e 100755
--- a/tests/cp/dir-rm-dest
+++ b/tests/cp/dir-rm-dest
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir d e || framework_failure
diff --git a/tests/cp/dir-slash b/tests/cp/dir-slash
index 76b14b6e7..18050a3af 100755
--- a/tests/cp/dir-slash
+++ b/tests/cp/dir-slash
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir dir1 dir2 || framework_failure
touch dir1/file || framework_failure
diff --git a/tests/cp/dir-vs-file b/tests/cp/dir-vs-file
index 32530a613..499014184 100755
--- a/tests/cp/dir-vs-file
+++ b/tests/cp/dir-vs-file
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir dir || framework_failure
touch file || framework_failure
diff --git a/tests/cp/existing-perm-race b/tests/cp/existing-perm-race
index ffd29f0f4..f1c7bc1ad 100755
--- a/tests/cp/existing-perm-race
+++ b/tests/cp/existing-perm-race
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
require_membership_in_two_groups_
diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm
index 656b16e23..cd763f7da 100755
--- a/tests/cp/fail-perm
+++ b/tests/cp/fail-perm
@@ -15,12 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
skip_if_root_
chmod g-s . || framework_failure
diff --git a/tests/cp/file-perm-race b/tests/cp/file-perm-race
index d80761259..6b3b60450 100755
--- a/tests/cp/file-perm-race
+++ b/tests/cp/file-perm-race
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
# cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
require_local_dir_
diff --git a/tests/cp/into-self b/tests/cp/into-self
index 21aae8076..3341d1a8b 100755
--- a/tests/cp/into-self
+++ b/tests/cp/into-self
@@ -21,12 +21,8 @@
# Now it gives this:
# cp: can't copy a directory `dir' into itself `dir/dir'
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir a dir || framework_failure
diff --git a/tests/cp/link b/tests/cp/link
index 9935465d4..f0bd241f9 100755
--- a/tests/cp/link
+++ b/tests/cp/link
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
touch src || framework_failure
touch dest || framework_failure
diff --git a/tests/cp/link-heap b/tests/cp/link-heap
index fe2f6b1aa..f5ed6e60e 100755
--- a/tests/cp/link-heap
+++ b/tests/cp/link-heap
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
expensive_
require_ulimit_
diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref
index 86f05fd5d..d575ec851 100755
--- a/tests/cp/link-no-deref
+++ b/tests/cp/link-no-deref
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
ln -s no-such-file dangling-slink || framework_failure
diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve
index 9eb95ad5e..fe5ad42c9 100755
--- a/tests/cp/link-preserve
+++ b/tests/cp/link-preserve
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
touch a || framework_failure
ln a b || framework_failure
diff --git a/tests/cp/no-deref-link1 b/tests/cp/no-deref-link1
index 411692842..f0d1a9e9b 100755
--- a/tests/cp/no-deref-link1
+++ b/tests/cp/no-deref-link1
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir a b
msg=bar
diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2
index aa0d8ab3b..2351589a7 100755
--- a/tests/cp/no-deref-link2
+++ b/tests/cp/no-deref-link2
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir b
msg=bar
diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3
index c3c7d89ac..1053b3ef7 100755
--- a/tests/cp/no-deref-link3
+++ b/tests/cp/no-deref-link3
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
msg=bar
echo $msg > a
diff --git a/tests/cp/parent-perm b/tests/cp/parent-perm
index 4a7d98947..82dd913ac 100755
--- a/tests/cp/parent-perm
+++ b/tests/cp/parent-perm
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
working_umask_or_skip_
# cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
diff --git a/tests/cp/parent-perm-race b/tests/cp/parent-perm-race
index e595d9ea8..b6374aecd 100755
--- a/tests/cp/parent-perm-race
+++ b/tests/cp/parent-perm-race
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
# cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
require_local_dir_
diff --git a/tests/cp/preserve-2 b/tests/cp/preserve-2
index 9863952c2..d7565df3b 100755
--- a/tests/cp/preserve-2
+++ b/tests/cp/preserve-2
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
# cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least
require_local_dir_
diff --git a/tests/cp/preserve-slink-time b/tests/cp/preserve-slink-time
index 88c1016f8..5a61b7e8c 100755
--- a/tests/cp/preserve-slink-time
+++ b/tests/cp/preserve-slink-time
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
grep '^#define HAVE_UTIMENSAT 1' "$CONFIG_HEADER" > /dev/null ||
grep '^#define HAVE_LUTIMES 1' "$CONFIG_HEADER" > /dev/null ||
diff --git a/tests/cp/proc-short-read b/tests/cp/proc-short-read
index afe08491b..2bc2a6195 100755
--- a/tests/cp/proc-short-read
+++ b/tests/cp/proc-short-read
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
kall=/proc/kallsyms
diff --git a/tests/cp/proc-zero-len b/tests/cp/proc-zero-len
index 9cc81bc14..ca28fa428 100755
--- a/tests/cp/proc-zero-len
+++ b/tests/cp/proc-zero-len
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
touch empty || framework_failure
diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink
index e537767b9..7d9dfd8e4 100755
--- a/tests/cp/r-vs-symlink
+++ b/tests/cp/r-vs-symlink
@@ -20,12 +20,8 @@
# though now such usage evokes a warning:
# cp: `slink': WARNING: using -r to copy symbolic links is not portable
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
echo abc > foo || framework_failure
ln -s foo slink || framework_failure
diff --git a/tests/cp/reflink-auto b/tests/cp/reflink-auto
index 9d60940bb..7d61ed25b 100755
--- a/tests/cp/reflink-auto
+++ b/tests/cp/reflink-auto
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/cp/reflink-perm b/tests/cp/reflink-perm
index e1c12aa5a..a330584c1 100755
--- a/tests/cp/reflink-perm
+++ b/tests/cp/reflink-perm
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
: > time_check
diff --git a/tests/cp/same-file b/tests/cp/same-file
index bcb2a9d0d..97b5b2909 100755
--- a/tests/cp/same-file
+++ b/tests/cp/same-file
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
# Unset CDPATH. Otherwise, output from the `cd dir' command
# can make this test fail.
diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink
index bdfb9a90b..69e0c9511 100755
--- a/tests/cp/slink-2-slink
+++ b/tests/cp/slink-2-slink
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
touch file || framework_failure
ln -s file a || framework_failure
diff --git a/tests/cp/sparse b/tests/cp/sparse
index 73c292476..60e226b27 100755
--- a/tests/cp/sparse
+++ b/tests/cp/sparse
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
require_sparse_support_
# Create a sparse file.
diff --git a/tests/cp/special-bits b/tests/cp/special-bits
index 6f32847bc..f09e499fc 100755
--- a/tests/cp/special-bits
+++ b/tests/cp/special-bits
@@ -20,12 +20,8 @@
# This test would fail due to a bug introduced in 4.0y.
# The bug was fixed in 4.0z.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
require_root_
touch a b c || framework_failure
diff --git a/tests/cp/special-f b/tests/cp/special-f
index 22872e733..6c0b13734 100755
--- a/tests/cp/special-f
+++ b/tests/cp/special-f
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkfifo fifo ||
skip_test_ "fifos not supported"
diff --git a/tests/cp/src-base-dot b/tests/cp/src-base-dot
index 8e38ae68a..73e4f6ff7 100755
--- a/tests/cp/src-base-dot
+++ b/tests/cp/src-base-dot
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir x y || framework_failure
diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash
index ac63ba2b1..dfc9b2bf0 100755
--- a/tests/cp/symlink-slash
+++ b/tests/cp/symlink-slash
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
mkdir dir || framework_failure
ln -s dir symlink || framework_failure
diff --git a/tests/cp/thru-dangling b/tests/cp/thru-dangling
index 729eb5e6f..592dda2a5 100755
--- a/tests/cp/thru-dangling
+++ b/tests/cp/thru-dangling
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
ln -s no-such dangle || framework_failure
echo hi > f || framework_failure
diff --git a/tests/dd/direct b/tests/dd/direct
index 46bf35f32..1381ce68c 100755
--- a/tests/dd/direct
+++ b/tests/dd/direct
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- dd --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && dd --version
truncate -s 8192 in || framework_failure
dd if=in oflag=direct of=out 2> /dev/null \
diff --git a/tests/dd/misc b/tests/dd/misc
index ddd7bbd9e..92be45046 100755
--- a/tests/dd/misc
+++ b/tests/dd/misc
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- dd --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && dd --version
tmp_in=dd-in.$$
tmp_in2=dd-in2.$$
diff --git a/tests/dd/not-rewound b/tests/dd/not-rewound
index 67c2971f4..75c08c952 100755
--- a/tests/dd/not-rewound
+++ b/tests/dd/not-rewound
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- dd --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && dd --version
echo abcde > in
diff --git a/tests/dd/reblock b/tests/dd/reblock
index 9c9b0f85f..c5d667c8c 100755
--- a/tests/dd/reblock
+++ b/tests/dd/reblock
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- dd --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && dd --version
# 2 short reads -> 1 full write + 1 partial write
cat <<\EOF > exp-reblock || framework_failure
diff --git a/tests/dd/skip-seek-past-dev b/tests/dd/skip-seek-past-dev
index 9e910e8ee..762671c27 100755
--- a/tests/dd/skip-seek-past-dev
+++ b/tests/dd/skip-seek-past-dev
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- dd --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && dd --version
# need write access to local device
# (even though we don't actually write anything)
diff --git a/tests/dd/skip-seek-past-file b/tests/dd/skip-seek-past-file
index 9327f1ea5..605e964f7 100755
--- a/tests/dd/skip-seek-past-file
+++ b/tests/dd/skip-seek-past-file
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- dd --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && dd --version
require_sparse_support_ # for `truncate --size=$OFF_T_MAX`
eval $(getlimits) # for OFF_T limits
diff --git a/tests/dd/skip-seek2 b/tests/dd/skip-seek2
index 7b60af62e..4897e10e1 100755
--- a/tests/dd/skip-seek2
+++ b/tests/dd/skip-seek2
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- dd --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && dd --version
echo LA:3456789abcdef > in || fail=1
diff --git a/tests/dd/stderr b/tests/dd/stderr
index 5ef91e45e..fd7b7470d 100755
--- a/tests/dd/stderr
+++ b/tests/dd/stderr
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- dd --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && dd --version
p=$abs_top_builddir
diff --git a/tests/dd/unblock-sync b/tests/dd/unblock-sync
index 7e45b7ee8..2d8dc328e 100755
--- a/tests/dd/unblock-sync
+++ b/tests/dd/unblock-sync
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- dd --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && dd --version
printf 000100020003xx > in || framework_failure
diff --git a/tests/df/total-verify b/tests/df/total-verify
index 8bfa2053b..abe85bcbf 100755
--- a/tests/df/total-verify
+++ b/tests/df/total-verify
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- df --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && df --version
df || skip_test_ "df fails"
diff --git a/tests/df/unreadable b/tests/df/unreadable
index e58692d20..5c9876002 100755
--- a/tests/df/unreadable
+++ b/tests/df/unreadable
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- df --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && df --version
skip_if_root_
touch unreadable || fail=1
diff --git a/tests/du/2g b/tests/du/2g
index 61bbebce8..0021fdadc 100755
--- a/tests/du/2g
+++ b/tests/du/2g
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
# Creating a 2GB file counts as `very expensive'.
very_expensive_
diff --git a/tests/du/8gb b/tests/du/8gb
index 8043b8ae8..f416111ed 100755
--- a/tests/du/8gb
+++ b/tests/du/8gb
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
require_sparse_support_
dd bs=1 seek=8G of=big < /dev/null 2> /dev/null
diff --git a/tests/du/basic b/tests/du/basic
index 6d3eeb1e7..b96d861c8 100755
--- a/tests/du/basic
+++ b/tests/du/basic
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
mkdir -p a/b d d/sub || framework_failure
diff --git a/tests/du/deref b/tests/du/deref
index 8e4feac3b..0dbf4854e 100755
--- a/tests/du/deref
+++ b/tests/du/deref
@@ -19,12 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
mkdir -p a/sub || framework_failure
ln -s a/sub slink || framework_failure
diff --git a/tests/du/deref-args b/tests/du/deref-args
index 57118f741..1743b0448 100755
--- a/tests/du/deref-args
+++ b/tests/du/deref-args
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
mkdir -p dir/a || framework_failure
ln -s dir slink || framework_failure
diff --git a/tests/du/exclude b/tests/du/exclude
index 9649623b0..d3295cf68 100755
--- a/tests/du/exclude
+++ b/tests/du/exclude
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
mkdir -p a/b/c a/x/y a/u/v || framework_failure
diff --git a/tests/du/fd-leak b/tests/du/fd-leak
index ac9274e36..728ce0533 100755
--- a/tests/du/fd-leak
+++ b/tests/du/fd-leak
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
# Call this an expensive test. It's not that expensive, but command line
# limitations might induce failure on some losing systems.
diff --git a/tests/du/hard-link b/tests/du/hard-link
index e22320b56..68a7e2245 100755
--- a/tests/du/hard-link
+++ b/tests/du/hard-link
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
mkdir -p dir/sub
( cd dir &&
diff --git a/tests/du/inacc-dest b/tests/du/inacc-dest
index 4c7b9b875..24242815d 100755
--- a/tests/du/inacc-dest
+++ b/tests/du/inacc-dest
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
skip_if_root_
mkdir f && cd f && mkdir a b c d e && touch c/j && chmod a-x c \
diff --git a/tests/du/inacc-dir b/tests/du/inacc-dir
index 8504d6438..0be254c78 100755
--- a/tests/du/inacc-dir
+++ b/tests/du/inacc-dir
@@ -15,12 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
skip_if_root_
mkdir -p a/sub || framework_failure
diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd
index 1a4bf9fe6..a1656b217 100755
--- a/tests/du/inaccessible-cwd
+++ b/tests/du/inaccessible-cwd
@@ -20,12 +20,8 @@
# Before the switch to an fts-based implementation in coreutils 5.0.92,
# this test would fail.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
skip_if_root_
cwd=`pwd`
diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable
index 73d32a676..2b38e69e7 100755
--- a/tests/du/long-from-unreadable
+++ b/tests/du/long-from-unreadable
@@ -28,12 +28,8 @@
# on Linux+PROC_FS systems because its fts implementation would revert
# unnecessarily to using FTS_NOCHDIR mode in this corner case.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
proc_file=/proc/self/fd
if test ! -d $proc_file; then
diff --git a/tests/du/long-sloop b/tests/du/long-sloop
index 06843dcc3..391174a3d 100755
--- a/tests/du/long-sloop
+++ b/tests/du/long-sloop
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
# Create lots of directories, each containing a single symlink
# pointing at the next directory in the list.
diff --git a/tests/du/no-deref b/tests/du/no-deref
index 4aa3a5672..d56bc753e 100755
--- a/tests/du/no-deref
+++ b/tests/du/no-deref
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
mkdir -p dir/a/b || framework_failure
ln -s dir slink || framework_failure
diff --git a/tests/du/no-x b/tests/du/no-x
index bf00ec647..580b527a4 100755
--- a/tests/du/no-x
+++ b/tests/du/no-x
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
skip_if_root_
mkdir -p d/no-x/y || framework_failure
diff --git a/tests/du/one-file-system b/tests/du/one-file-system
index 53ca9ebfc..bb4d7cba1 100755
--- a/tests/du/one-file-system
+++ b/tests/du/one-file-system
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
mkdir -p b/c y/z || framework_failure
diff --git a/tests/du/restore-wd b/tests/du/restore-wd
index 8bddf014e..bb2b165c5 100755
--- a/tests/du/restore-wd
+++ b/tests/du/restore-wd
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
mkdir a b || framework_failure
diff --git a/tests/du/slash b/tests/du/slash
index 1a849bb10..3434e3ef3 100755
--- a/tests/du/slash
+++ b/tests/du/slash
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
require_readable_root_
diff --git a/tests/du/slink b/tests/du/slink
index 5c2b125c7..092ea1292 100755
--- a/tests/du/slink
+++ b/tests/du/slink
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
# Determine if `.' is on a local (would non-NFS be sufficient?) file system.
# At least on OSF/1 4.0d, when using an nfsv3 file system,
diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash
index 87fe62a69..70549a80d 100755
--- a/tests/du/trailing-slash
+++ b/tests/du/trailing-slash
@@ -19,12 +19,8 @@
# Before coreutils-4.5.3, it would remove a single trailing slash.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
mkdir -p dir/1/2 || framework_failure
ln -s dir slink || framework_failure
diff --git a/tests/du/two-args b/tests/du/two-args
index e679921fe..ed544b091 100755
--- a/tests/du/two-args
+++ b/tests/du/two-args
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- du --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && du --version
# Run this test from a sub-directory one level deeper than normal,
# so that the "du .." below doesn't traverse sibling directories
diff --git a/tests/id/no-context b/tests/id/no-context
index fa9ffb350..90ff71ee0 100755
--- a/tests/id/no-context
+++ b/tests/id/no-context
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- id --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && id --version
# We don't need selinux *FS* support to test id,
# but this is as good a witness as any, in general.
diff --git a/tests/install/basic-1 b/tests/install/basic-1
index 7ea103b28..6470f5dd3 100755
--- a/tests/install/basic-1
+++ b/tests/install/basic-1
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ginstall --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ginstall --version
skip_if_root_
dir=dir
diff --git a/tests/install/create-leading b/tests/install/create-leading
index e342e23df..acb92a9a6 100755
--- a/tests/install/create-leading
+++ b/tests/install/create-leading
@@ -19,12 +19,8 @@
# Note that the tests below use `ginstall', not install, because
# that's the name of the binary in ../../src.
-if test "$VERBOSE" = yes; then
- set -x
- ginstall --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ginstall --version
file=file
diff --git a/tests/install/d-slashdot b/tests/install/d-slashdot
index 960898c52..b7cd17a22 100755
--- a/tests/install/d-slashdot
+++ b/tests/install/d-slashdot
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- install --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && install --version
ginstall -d d1/. || fail=1
diff --git a/tests/install/install-C b/tests/install/install-C
index 681a60e9a..ea6292c79 100755
--- a/tests/install/install-C
+++ b/tests/install/install-C
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ginstall --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ginstall --version
skip_if_setgid_
mode1=0644
diff --git a/tests/install/install-C-root b/tests/install/install-C-root
index 29ff2503c..a36aa1efe 100755
--- a/tests/install/install-C-root
+++ b/tests/install/install-C-root
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ginstall --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ginstall --version
require_root_
skip_if_setgid_
diff --git a/tests/install/install-C-selinux b/tests/install/install-C-selinux
index fe8e5a61b..8818c7359 100755
--- a/tests/install/install-C-selinux
+++ b/tests/install/install-C-selinux
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ginstall --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ginstall --version
require_selinux_
diff --git a/tests/install/strip-program b/tests/install/strip-program
index abe4b5fb0..71001d9d9 100755
--- a/tests/install/strip-program
+++ b/tests/install/strip-program
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ginstall --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ginstall --version
working_umask_or_skip_
diff --git a/tests/install/trap b/tests/install/trap
index d71bd4a01..3092e9249 100755
--- a/tests/install/trap
+++ b/tests/install/trap
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ginstall --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ginstall --version
# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh.
diff --git a/tests/ln/backup-1 b/tests/ln/backup-1
index 83d7e629b..f07ba9493 100755
--- a/tests/ln/backup-1
+++ b/tests/ln/backup-1
@@ -19,12 +19,8 @@
# Based on a problem report from Jamie Lokier.
-if test "$VERBOSE" = yes; then
- set -x
- ln --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ln --version
touch a b || framework_failure
diff --git a/tests/ln/hard-backup b/tests/ln/hard-backup
index 6dfce5163..3b3f6ec71 100755
--- a/tests/ln/hard-backup
+++ b/tests/ln/hard-backup
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ln --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ln --version
touch f || framework_failure
diff --git a/tests/ln/hard-to-sym b/tests/ln/hard-to-sym
index ac74bb97d..a78b738ad 100755
--- a/tests/ln/hard-to-sym
+++ b/tests/ln/hard-to-sym
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ln --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ln --version
# ===================================================
diff --git a/tests/ln/misc b/tests/ln/misc
index 362bf354c..de03890f4 100755
--- a/tests/ln/misc
+++ b/tests/ln/misc
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ln --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ln --version
t=tln-symlink
d=tln-subdir
diff --git a/tests/ln/slash-decorated-nonexistent-dest b/tests/ln/slash-decorated-nonexistent-dest
index f7d51e8bb..1020da270 100755
--- a/tests/ln/slash-decorated-nonexistent-dest
+++ b/tests/ln/slash-decorated-nonexistent-dest
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ln --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ln --version
touch f || framework_failure
diff --git a/tests/ln/target-1 b/tests/ln/target-1
index 3865e2cde..1f1ebc2d5 100755
--- a/tests/ln/target-1
+++ b/tests/ln/target-1
@@ -21,12 +21,8 @@
# ln: `d/.': cannot overwrite directory
# Based on a test case from Dmitry V. Levin.
-if test "$VERBOSE" = yes; then
- set -x
- ln --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ln --version
mkdir d || framework_failure
ln -s --target-dir=d ../f || fail=1
diff --git a/tests/ls/abmon-align b/tests/ls/abmon-align
index 9b50d5e4d..21c22f480 100755
--- a/tests/ls/abmon-align
+++ b/tests/ls/abmon-align
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
for mon in $(seq -w 12); do
touch -d"+$mon month" $mon.ts || framework_failure
diff --git a/tests/ls/capability b/tests/ls/capability
index 3997c731e..200060ae8 100755
--- a/tests/ls/capability
+++ b/tests/ls/capability
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
require_root_
grep '^#define HAVE_CAP 1' $CONFIG_HEADER > /dev/null \
diff --git a/tests/ls/color-clear-to-eol b/tests/ls/color-clear-to-eol
index 1be68cab6..683ee4e9f 100755
--- a/tests/ls/color-clear-to-eol
+++ b/tests/ls/color-clear-to-eol
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
long_name=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.foo
touch $long_name || framework_failure
diff --git a/tests/ls/color-dtype-dir b/tests/ls/color-dtype-dir
index 29b872c21..b691ae75c 100755
--- a/tests/ls/color-dtype-dir
+++ b/tests/ls/color-dtype-dir
@@ -19,12 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
# Don't let a different umask perturb the results.
umask 22
diff --git a/tests/ls/color-norm b/tests/ls/color-norm
index e7a68299e..9d946a09b 100755
--- a/tests/ls/color-norm
+++ b/tests/ls/color-norm
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
# Don't let a different umask perturb the results.
umask 22
diff --git a/tests/ls/dangle b/tests/ls/dangle
index f7d97833a..f544df266 100755
--- a/tests/ls/dangle
+++ b/tests/ls/dangle
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
ln -s no-such-file dangle || framework_failure
mkdir -p dir/sub || framework_failure
diff --git a/tests/ls/dired b/tests/ls/dired
index 1d9c0ee1b..b59426d83 100755
--- a/tests/ls/dired
+++ b/tests/ls/dired
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
mkdir dir || framework_failure
diff --git a/tests/ls/file-type b/tests/ls/file-type
index 7557166ba..07a8cd433 100755
--- a/tests/ls/file-type
+++ b/tests/ls/file-type
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
mkdir sub
cd sub
diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink
index afa9947d8..00e49bac9 100755
--- a/tests/ls/follow-slink
+++ b/tests/ls/follow-slink
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
# Isolate output files from directory being listed
mkdir dir dir/sub dir1 || framework_failure
diff --git a/tests/ls/infloop b/tests/ls/infloop
index b237adc39..be89efcab 100755
--- a/tests/ls/infloop
+++ b/tests/ls/infloop
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
mkdir loop || framework_failure
ln -s ../loop loop/sub || framework_failure
diff --git a/tests/ls/inode b/tests/ls/inode
index 16a80f25b..08ae0f8b9 100755
--- a/tests/ls/inode
+++ b/tests/ls/inode
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
touch f || framework_failure
ln -s f slink || framework_failure
diff --git a/tests/ls/m-option b/tests/ls/m-option
index de73b8d80..b35e527d4 100755
--- a/tests/ls/m-option
+++ b/tests/ls/m-option
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
seq 2000 > b || framework_failure
touch a || framework_failure
diff --git a/tests/ls/multihardlink b/tests/ls/multihardlink
index 20a94c807..46850e883 100755
--- a/tests/ls/multihardlink
+++ b/tests/ls/multihardlink
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
working_umask_or_skip_
touch file file1 || framework_failure
diff --git a/tests/ls/no-arg b/tests/ls/no-arg
index 9eb32dce3..288688b35 100755
--- a/tests/ls/no-arg
+++ b/tests/ls/no-arg
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
mkdir -p dir/subdir || framework_failure
touch dir/subdir/file2 || framework_failure
diff --git a/tests/ls/no-cap b/tests/ls/no-cap
index 04b99edbc..c82620269 100755
--- a/tests/ls/no-cap
+++ b/tests/ls/no-cap
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
require_strace_ capget
strace -e capget ls --color=always > /dev/null 2> out || fail=1
diff --git a/tests/ls/proc-selinux-segfault b/tests/ls/proc-selinux-segfault
index 4173ee84f..f0dbb96ad 100755
--- a/tests/ls/proc-selinux-segfault
+++ b/tests/ls/proc-selinux-segfault
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
f=/proc/sys
test -r $f || f=.
diff --git a/tests/ls/readdir-mountpoint-inode b/tests/ls/readdir-mountpoint-inode
index d03ba06f9..9a38627c9 100755
--- a/tests/ls/readdir-mountpoint-inode
+++ b/tests/ls/readdir-mountpoint-inode
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
# We use --local here so as to not activate
# potentially very many remote mounts.
diff --git a/tests/ls/recursive b/tests/ls/recursive
index fe82241ca..a216249d1 100755
--- a/tests/ls/recursive
+++ b/tests/ls/recursive
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
mkdir x y a b c a/1 a/2 a/3 || framework_failure
touch f a/1/I a/1/II || framework_failure
diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype
index 6aaab5338..bfc51aad3 100755
--- a/tests/ls/stat-dtype
+++ b/tests/ls/stat-dtype
@@ -21,12 +21,8 @@
# The trick is to create an un-stat'able symlink and to see if ls
# can report its type nonetheless, using dirent.d_type.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
# Skip this test unless "." is on a file system with useful d_type info.
# FIXME: This uses "ls -p" to decide whether to test "ls" with other options,
diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed
index 4a2b6c4a1..e7feba552 100755
--- a/tests/ls/stat-failed
+++ b/tests/ls/stat-failed
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
skip_if_root_
mkdir d || framework_failure
diff --git a/tests/ls/stat-free-symlinks b/tests/ls/stat-free-symlinks
index 7af9e344d..f9b6bb59f 100755
--- a/tests/ls/stat-free-symlinks
+++ b/tests/ls/stat-free-symlinks
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
require_strace_ stat
touch x || framework_failure
diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent
index 25b2021e1..00a08140d 100755
--- a/tests/ls/stat-vs-dirent
+++ b/tests/ls/stat-vs-dirent
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
root_dev_ino=`stat --format=%d-%i /`
diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash
index bacbc73d7..9db9ba61d 100755
--- a/tests/ls/symlink-slash
+++ b/tests/ls/symlink-slash
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
mkdir dir || framework_failure
ln -s dir symlink || framework_failure
diff --git a/tests/ls/x-option b/tests/ls/x-option
index 8d9658124..ed6ef625f 100755
--- a/tests/ls/x-option
+++ b/tests/ls/x-option
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
mkdir subdir || framework_failure
touch subdir/b || framework_failure
diff --git a/tests/misc/cat-buf b/tests/misc/cat-buf
index cd6f9df8a..303c4e268 100755
--- a/tests/misc/cat-buf
+++ b/tests/misc/cat-buf
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cat --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cat --version
# Use a fifo rather than a pipe in the tests below
# so that the producer (cat) will wait until the
diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc
index 9219d86aa..7214c25c8 100755
--- a/tests/misc/cat-proc
+++ b/tests/misc/cat-proc
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cat --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cat --version
f=/proc/cpuinfo
diff --git a/tests/misc/chcon b/tests/misc/chcon
index 72961b077..3aefab51b 100755
--- a/tests/misc/chcon
+++ b/tests/misc/chcon
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chcon --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chcon --version
require_root_
require_selinux_
skip_if_mcstransd_is_running_
diff --git a/tests/misc/chcon-fail b/tests/misc/chcon-fail
index e099256d0..4daa848cf 100755
--- a/tests/misc/chcon-fail
+++ b/tests/misc/chcon-fail
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chcon --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chcon --version
# neither context nor file
diff --git a/tests/misc/chroot-credentials b/tests/misc/chroot-credentials
index bf79c05ce..e671f7fc8 100755
--- a/tests/misc/chroot-credentials
+++ b/tests/misc/chroot-credentials
@@ -17,12 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chroot --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chroot --version
require_root_
diff --git a/tests/misc/chroot-fail b/tests/misc/chroot-fail
index 6b4e2d8e1..a3044f70b 100755
--- a/tests/misc/chroot-fail
+++ b/tests/misc/chroot-fail
@@ -17,12 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chroot --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && chroot --version
# These tests verify exact status of internal failure; since none of
diff --git a/tests/misc/close-stdout b/tests/misc/close-stdout
index c7b0b65a9..e236558db 100755
--- a/tests/misc/close-stdout
+++ b/tests/misc/close-stdout
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
p=$abs_top_builddir
diff --git a/tests/misc/csplit b/tests/misc/csplit
index f365da335..98c704c14 100755
--- a/tests/misc/csplit
+++ b/tests/misc/csplit
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- csplit --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && csplit --version
# csplit could get a failed assertion to 2.0.17
diff --git a/tests/misc/date-sec b/tests/misc/date-sec
index 0d184131c..a9f19a55b 100755
--- a/tests/misc/date-sec
+++ b/tests/misc/date-sec
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- date --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && date --version
diff --git a/tests/misc/df b/tests/misc/df
index 730f841a3..22451c53a 100755
--- a/tests/misc/df
+++ b/tests/misc/df
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- df --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && df --version
case `df .` in
*'
diff --git a/tests/misc/df-P b/tests/misc/df-P
index c7cada499..bd4e0bc7c 100755
--- a/tests/misc/df-P
+++ b/tests/misc/df-P
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- df --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && df --version
df -P . > t1 || fail=1
diff --git a/tests/misc/env b/tests/misc/env
index 96a4eaba6..11343a1ff 100755
--- a/tests/misc/env
+++ b/tests/misc/env
@@ -17,12 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- env --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && env --version
# Verify clearing the environment
diff --git a/tests/misc/false-status b/tests/misc/false-status
index 28f4ce4f2..a8e1fa624 100755
--- a/tests/misc/false-status
+++ b/tests/misc/false-status
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- false --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && false --version
false --version > /dev/null && fail=1
false --help > /dev/null && fail=1
diff --git a/tests/misc/fmt-long-line b/tests/misc/fmt-long-line
index a8be381f1..3fb98e572 100755
--- a/tests/misc/fmt-long-line
+++ b/tests/misc/fmt-long-line
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- fmt --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && fmt --version
printf '%2030s\n' ' '|sed 's/../ y/g' > in || framework_failure
diff --git a/tests/misc/groups-dash b/tests/misc/groups-dash
index 5c7989e1d..ea4b94ac7 100755
--- a/tests/misc/groups-dash
+++ b/tests/misc/groups-dash
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- groups --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && groups --version
require_built_ groups
# Coreutils 6.9 and earlier failed to display information on first argument
diff --git a/tests/misc/groups-version b/tests/misc/groups-version
index b3a87873b..ec157a26c 100755
--- a/tests/misc/groups-version
+++ b/tests/misc/groups-version
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- groups --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && groups --version
require_built_ groups
groups --version | sed 's/^groups/id/; /^$/q' > out || fail=1
diff --git a/tests/misc/head-c b/tests/misc/head-c
index ab933ec7b..70a0b45e8 100755
--- a/tests/misc/head-c
+++ b/tests/misc/head-c
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- head --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && head --version
echo abc > in || framework_failure
diff --git a/tests/misc/head-pos b/tests/misc/head-pos
index abbf22c0a..8d5d00a27 100755
--- a/tests/misc/head-pos
+++ b/tests/misc/head-pos
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- head --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && head --version
(echo a; echo b) > in || framework_failure
diff --git a/tests/misc/id-context b/tests/misc/id-context
index b49fbc692..8e380944c 100755
--- a/tests/misc/id-context
+++ b/tests/misc/id-context
@@ -15,12 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- id --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && id --version
# Require selinux - when selinux is disabled, id never prints scontext.
require_selinux_
diff --git a/tests/misc/id-groups b/tests/misc/id-groups
index 0b50930c8..8a6eea34d 100755
--- a/tests/misc/id-groups
+++ b/tests/misc/id-groups
@@ -15,12 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- id --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && id --version
id -G $(id -nu) || fail=1
diff --git a/tests/misc/ls-time b/tests/misc/ls-time
index eda0f0105..721fb8128 100755
--- a/tests/misc/ls-time
+++ b/tests/misc/ls-time
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ls --version
# Avoid any possible glitches due to daylight-saving changes near the
# time stamps used during the test.
diff --git a/tests/misc/mknod b/tests/misc/mknod
index 872249262..049ed0f72 100755
--- a/tests/misc/mknod
+++ b/tests/misc/mknod
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mknod --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mknod --version
umask 777
diff --git a/tests/misc/nice b/tests/misc/nice
index 3a724ad83..939a9aa62 100755
--- a/tests/misc/nice
+++ b/tests/misc/nice
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- nice --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && nice --version
tests='
0 empty 10
diff --git a/tests/misc/nice-fail b/tests/misc/nice-fail
index 944023387..6c8314c6b 100755
--- a/tests/misc/nice-fail
+++ b/tests/misc/nice-fail
@@ -17,12 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- nice --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && nice --version
# These tests verify exact status of internal failure.
diff --git a/tests/misc/nl b/tests/misc/nl
index 506501d91..81d0a40de 100755
--- a/tests/misc/nl
+++ b/tests/misc/nl
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- nl --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && nl --version
echo a | nl > out || fail=1
diff --git a/tests/misc/nohup b/tests/misc/nohup
index a7246df16..9d3d76aa6 100755
--- a/tests/misc/nohup
+++ b/tests/misc/nohup
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- nohup --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && nohup --version
nohup sh -c 'echo stdout; echo stderr 1>&2' 2>err || fail=1
diff --git a/tests/misc/nproc-avail b/tests/misc/nproc-avail
index ea4ba976c..424bbe043 100755
--- a/tests/misc/nproc-avail
+++ b/tests/misc/nproc-avail
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- nproc --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && nproc --version
all=$(nproc --all)
available=$(OMP_NUM_THREADS= nproc)
diff --git a/tests/misc/nproc-positive b/tests/misc/nproc-positive
index 03157c51b..1f12c9b96 100755
--- a/tests/misc/nproc-positive
+++ b/tests/misc/nproc-positive
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- nproc --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && nproc --version
for mode in --all ''; do
procs=$(nproc $mode)
diff --git a/tests/misc/od-N b/tests/misc/od-N
index 037ea371c..6d09f8e98 100755
--- a/tests/misc/od-N
+++ b/tests/misc/od-N
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- od --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && od --version
echo abcdefg > in || framework_failure
diff --git a/tests/misc/od-multiple-t b/tests/misc/od-multiple-t
index bc482d9f5..0aecaf05b 100755
--- a/tests/misc/od-multiple-t
+++ b/tests/misc/od-multiple-t
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- od --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && od --version
# Choose 48 bytes for the input, as that is lcm for 1, 2, 4, 8, 12, 16;
# we don't anticipate any other native object size on modern hardware.
diff --git a/tests/misc/od-x8 b/tests/misc/od-x8
index f25669efe..d9c933800 100755
--- a/tests/misc/od-x8
+++ b/tests/misc/od-x8
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- od --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && od --version
od -t x8 /dev/null >/dev/null ||
skip_test_ "od lacks support for 8-byte quantities"
diff --git a/tests/misc/pathchk1 b/tests/misc/pathchk1
index cc0def866..ae32c9c29 100755
--- a/tests/misc/pathchk1
+++ b/tests/misc/pathchk1
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- pathchk --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && pathchk --version
skip_if_root_
touch file || framework_failure
diff --git a/tests/misc/ptx-overrun b/tests/misc/ptx-overrun
index 7cd5f8477..637c61d13 100755
--- a/tests/misc/ptx-overrun
+++ b/tests/misc/ptx-overrun
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ptx --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ptx --version
# Using a long file name makes an abort more likely.
# Even with no file name, valgrind detects the buffer overrun.
diff --git a/tests/misc/readlink-fp-loop b/tests/misc/readlink-fp-loop
index dfb2ba19a..ab66fa12a 100755
--- a/tests/misc/readlink-fp-loop
+++ b/tests/misc/readlink-fp-loop
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- readlink --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && readlink --version
cwd=$("$abs_top_builddir/src/pwd")
# To trigger this bug, we have to construct a name/situation during
diff --git a/tests/misc/runcon-no-reorder b/tests/misc/runcon-no-reorder
index c38c91d3c..ee20df041 100755
--- a/tests/misc/runcon-no-reorder
+++ b/tests/misc/runcon-no-reorder
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- runcon --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && runcon --version
diag='runcon: runcon may be used only on a SELinux kernel'
echo "$diag" > exp || framework_failure
diff --git a/tests/misc/seq-long-double b/tests/misc/seq-long-double
index f9450a2ea..e07ea82db 100755
--- a/tests/misc/seq-long-double
+++ b/tests/misc/seq-long-double
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- seq --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && seq --version
getlimits_
# Run this test only with glibc and sizeof (long double) > sizeof (double).
diff --git a/tests/misc/shred-exact b/tests/misc/shred-exact
index 289b4544c..2aeef77ac 100755
--- a/tests/misc/shred-exact
+++ b/tests/misc/shred-exact
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- shred --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && shred --version
for opt in --exact --zero; do
diff --git a/tests/misc/shred-passes b/tests/misc/shred-passes
index 8d92c053a..2298553eb 100755
--- a/tests/misc/shred-passes
+++ b/tests/misc/shred-passes
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- shred --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && shred --version
# shred a single letter, zero length file which should result in
diff --git a/tests/misc/shred-remove b/tests/misc/shred-remove
index fbd30aaea..0e2423cff 100755
--- a/tests/misc/shred-remove
+++ b/tests/misc/shred-remove
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- shred --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && shred --version
skip_if_root_
# The length of the basename is what matters.
diff --git a/tests/misc/shuf b/tests/misc/shuf
index 6adaae37f..e612ee0bc 100755
--- a/tests/misc/shuf
+++ b/tests/misc/shuf
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- shuf --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && shuf --version
seq 100 > in || framework_failure
diff --git a/tests/misc/sort-compress b/tests/misc/sort-compress
index 5ad28d69d..bba07604d 100755
--- a/tests/misc/sort-compress
+++ b/tests/misc/sort-compress
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version
seq -w 2000 > exp || framework_failure
tac exp > in || framework_failure
diff --git a/tests/misc/sort-continue b/tests/misc/sort-continue
index c68ceece1..e4b8adfb3 100755
--- a/tests/misc/sort-continue
+++ b/tests/misc/sort-continue
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version
# Skip the test when running under valgrind.
( ulimit -n 6; sort < /dev/null ) \
diff --git a/tests/misc/sort-debug-keys b/tests/misc/sort-debug-keys
index 1dd3895c9..ee65a7284 100755
--- a/tests/misc/sort-debug-keys
+++ b/tests/misc/sort-debug-keys
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version
number() { cat -n | sed 's/^ *//'; }
diff --git a/tests/misc/sort-debug-warn b/tests/misc/sort-debug-warn
index 1ba6c0479..67668a135 100755
--- a/tests/misc/sort-debug-warn
+++ b/tests/misc/sort-debug-warn
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version
cat <<\EOF > exp
sort: using simple byte comparison
diff --git a/tests/misc/sort-float b/tests/misc/sort-float
index 04071598f..bd6a9b88b 100755
--- a/tests/misc/sort-float
+++ b/tests/misc/sort-float
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version
# Return 0 if LDBL_MIN is smaller than DBL_MIN, else 1.
# Dissect numbers like these, comparing first exponent, then
diff --git a/tests/misc/sort-merge-fdlimit b/tests/misc/sort-merge-fdlimit
index 56b851811..89a408490 100755
--- a/tests/misc/sort-merge-fdlimit
+++ b/tests/misc/sort-merge-fdlimit
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version
require_ulimit_
mkdir in err || framework_failure
diff --git a/tests/misc/sort-month b/tests/misc/sort-month
index 5ac6afde5..c0fb2eb91 100755
--- a/tests/misc/sort-month
+++ b/tests/misc/sort-month
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version
locale --version >/dev/null 2>&1 ||
skip_test_ 'The locale utility is not present'
diff --git a/tests/misc/sort-rand b/tests/misc/sort-rand
index cead49ef5..07169e3c6 100755
--- a/tests/misc/sort-rand
+++ b/tests/misc/sort-rand
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version
seq 100 > in || framework_failure
diff --git a/tests/misc/sort-version b/tests/misc/sort-version
index 741ee8b27..e6a07c27b 100755
--- a/tests/misc/sort-version
+++ b/tests/misc/sort-version
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version
cat > in << _EOF_
gcc-c++-10.fc9.tar.gz
diff --git a/tests/misc/split-a b/tests/misc/split-a
index 2fefff59d..27269e2db 100755
--- a/tests/misc/split-a
+++ b/tests/misc/split-a
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- split --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && split --version
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/misc/split-fail b/tests/misc/split-fail
index 0ce6f5734..ec1941691 100755
--- a/tests/misc/split-fail
+++ b/tests/misc/split-fail
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- split --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && split --version
getlimits_
touch in || framework_failure
diff --git a/tests/misc/split-l b/tests/misc/split-l
index fb07a27a0..2e64a2c93 100755
--- a/tests/misc/split-l
+++ b/tests/misc/split-l
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ln --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && ln --version
printf '1\n2\n3\n4\n5\n' > in || framework_failure
diff --git a/tests/misc/stat-fmt b/tests/misc/stat-fmt
index 3133c5103..5e58ea46a 100755
--- a/tests/misc/stat-fmt
+++ b/tests/misc/stat-fmt
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- stat --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && stat --version
diff --git a/tests/misc/stat-hyphen b/tests/misc/stat-hyphen
index ea68b08fa..2e0fdd29a 100755
--- a/tests/misc/stat-hyphen
+++ b/tests/misc/stat-hyphen
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- stat --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && stat --version
printf -- '-\n' > exp || framework_failure
touch f || framework_failure
diff --git a/tests/misc/stat-slash b/tests/misc/stat-slash
index 7210f92fd..4f0660f22 100755
--- a/tests/misc/stat-slash
+++ b/tests/misc/stat-slash
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- stat --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && stat --version
touch file || framework_failure
mkdir dir || framework_failure
diff --git a/tests/misc/stty-invalid b/tests/misc/stty-invalid
index 0537568bf..d80e3d413 100755
--- a/tests/misc/stty-invalid
+++ b/tests/misc/stty-invalid
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- stty --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && stty --version
require_controlling_input_terminal_
trap '' TTOU # Ignore SIGTTOU
diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue
index 5bf709f78..59dddc83e 100755
--- a/tests/misc/tac-continue
+++ b/tests/misc/tac-continue
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tac --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tac --version
# See if the envvar is defined.
if test x = "x$FULL_PARTITION_TMPDIR"; then
diff --git a/tests/misc/tee b/tests/misc/tee
index 6c4c85904..9562966ae 100755
--- a/tests/misc/tee
+++ b/tests/misc/tee
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tee --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tee --version
echo line >sample || framework_failure
nums=`seq 9` || framework_failure
diff --git a/tests/misc/tee-dash b/tests/misc/tee-dash
index ba688c00d..e72eadeef 100755
--- a/tests/misc/tee-dash
+++ b/tests/misc/tee-dash
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tee --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tee --version
tee - </dev/null || fail=1
diff --git a/tests/misc/timeout b/tests/misc/timeout
index 6c9b02e80..8c9202613 100755
--- a/tests/misc/timeout
+++ b/tests/misc/timeout
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- timeout --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && timeout --version
# no timeout
timeout 10 true || fail=1
diff --git a/tests/misc/timeout-parameters b/tests/misc/timeout-parameters
index 42d7b13b2..c5949e62b 100755
--- a/tests/misc/timeout-parameters
+++ b/tests/misc/timeout-parameters
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- timeout --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && timeout --version
getlimits_
diff --git a/tests/misc/truncate-dangling-symlink b/tests/misc/truncate-dangling-symlink
index 3499da755..801b55d17 100755
--- a/tests/misc/truncate-dangling-symlink
+++ b/tests/misc/truncate-dangling-symlink
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- truncate --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && truncate --version
ln -s truncate-target t-symlink
diff --git a/tests/misc/truncate-dir-fail b/tests/misc/truncate-dir-fail
index fe33857a2..cc94dc4bc 100755
--- a/tests/misc/truncate-dir-fail
+++ b/tests/misc/truncate-dir-fail
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- truncate --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && truncate --version
# truncate on dir not allowed
truncate -s+0 . && fail=1
diff --git a/tests/misc/truncate-fail-diag b/tests/misc/truncate-fail-diag
index 5ce248113..68a384236 100755
--- a/tests/misc/truncate-fail-diag
+++ b/tests/misc/truncate-fail-diag
@@ -20,12 +20,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- truncate --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && truncate --version
skip_if_root_
diff --git a/tests/misc/truncate-fifo b/tests/misc/truncate-fifo
index a4c36cb90..469ba5e97 100755
--- a/tests/misc/truncate-fifo
+++ b/tests/misc/truncate-fifo
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- truncate --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && truncate --version
mkfifo_or_skip_ fifo
diff --git a/tests/misc/truncate-no-create-missing b/tests/misc/truncate-no-create-missing
index aa43d8026..c5a87c2d0 100755
--- a/tests/misc/truncate-no-create-missing
+++ b/tests/misc/truncate-no-create-missing
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- truncate --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && truncate --version
# truncate -c no-such-file should not fail.
diff --git a/tests/misc/truncate-overflow b/tests/misc/truncate-overflow
index 0e9519f64..991c1c83f 100755
--- a/tests/misc/truncate-overflow
+++ b/tests/misc/truncate-overflow
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- truncate --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && truncate --version
getlimits_
diff --git a/tests/misc/truncate-parameters b/tests/misc/truncate-parameters
index c2f701970..980ebffab 100755
--- a/tests/misc/truncate-parameters
+++ b/tests/misc/truncate-parameters
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- truncate --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && truncate --version
# must specify at least 1 file
diff --git a/tests/misc/truncate-relative b/tests/misc/truncate-relative
index 9d589564f..a82fd9c32 100755
--- a/tests/misc/truncate-relative
+++ b/tests/misc/truncate-relative
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- truncate --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && truncate --version
# mixture of relative modifiers not allowed
diff --git a/tests/misc/wc-files0 b/tests/misc/wc-files0
index eb2aaa649..7d3634e95 100755
--- a/tests/misc/wc-files0
+++ b/tests/misc/wc-files0
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- wc --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && wc --version
echo 2 > 2b || framework_failure
echo 2 words > 2w || framework_failure
diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1
index cd60d9f36..9c8e8a5d8 100755
--- a/tests/mkdir/p-1
+++ b/tests/mkdir/p-1
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
mkdir --parents "`pwd`/t" || fail=1
test -d t || fail=1
diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2
index 863f188dc..735d7ad08 100755
--- a/tests/mkdir/p-2
+++ b/tests/mkdir/p-2
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
mkdir --parents "`pwd`/t/u" || fail=1
test -d t/u || fail=1
diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3
index 116c794be..ddc812e0e 100755
--- a/tests/mkdir/p-3
+++ b/tests/mkdir/p-3
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
skip_if_root_
mkdir no-access || framework_failure
diff --git a/tests/mkdir/p-slashdot b/tests/mkdir/p-slashdot
index 49843f1c0..fba112df2 100755
--- a/tests/mkdir/p-slashdot
+++ b/tests/mkdir/p-slashdot
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
mkdir -p d1/. || fail=1
diff --git a/tests/mkdir/p-thru-slink b/tests/mkdir/p-thru-slink
index 687c0ffed..e2cc9c93f 100755
--- a/tests/mkdir/p-thru-slink
+++ b/tests/mkdir/p-thru-slink
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
ln -s . slink || framework_failure
diff --git a/tests/mkdir/p-v b/tests/mkdir/p-v
index 6118b492a..aeae33da9 100755
--- a/tests/mkdir/p-v
+++ b/tests/mkdir/p-v
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
mkdir -pv foo/a/b/c/d >out || fail=1
diff --git a/tests/mkdir/parents b/tests/mkdir/parents
index 405cc1942..951b6f9e0 100755
--- a/tests/mkdir/parents
+++ b/tests/mkdir/parents
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
skip_if_setgid_
mkdir -m 700 e-dir || framework_failure
diff --git a/tests/mkdir/perm b/tests/mkdir/perm
index 7707e4f8d..0cd0a5581 100755
--- a/tests/mkdir/perm
+++ b/tests/mkdir/perm
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
skip_if_setgid_
working_umask_or_skip_
diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1
index 93d203e77..7ed437021 100755
--- a/tests/mkdir/special-1
+++ b/tests/mkdir/special-1
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
set_mode_string=u=rwx,g=rx,o=w,-s,+t
output_mode_string=drwxr-x-wT
diff --git a/tests/mkdir/t-slash b/tests/mkdir/t-slash
index 053f98df3..ed72880c7 100755
--- a/tests/mkdir/t-slash
+++ b/tests/mkdir/t-slash
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
mkdir -p dir/ || fail=1
diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly
index 18a44ae9a..2c8ac52f4 100755
--- a/tests/mkdir/writable-under-readonly
+++ b/tests/mkdir/writable-under-readonly
@@ -24,12 +24,8 @@
#
# Demonstrate the problem, as root:
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mkdir --version
require_root_
# FIXME: for now, skip it unconditionally
diff --git a/tests/mv/atomic b/tests/mv/atomic
index 1d313c59e..5df2d60fd 100755
--- a/tests/mv/atomic
+++ b/tests/mv/atomic
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
require_strace_ unlink
# Before the fix, mv would unnecessarily unlink the destination symlink:
diff --git a/tests/mv/atomic2 b/tests/mv/atomic2
index 49949bd7c..4bc0e73fe 100755
--- a/tests/mv/atomic2
+++ b/tests/mv/atomic2
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
require_strace_ unlink
# Before the fix, mv would unnecessarily unlink the destination symlink:
diff --git a/tests/mv/backup-dir b/tests/mv/backup-dir
index 3c2bb5262..a96edc680 100755
--- a/tests/mv/backup-dir
+++ b/tests/mv/backup-dir
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
mkdir A B || framework_failure
touch X Y || framework_failure
diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src
index 45ca17cbb..fe5c68049 100755
--- a/tests/mv/backup-is-src
+++ b/tests/mv/backup-is-src
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/dir-file b/tests/mv/dir-file
index 4a0b37a4a..ebe2a673f 100755
--- a/tests/mv/dir-file
+++ b/tests/mv/dir-file
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
mkdir -p dir/file || framework_failure
> file || framework_failure
diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir
index 8df625db5..de7770b5d 100755
--- a/tests/mv/dir2dir
+++ b/tests/mv/dir2dir
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
mkdir -p a/t b/t || framework_failure
touch a/t/f || framework_failure
diff --git a/tests/mv/force b/tests/mv/force
index bebb04a26..708efcbf4 100755
--- a/tests/mv/force
+++ b/tests/mv/force
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
ff=mvforce
ff2=mvforce2
diff --git a/tests/mv/hard-3 b/tests/mv/hard-3
index bf6675fe9..61d71c1fa 100755
--- a/tests/mv/hard-3
+++ b/tests/mv/hard-3
@@ -30,12 +30,8 @@
# directory, because it requires use of the --preserve=link option that
# mv enables by default.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && cp --version
skip_if_root_
mkdir -p x dst/x || framework_failure
diff --git a/tests/mv/hard-4 b/tests/mv/hard-4
index d3a513af8..b22969eb4 100755
--- a/tests/mv/hard-4
+++ b/tests/mv/hard-4
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
touch a || framework_failure
ln a b || framework_failure
diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1
index b3d5ce6d6..3d7c6abf0 100755
--- a/tests/mv/hard-link-1
+++ b/tests/mv/hard-link-1
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/hard-verbose b/tests/mv/hard-verbose
index 4c81752c6..8c0dfe0fa 100755
--- a/tests/mv/hard-verbose
+++ b/tests/mv/hard-verbose
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
touch x || framework_failure
ln x y || framework_failure
diff --git a/tests/mv/i-3 b/tests/mv/i-3
index 7247d9432..fededda97 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
require_controlling_input_terminal_
skip_if_root_
trap '' TTIN # Ignore SIGTTIN
diff --git a/tests/mv/i-4 b/tests/mv/i-4
index dfd7d8a1b..d5d746561 100755
--- a/tests/mv/i-4
+++ b/tests/mv/i-4
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
for i in a b; do
echo $i > $i || framework_failure
diff --git a/tests/mv/i-5 b/tests/mv/i-5
index e1d8a5235..e73d4b209 100755
--- a/tests/mv/i-5
+++ b/tests/mv/i-5
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
mkdir a || framework_failure
touch b || framework_failure
diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no
index e206d2ccc..2d7630109 100755
--- a/tests/mv/i-link-no
+++ b/tests/mv/i-link-no
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
mkdir a b || framework_failure
echo foo > a/foo || framework_failure
diff --git a/tests/mv/into-self b/tests/mv/into-self
index ea999d84b..2c28a2f71 100755
--- a/tests/mv/into-self
+++ b/tests/mv/into-self
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
dir=toself-dir
file=toself-file
diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2
index 720bc9839..c5d1bd5c4 100755
--- a/tests/mv/into-self-2
+++ b/tests/mv/into-self-2
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3
index d11365a99..8a506626c 100755
--- a/tests/mv/into-self-3
+++ b/tests/mv/into-self-3
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
dir1=is3-dir1
dir2=is3-dir2
diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4
index 6182c8909..18a32dc59 100755
--- a/tests/mv/into-self-4
+++ b/tests/mv/into-self-4
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
touch file || framework_failure
ln -s file s || framework_failure
diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd
index 424f72517..3155397e7 100755
--- a/tests/mv/leak-fd
+++ b/tests/mv/leak-fd
@@ -18,12 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# limit so don't run it by default.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
skip_if_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/mv-n b/tests/mv/mv-n
index 5886341c0..32739dd9f 100755
--- a/tests/mv/mv-n
+++ b/tests/mv/mv-n
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
# test miscellaneous combinations of -f -i -n parameters
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1
index 35bdc84c6..fe10acda7 100755
--- a/tests/mv/mv-special-1
+++ b/tests/mv/mv-special-1
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir
index 080a290db..f1d886ba5 100755
--- a/tests/mv/no-target-dir
+++ b/tests/mv/no-target-dir
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
mkdir -p d/sub empty src d2/sub e2 || framework_failure
touch f || framework_failure
diff --git a/tests/mv/part-fail b/tests/mv/part-fail
index 41240c073..c167076af 100755
--- a/tests/mv/part-fail
+++ b/tests/mv/part-fail
@@ -19,12 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
skip_if_root_
cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink
index 5b372d421..b97b0a0b5 100755
--- a/tests/mv/part-hardlink
+++ b/tests/mv/part-hardlink
@@ -19,12 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/part-rename b/tests/mv/part-rename
index ff32aa9b4..3f18045b4 100755
--- a/tests/mv/part-rename
+++ b/tests/mv/part-rename
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm
index 27007bdbc..01b1697d4 100755
--- a/tests/mv/partition-perm
+++ b/tests/mv/partition-perm
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/perm-1 b/tests/mv/perm-1
index 84b5828fd..fda23ed2d 100755
--- a/tests/mv/perm-1
+++ b/tests/mv/perm-1
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
skip_if_root_
mkdir -p no-write/dir || framework_failure
diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart
index fbb6ab29b..513c32565 100755
--- a/tests/mv/sticky-to-xpart
+++ b/tests/mv/sticky-to-xpart
@@ -19,12 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
require_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink
index d9d77a83f..5530eee4f 100755
--- a/tests/mv/to-symlink
+++ b/tests/mv/to-symlink
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash
index c23fbdb73..b0b362c8f 100755
--- a/tests/mv/trailing-slash
+++ b/tests/mv/trailing-slash
@@ -19,12 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && mv --version
mkdir foo || framework_failure
diff --git a/tests/readlink/can-e b/tests/readlink/can-e
index 41656f477..d7e934e39 100755
--- a/tests/readlink/can-e
+++ b/tests/readlink/can-e
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- readlink --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && readlink --version
pwd=`pwd`
my_pwd=$("$abs_top_builddir/src/pwd")
diff --git a/tests/readlink/can-f b/tests/readlink/can-f
index 2cfac18a1..a5020e646 100755
--- a/tests/readlink/can-f
+++ b/tests/readlink/can-f
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- readlink --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && readlink --version
pwd=`pwd`
my_pwd=$("$abs_top_builddir/src/pwd")
diff --git a/tests/readlink/can-m b/tests/readlink/can-m
index ee24e69cd..cf7c994bd 100755
--- a/tests/readlink/can-m
+++ b/tests/readlink/can-m
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- readlink --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && readlink --version
pwd=`pwd`
my_pwd=$("$abs_top_builddir/src/pwd")
diff --git a/tests/readlink/rl-1 b/tests/readlink/rl-1
index f6885ff0b..36dde3dc2 100755
--- a/tests/readlink/rl-1
+++ b/tests/readlink/rl-1
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- readlink --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && readlink --version
mkdir subdir || framework_failure
touch regfile || framework_failure
diff --git a/tests/rm/cycle b/tests/rm/cycle
index e700dbf38..4af7afee3 100755
--- a/tests/rm/cycle
+++ b/tests/rm/cycle
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
mkdir -p a/b
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink
index 270459c5b..b082901a6 100755
--- a/tests/rm/dangling-symlink
+++ b/tests/rm/dangling-symlink
@@ -19,12 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
ln -s no-file dangle
ln -s / symlink
diff --git a/tests/rm/deep-1 b/tests/rm/deep-1
index 861667916..b21e1e603 100755
--- a/tests/rm/deep-1
+++ b/tests/rm/deep-1
@@ -23,12 +23,8 @@
# If this test takes too long on your system, blame the OS.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
umask 022
diff --git a/tests/rm/deep-2 b/tests/rm/deep-2
index cb52b7fed..c90f60730 100755
--- a/tests/rm/deep-2
+++ b/tests/rm/deep-2
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
# Root can run this test, but it always succeeds, since for root, all
# files are writable, and write_protected_non_symlink never reaches
diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w
index c1b6fc4cb..8dc19d4fa 100755
--- a/tests/rm/dir-no-w
+++ b/tests/rm/dir-no-w
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir --mode=0500 unwritable-dir || framework_failure
diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur
index 7f62bd59c..816b72d18 100755
--- a/tests/rm/dir-nonrecur
+++ b/tests/rm/dir-nonrecur
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir d || framework_failure
diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel
index e88e9238f..81d405a72 100755
--- a/tests/rm/dot-rel
+++ b/tests/rm/dot-rel
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir a b || framework_failure
touch a/f b/f || framework_failure
diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc
index 70c974c6b..3aef6abaa 100755
--- a/tests/rm/empty-inacc
+++ b/tests/rm/empty-inacc
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
mkdir -m0 inacc || framework_failure
diff --git a/tests/rm/ext3-perf b/tests/rm/ext3-perf
index 227d4b997..155de1828 100755
--- a/tests/rm/ext3-perf
+++ b/tests/rm/ext3-perf
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
very_expensive_
diff --git a/tests/rm/f-1 b/tests/rm/f-1
index 819dc2f19..6400d5b84 100755
--- a/tests/rm/f-1
+++ b/tests/rm/f-1
@@ -18,12 +18,8 @@
test=f-1
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir -p d || framework_failure
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm
index 04b2ad1e3..0085d1f48 100755
--- a/tests/rm/fail-2eperm
+++ b/tests/rm/fail-2eperm
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
require_root_
# The containing directory must be owned by the user who eventually runs rm.
diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces
index 5d87211f9..fc20bd69e 100755
--- a/tests/rm/fail-eacces
+++ b/tests/rm/fail-eacces
@@ -19,12 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
ok=0
diff --git a/tests/rm/hash b/tests/rm/hash
index 9573f7a3d..8a4d66154 100755
--- a/tests/rm/hash
+++ b/tests/rm/hash
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
expensive_
# Create a hierarchy with 3*26 leaf directories, each at depth 153.
diff --git a/tests/rm/i-1 b/tests/rm/i-1
index b73b61725..20e88e875 100755
--- a/tests/rm/i-1
+++ b/tests/rm/i-1
@@ -18,12 +18,8 @@
test=i-1
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
t=t
mkdir -p $t || framework_failure
diff --git a/tests/rm/i-never b/tests/rm/i-never
index fa6d911a3..b00d3ef1b 100755
--- a/tests/rm/i-never
+++ b/tests/rm/i-never
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
touch f || framework_failure
diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r
index c0548b087..3178a9843 100755
--- a/tests/rm/i-no-r
+++ b/tests/rm/i-no-r
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir dir || framework_failure
echo y > y || framework_failure
diff --git a/tests/rm/ignorable b/tests/rm/ignorable
index f7f66b3ee..9028de8dc 100755
--- a/tests/rm/ignorable
+++ b/tests/rm/ignorable
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
touch existing-non-dir || framework_failure
diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible
index 722e49cb9..6e09de67a 100755
--- a/tests/rm/inaccessible
+++ b/tests/rm/inaccessible
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
# Skip this test if your system has neither the openat-style functions
# nor /proc/self/fd support with which to emulate them.
diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always
index 8444f7d36..9e15e2258 100755
--- a/tests/rm/interactive-always
+++ b/tests/rm/interactive-always
@@ -18,12 +18,8 @@
test=interactive-always
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
touch file1-1 file1-2 file2-1 file2-2 file3-1 file3-2 file4-1 file4-2 \
|| framework_failure
diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once
index bc612b0e7..48086d704 100755
--- a/tests/rm/interactive-once
+++ b/tests/rm/interactive-once
@@ -18,12 +18,8 @@
test=interactive-once
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir -p dir1-1 dir2-1 dir2-2 || framework_failure
touch file1-1 file2-1 file2-2 file2-3 file3-1 file3-2 file3-3 file3-4 \
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1
index e453def75..b48fa948b 100755
--- a/tests/rm/ir-1
+++ b/tests/rm/ir-1
@@ -18,12 +18,8 @@
test=ir-1
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
t=t
mkdir -p $t $t/a $t/b $t/c || framework_failure
diff --git a/tests/rm/isatty b/tests/rm/isatty
index ac3e1420b..1b18654cb 100755
--- a/tests/rm/isatty
+++ b/tests/rm/isatty
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up
index 9ee0357fe..e85196ce7 100755
--- a/tests/rm/no-give-up
+++ b/tests/rm/no-give-up
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
require_root_
mkdir d || framework_failure
diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system
index cb0b713b4..8abf7dc71 100755
--- a/tests/rm/one-file-system
+++ b/tests/rm/one-file-system
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
require_root_
# If used, these must *follow* test-lib.sh.
diff --git a/tests/rm/one-file-system2 b/tests/rm/one-file-system2
index 64725c7be..83a9cecee 100755
--- a/tests/rm/one-file-system2
+++ b/tests/rm/one-file-system2
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir -p a/b
diff --git a/tests/rm/r-1 b/tests/rm/r-1
index c1d2d815e..e07881b0e 100755
--- a/tests/rm/r-1
+++ b/tests/rm/r-1
@@ -19,12 +19,8 @@
test=r-1
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir a a/a || framework_failure
> b || framework_failure
diff --git a/tests/rm/r-2 b/tests/rm/r-2
index 445c634c7..485620fe4 100755
--- a/tests/rm/r-2
+++ b/tests/rm/r-2
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir t t/a t/a/b || framework_failure
> t/a/f || framework_failure
diff --git a/tests/rm/r-3 b/tests/rm/r-3
index 3d944f6a9..829685055 100755
--- a/tests/rm/r-3
+++ b/tests/rm/r-3
@@ -23,12 +23,8 @@
# 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
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir t || framework_failure
cd t || framework_failure
diff --git a/tests/rm/r-4 b/tests/rm/r-4
index 0b6658a4e..c8d3f9bc7 100755
--- a/tests/rm/r-4
+++ b/tests/rm/r-4
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir d || framework_failure
touch d/a || framework_failure
diff --git a/tests/rm/read-only b/tests/rm/read-only
index eb9a0cbd5..c54259469 100755
--- a/tests/rm/read-only
+++ b/tests/rm/read-only
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
require_root_
cwd=`pwd`
diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug
index c446d752b..be3e546c0 100755
--- a/tests/rm/readdir-bug
+++ b/tests/rm/readdir-bug
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
# Create a directory containing many files.
# What counts is a combination of the number of files and
diff --git a/tests/rm/rm1 b/tests/rm/rm1
index 5e54adf34..46ae76971 100755
--- a/tests/rm/rm1
+++ b/tests/rm/rm1
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
mkdir -p b/a/p b/c b/d || framework_failure
diff --git a/tests/rm/rm2 b/tests/rm/rm2
index 35fd2f9fd..11b153fee 100755
--- a/tests/rm/rm2
+++ b/tests/rm/rm2
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
mkdir -p a/0 || framework_failure
diff --git a/tests/rm/rm3 b/tests/rm/rm3
index 5b90025b8..b62dec603 100755
--- a/tests/rm/rm3
+++ b/tests/rm/rm3
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
mkdir -p z || framework_failure
diff --git a/tests/rm/rm4 b/tests/rm/rm4
index 0f73b276d..571fdb019 100755
--- a/tests/rm/rm4
+++ b/tests/rm/rm4
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
mkdir dir || framework_failure
diff --git a/tests/rm/rm5 b/tests/rm/rm5
index 311b3ee99..1d27f7cda 100755
--- a/tests/rm/rm5
+++ b/tests/rm/rm5
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
mkdir -p d/e || framework_failure
diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1
index be988e11f..3057ecbbd 100755
--- a/tests/rm/sunos-1
+++ b/tests/rm/sunos-1
@@ -22,12 +22,8 @@
# actually remove files with names of entries in the current directory
# but relative to `/' rather than relative to the current directory.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
rm -r '' > /dev/null 2>&1 && fail=1
diff --git a/tests/rm/unread2 b/tests/rm/unread2
index 5da31756a..69c27474e 100755
--- a/tests/rm/unread2
+++ b/tests/rm/unread2
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
mkdir -p a/b || framework_failure
diff --git a/tests/rm/unread3 b/tests/rm/unread3
index 4627c125f..a2782bbba 100755
--- a/tests/rm/unread3
+++ b/tests/rm/unread3
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
skip_if_root_
mkdir -p a/1 b c d/2 e/3 || framework_failure
diff --git a/tests/rm/v-slash b/tests/rm/v-slash
index e53d9d934..a9ab828bc 100755
--- a/tests/rm/v-slash
+++ b/tests/rm/v-slash
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rm --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rm --version
mkdir a || framework_failure
touch a/x || framework_failure
diff --git a/tests/rmdir/fail-perm b/tests/rmdir/fail-perm
index cadab59ba..8c37f8d90 100755
--- a/tests/rmdir/fail-perm
+++ b/tests/rmdir/fail-perm
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rmdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rmdir --version
mkdir d d/e d/e/f || framework_failure
chmod a-w d || framework_failure
diff --git a/tests/rmdir/ignore b/tests/rmdir/ignore
index 97b51125b..08183607e 100755
--- a/tests/rmdir/ignore
+++ b/tests/rmdir/ignore
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rmdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rmdir --version
cwd=`pwd`
mkdir -p "$cwd/a/b/c" "$cwd/a/x" || framework_failure
diff --git a/tests/rmdir/t-slash b/tests/rmdir/t-slash
index e035c439c..f7d1f0dce 100755
--- a/tests/rmdir/t-slash
+++ b/tests/rmdir/t-slash
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- rmdir --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && rmdir --version
mkdir dir || framework_failure
diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only
index 327c41c6f..32578fe57 100755
--- a/tests/tail-2/append-only
+++ b/tests/tail-2/append-only
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
require_root_
chattr_a_works=1
diff --git a/tests/tail-2/assert b/tests/tail-2/assert
index 08cd88864..1fdb76a77 100755
--- a/tests/tail-2/assert
+++ b/tests/tail-2/assert
@@ -23,12 +23,8 @@
# Aborted
# due to a race condition in which a dev/inode pair is reused.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
# Not "expensive" per se, but sleeping for so long is annoying.
very_expensive_
diff --git a/tests/tail-2/assert-2 b/tests/tail-2/assert-2
index 066d6af2c..fec0525ed 100755
--- a/tests/tail-2/assert-2
+++ b/tests/tail-2/assert-2
@@ -18,12 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
# Not "expensive" per se, but sleeping for so long is annoying.
very_expensive_
diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb
index ec262a946..3496a622f 100755
--- a/tests/tail-2/big-4gb
+++ b/tests/tail-2/big-4gb
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
expensive_
# Create a file of size exactly 4GB (2^32) with 8 bytes
diff --git a/tests/tail-2/flush-initial b/tests/tail-2/flush-initial
index 98de2e1f5..df8810dcc 100755
--- a/tests/tail-2/flush-initial
+++ b/tests/tail-2/flush-initial
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
echo line > in || fail=1
# Output should be buffered since we're writing to file
diff --git a/tests/tail-2/follow-stdin b/tests/tail-2/follow-stdin
index a0e07e6bc..1c50e8b66 100755
--- a/tests/tail-2/follow-stdin
+++ b/tests/tail-2/follow-stdin
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
echo line > exp || framework_failure
echo line > in || framework_failure
diff --git a/tests/tail-2/infloop-1 b/tests/tail-2/infloop-1
index 895b21dca..7e98daf6a 100755
--- a/tests/tail-2/infloop-1
+++ b/tests/tail-2/infloop-1
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
yes > t &
yes_pid=$!
diff --git a/tests/tail-2/inotify-hash-abuse2 b/tests/tail-2/inotify-hash-abuse2
index c0cca2338..f3018a57a 100755
--- a/tests/tail-2/inotify-hash-abuse2
+++ b/tests/tail-2/inotify-hash-abuse2
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
touch f || framework_failure
diff --git a/tests/tail-2/inotify-race b/tests/tail-2/inotify-race
index a6393df56..2deff69ae 100755
--- a/tests/tail-2/inotify-race
+++ b/tests/tail-2/inotify-race
@@ -20,12 +20,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
# Don't run this test by default because sometimes it's skipped as noted below.
# Also gdb has a bug in Debian's gdb-6.8-3 at least that causes it to not
diff --git a/tests/tail-2/pid b/tests/tail-2/pid
index b1286df05..b684a3617 100755
--- a/tests/tail-2/pid
+++ b/tests/tail-2/pid
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
getlimits_
touch empty here || framework_failure
diff --git a/tests/tail-2/pipe-f b/tests/tail-2/pipe-f
index bf38c183c..b6fef16d7 100755
--- a/tests/tail-2/pipe-f
+++ b/tests/tail-2/pipe-f
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
echo foo | timeout 10 tail -f -c3 > out || fail=1
echo oo > exp || fail=1
diff --git a/tests/tail-2/pipe-f2 b/tests/tail-2/pipe-f2
index 83a226520..426f37b50 100755
--- a/tests/tail-2/pipe-f2
+++ b/tests/tail-2/pipe-f2
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
mkfifo_or_skip_ fifo
diff --git a/tests/tail-2/proc-ksyms b/tests/tail-2/proc-ksyms
index 21e275291..3e63bfed8 100755
--- a/tests/tail-2/proc-ksyms
+++ b/tests/tail-2/proc-ksyms
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
ksyms=/proc/ksyms
diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle
index b98c86863..404562d88 100755
--- a/tests/tail-2/start-middle
+++ b/tests/tail-2/start-middle
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
(echo 1; echo 2) > k || framework_failure
diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f
index 6a9b59c37..d7badd74f 100755
--- a/tests/tail-2/tail-n0f
+++ b/tests/tail-2/tail-n0f
@@ -21,12 +21,8 @@
# It skips the test if your system lacks a /proc/$pid/status
# file, or if its contents don't look right.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
require_proc_pid_status_
diff --git a/tests/tail-2/wait b/tests/tail-2/wait
index a9636910e..36cfa0e8c 100755
--- a/tests/tail-2/wait
+++ b/tests/tail-2/wait
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- tail --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tail --version
touch here || framework_failure
{ touch unreadable && chmod a-r unreadable; } || framework_failure
diff --git a/tests/touch/60-seconds b/tests/touch/60-seconds
index e06c770f2..e50c25765 100755
--- a/tests/touch/60-seconds
+++ b/tests/touch/60-seconds
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
echo 60.000000000 > exp || framework_failure
diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink
index 6847e460b..55466c439 100755
--- a/tests/touch/dangling-symlink
+++ b/tests/touch/dangling-symlink
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
rm -f touch-target t-symlink
ln -s touch-target t-symlink
diff --git a/tests/touch/dir-1 b/tests/touch/dir-1
index ef1543e26..2d61bb58f 100755
--- a/tests/touch/dir-1
+++ b/tests/touch/dir-1
@@ -2,12 +2,8 @@
# Make sure touch can operate on a directory.
# This was broken in the 4.0[efg] test releases.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
touch . || fail=1
Exit $fail
diff --git a/tests/touch/empty-file b/tests/touch/empty-file
index e279138b2..e93bf0ac0 100755
--- a/tests/touch/empty-file
+++ b/tests/touch/empty-file
@@ -21,12 +21,8 @@
# 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.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
DEFAULT_SLEEP_SECONDS=2
SLEEP_SECONDS=${SLEEP_SECONDS=$DEFAULT_SLEEP_SECONDS}
diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag
index 1b7acbc87..a957a8fdb 100755
--- a/tests/touch/fail-diag
+++ b/tests/touch/fail-diag
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
skip_if_root_
d1=no-$$
diff --git a/tests/touch/fifo b/tests/touch/fifo
index bf117d9ed..e6743d166 100755
--- a/tests/touch/fifo
+++ b/tests/touch/fifo
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
mkfifo_or_skip_ fifo
diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing
index 7c47c6184..96aa09232 100755
--- a/tests/touch/no-create-missing
+++ b/tests/touch/no-create-missing
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
touch -c no-file > /dev/null 2>&1 || fail=1
diff --git a/tests/touch/no-dereference b/tests/touch/no-dereference
index 8d80fa5f5..95002e567 100755
--- a/tests/touch/no-dereference
+++ b/tests/touch/no-dereference
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
ln -s nowhere dangling || framework_failure
touch file || framework_failure
diff --git a/tests/touch/no-rights b/tests/touch/no-rights
index f0805e75d..d2032550b 100755
--- a/tests/touch/no-rights
+++ b/tests/touch/no-rights
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
# Make sure t2 is newer than t1.
touch -d '2000-01-01 00:00' t1 || framework_failure
diff --git a/tests/touch/not-owner b/tests/touch/not-owner
index 68eef1fa9..9645f4dbd 100755
--- a/tests/touch/not-owner
+++ b/tests/touch/not-owner
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
if env -- test -w /; then
skip_test_ you have write access to /.
diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other
index b59f0d3bd..c7215022c 100755
--- a/tests/touch/now-owned-by-other
+++ b/tests/touch/now-owned-by-other
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
require_root_
group_num=$(id -g $NON_ROOT_USERNAME)
diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent
index 3c0925b0f..9821fc1e4 100755
--- a/tests/touch/obsolescent
+++ b/tests/touch/obsolescent
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
_POSIX2_VERSION=199209; export _POSIX2_VERSION
POSIXLY_CORRECT=1; export POSIXLY_CORRECT
diff --git a/tests/touch/read-only b/tests/touch/read-only
index 06135c7b8..265f2880b 100755
--- a/tests/touch/read-only
+++ b/tests/touch/read-only
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
skip_if_root_
: > read-only || framework_failure
diff --git a/tests/touch/relative b/tests/touch/relative
index b9f8c2c92..7e56a305a 100755
--- a/tests/touch/relative
+++ b/tests/touch/relative
@@ -17,12 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure
diff --git a/tests/touch/trailing-slash b/tests/touch/trailing-slash
index c1fb8833e..97b910018 100755
--- a/tests/touch/trailing-slash
+++ b/tests/touch/trailing-slash
@@ -16,12 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- touch --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && touch --version
ln -s nowhere dangling || framework_failure
ln -s loop loop || framework_failure