From e130ce53ce87f39f4bee3288d106c681e82dbb86 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 16 Feb 2014 23:54:14 +0000 Subject: tests: avoid executing dirname(1) command Bash parameter expansion does the same thing. Signed-off-by: Sami Kerola --- tests/functions.sh | 2 +- tests/run.sh | 2 +- tests/ts/bitops/swapbytes | 2 +- tests/ts/blkid/low-probe | 2 +- tests/ts/blkid/lowprobe-pt | 2 +- tests/ts/blkid/md-raid0-whole | 2 +- tests/ts/blkid/md-raid1-part | 2 +- tests/ts/blkid/md-raid1-whole | 2 +- tests/ts/build-sys/config | 2 +- tests/ts/cal/1m | 2 +- tests/ts/cal/1mw | 2 +- tests/ts/cal/3m | 2 +- tests/ts/cal/3mw | 2 +- tests/ts/cal/bigyear | 2 +- tests/ts/cal/bigyearw | 2 +- tests/ts/cal/color | 2 +- tests/ts/cal/colorw | 2 +- tests/ts/cal/sep1752 | 2 +- tests/ts/cal/sep1752w | 2 +- tests/ts/cal/weekarg | 2 +- tests/ts/cal/weeknum | 2 +- tests/ts/cal/year | 2 +- tests/ts/cal/yearw | 2 +- tests/ts/col/multibyte | 2 +- tests/ts/colrm/rm2-2 | 2 +- tests/ts/column/fillrow | 2 +- tests/ts/column/multi-file | 2 +- tests/ts/column/separator_table | 2 +- tests/ts/cramfs/doubles | 2 +- tests/ts/cramfs/fsck-endianness | 2 +- tests/ts/cramfs/mkfs | 2 +- tests/ts/cramfs/mkfs-endianness | 2 +- tests/ts/dmesg/console-levels | 2 +- tests/ts/dmesg/decode | 2 +- tests/ts/dmesg/delta | 2 +- tests/ts/dmesg/facilities | 2 +- tests/ts/eject/umount | 2 +- tests/ts/fdisk/align-512-4K | 2 +- tests/ts/fdisk/align-512-4K-63 | 2 +- tests/ts/fdisk/align-512-4K-md | 2 +- tests/ts/fdisk/align-512-512 | 2 +- tests/ts/fdisk/align-512-512-topology | 2 +- tests/ts/fdisk/bsd | 2 +- tests/ts/fdisk/gpt | 2 +- tests/ts/fdisk/id | 2 +- tests/ts/fdisk/mbr-dos-mode | 2 +- tests/ts/fdisk/mbr-nondos-mode | 2 +- tests/ts/fdisk/oddinput | 2 +- tests/ts/fdisk/sunlabel | 2 +- tests/ts/fsck/ismounted | 2 +- tests/ts/hexdump/format-strings | 2 +- tests/ts/hexdump/highlighting | 2 +- tests/ts/hwclock/systohc | 2 +- tests/ts/ipcs/headers | 2 +- tests/ts/ipcs/limits | 2 +- tests/ts/ipcs/limits2 | 2 +- tests/ts/ipcs/mk-rm-msg | 2 +- tests/ts/ipcs/mk-rm-sem | 2 +- tests/ts/ipcs/mk-rm-shm | 2 +- tests/ts/isosize/print-size | 2 +- tests/ts/last/ipv6 | 2 +- tests/ts/last/last | 2 +- tests/ts/libmount/context | 2 +- tests/ts/libmount/context-py | 2 +- tests/ts/libmount/context-utab | 2 +- tests/ts/libmount/context-utab-py | 2 +- tests/ts/libmount/lock | 2 +- tests/ts/libmount/optstr | 2 +- tests/ts/libmount/tabdiff | 2 +- tests/ts/libmount/tabfiles | 2 +- tests/ts/libmount/tabfiles-py | 2 +- tests/ts/libmount/tabfiles-tags | 2 +- tests/ts/libmount/tabfiles-tags-py | 2 +- tests/ts/libmount/update | 2 +- tests/ts/libmount/update-py | 2 +- tests/ts/libmount/utils | 2 +- tests/ts/login/islocal | 2 +- tests/ts/login/logindefs | 2 +- tests/ts/look/separator | 2 +- tests/ts/losetup/losetup | 2 +- tests/ts/lscpu/lscpu | 2 +- tests/ts/md5/md5 | 2 +- tests/ts/minix/fsck | 2 +- tests/ts/minix/mkfs | 2 +- tests/ts/misc/fallocate | 2 +- tests/ts/misc/getopt | 2 +- tests/ts/misc/ionice | 2 +- tests/ts/misc/line | 2 +- tests/ts/misc/mcookie | 2 +- tests/ts/misc/rev | 2 +- tests/ts/misc/setarch | 2 +- tests/ts/misc/setsid | 2 +- tests/ts/misc/strtosize | 2 +- tests/ts/misc/ul | 2 +- tests/ts/misc/whereis | 2 +- tests/ts/more/regexp | 2 +- tests/ts/more/squeeze | 2 +- tests/ts/mount/devname | 2 +- tests/ts/mount/fstab-broken | 2 +- tests/ts/mount/fstab-devname | 2 +- tests/ts/mount/fstab-devname2label | 2 +- tests/ts/mount/fstab-devname2uuid | 2 +- tests/ts/mount/fstab-label | 2 +- tests/ts/mount/fstab-label2devname | 2 +- tests/ts/mount/fstab-label2uuid | 2 +- tests/ts/mount/fstab-none | 2 +- tests/ts/mount/fstab-symlink | 2 +- tests/ts/mount/fstab-uuid | 2 +- tests/ts/mount/fstab-uuid2devname | 2 +- tests/ts/mount/fstab-uuid2label | 2 +- tests/ts/mount/label | 2 +- tests/ts/mount/move | 2 +- tests/ts/mount/noncanonical | 2 +- tests/ts/mount/paths | 2 +- tests/ts/mount/regfile | 2 +- tests/ts/mount/remount | 2 +- tests/ts/mount/rlimit | 2 +- tests/ts/mount/shared-subtree | 2 +- tests/ts/mount/special | 2 +- tests/ts/mount/umount-alltargets | 2 +- tests/ts/mount/umount-recursive | 2 +- tests/ts/mount/uuid | 2 +- tests/ts/namei/logic | 2 +- tests/ts/partx/partx | 2 +- tests/ts/paths/built-in | 2 +- tests/ts/schedutils/cpuset | 2 +- tests/ts/script/race | 2 +- tests/ts/swapon/devname | 2 +- tests/ts/swapon/fixpgsz | 2 +- tests/ts/swapon/fixsig | 2 +- tests/ts/swapon/label | 2 +- tests/ts/swapon/uuid | 2 +- tests/ts/tailf/simple | 2 +- tests/ts/utmpdump/ipv6tobin | 2 +- tests/ts/utmpdump/ipv6totxt | 2 +- tests/ts/utmpdump/to-binary | 2 +- tests/ts/utmpdump/to-text | 2 +- tests/ts/wipefs/wipefs | 2 +- 138 files changed, 138 insertions(+), 138 deletions(-) diff --git a/tests/functions.sh b/tests/functions.sh index f210204e2..c802136e2 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -117,7 +117,7 @@ function ts_init_core_subtest_env { } function ts_init_env { - local mydir=$(ts_abspath $(dirname $0)) + local mydir=$(ts_abspath ${0%/*}) LANG="POSIX" LANGUAGE="POSIX" diff --git a/tests/run.sh b/tests/run.sh index 474c21cb3..8a7924ae1 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR=$(cd $(dirname $0) && pwd) +TS_TOPDIR=$(cd ${0%/*} && pwd) SUBTESTS= OPTS= diff --git a/tests/ts/bitops/swapbytes b/tests/ts/bitops/swapbytes index 62e380c40..6b843f85e 100755 --- a/tests/ts/bitops/swapbytes +++ b/tests/ts/bitops/swapbytes @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="swap bytes" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/blkid/low-probe b/tests/ts/blkid/low-probe index 0ecc664c3..e22d6c849 100755 --- a/tests/ts/blkid/low-probe +++ b/tests/ts/blkid/low-probe @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="low-level superblocks probing" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/blkid/lowprobe-pt b/tests/ts/blkid/lowprobe-pt index b88dd6003..8def673f9 100755 --- a/tests/ts/blkid/lowprobe-pt +++ b/tests/ts/blkid/lowprobe-pt @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="partitions probing" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/blkid/md-raid0-whole b/tests/ts/blkid/md-raid0-whole index bf95f77f5..07ffc584a 100755 --- a/tests/ts/blkid/md-raid0-whole +++ b/tests/ts/blkid/md-raid0-whole @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="MD raid0 (whole-disks)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/blkid/md-raid1-part b/tests/ts/blkid/md-raid1-part index 30900eae6..43140728c 100755 --- a/tests/ts/blkid/md-raid1-part +++ b/tests/ts/blkid/md-raid1-part @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="MD raid1 (last partition)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/blkid/md-raid1-whole b/tests/ts/blkid/md-raid1-whole index fe419017e..8743d3d66 100755 --- a/tests/ts/blkid/md-raid1-whole +++ b/tests/ts/blkid/md-raid1-whole @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="MD raid1 (whole-disks)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/build-sys/config b/tests/ts/build-sys/config index 508bdee85..308c34b2d 100755 --- a/tests/ts/build-sys/config +++ b/tests/ts/build-sys/config @@ -2,7 +2,7 @@ # Copyright (C) 2011 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="config" # Don't execute this test by default, --force required diff --git a/tests/ts/cal/1m b/tests/ts/cal/1m index cf7709536..ddb0129aa 100755 --- a/tests/ts/cal/1m +++ b/tests/ts/cal/1m @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="1 month" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/1mw b/tests/ts/cal/1mw index 2997f14ce..c258564a4 100755 --- a/tests/ts/cal/1mw +++ b/tests/ts/cal/1mw @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="1 month with week numbers" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/3m b/tests/ts/cal/3m index dc6de1e9f..64e7c4e38 100755 --- a/tests/ts/cal/3m +++ b/tests/ts/cal/3m @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="3 months" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/3mw b/tests/ts/cal/3mw index d3b122811..934cfdc0a 100755 --- a/tests/ts/cal/3mw +++ b/tests/ts/cal/3mw @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="3 months with week numbers" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/bigyear b/tests/ts/cal/bigyear index e1f4a85f4..a01a9defc 100755 --- a/tests/ts/cal/bigyear +++ b/tests/ts/cal/bigyear @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="Year 2147483646" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/bigyearw b/tests/ts/cal/bigyearw index 6fddb0bb8..a0220bfe3 100755 --- a/tests/ts/cal/bigyearw +++ b/tests/ts/cal/bigyearw @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="Year 2147483646 with week numbers" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/color b/tests/ts/cal/color index 12a48b3bf..67883a2eb 100755 --- a/tests/ts/cal/color +++ b/tests/ts/cal/color @@ -14,7 +14,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="color" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/colorw b/tests/ts/cal/colorw index b08656e45..8b43461d5 100755 --- a/tests/ts/cal/colorw +++ b/tests/ts/cal/colorw @@ -14,7 +14,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="color with week numbers" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/sep1752 b/tests/ts/cal/sep1752 index df86b7317..4e7fafc49 100755 --- a/tests/ts/cal/sep1752 +++ b/tests/ts/cal/sep1752 @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="September 1752" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/sep1752w b/tests/ts/cal/sep1752w index 293df39ed..bc792143c 100755 --- a/tests/ts/cal/sep1752w +++ b/tests/ts/cal/sep1752w @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="September 1752 with week numbers" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/weekarg b/tests/ts/cal/weekarg index 507b564c9..dc500ac19 100755 --- a/tests/ts/cal/weekarg +++ b/tests/ts/cal/weekarg @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="week number given as argument" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/weeknum b/tests/ts/cal/weeknum index e25b71b95..a3de709c9 100755 --- a/tests/ts/cal/weeknum +++ b/tests/ts/cal/weeknum @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="week number corner cases" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/year b/tests/ts/cal/year index 78b3546ef..f6b7cc7d2 100755 --- a/tests/ts/cal/year +++ b/tests/ts/cal/year @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="year" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cal/yearw b/tests/ts/cal/yearw index 9c7259013..9dd673cb7 100755 --- a/tests/ts/cal/yearw +++ b/tests/ts/cal/yearw @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="year with week numbers" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/col/multibyte b/tests/ts/col/multibyte index 70010290e..5769dd840 100755 --- a/tests/ts/col/multibyte +++ b/tests/ts/col/multibyte @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="multibyte input" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/colrm/rm2-2 b/tests/ts/colrm/rm2-2 index a8419cbad..d44e60e2d 100755 --- a/tests/ts/colrm/rm2-2 +++ b/tests/ts/colrm/rm2-2 @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="basic check" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/column/fillrow b/tests/ts/column/fillrow index 172e8587f..71c40da37 100755 --- a/tests/ts/column/fillrow +++ b/tests/ts/column/fillrow @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="fill row" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/column/multi-file b/tests/ts/column/multi-file index 654a1da7d..6264bb23d 100755 --- a/tests/ts/column/multi-file +++ b/tests/ts/column/multi-file @@ -16,7 +16,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="multiple files" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/column/separator_table b/tests/ts/column/separator_table index fe6f83c0a..9d39090bd 100755 --- a/tests/ts/column/separator_table +++ b/tests/ts/column/separator_table @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="separator & table" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cramfs/doubles b/tests/ts/cramfs/doubles index ed4e4aa72..3053ab5af 100755 --- a/tests/ts/cramfs/doubles +++ b/tests/ts/cramfs/doubles @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="mkfs doubles" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cramfs/fsck-endianness b/tests/ts/cramfs/fsck-endianness index 6a98c9e00..200445eb0 100755 --- a/tests/ts/cramfs/fsck-endianness +++ b/tests/ts/cramfs/fsck-endianness @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="fsck endianness" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cramfs/mkfs b/tests/ts/cramfs/mkfs index 5facfe9a5..bc9375dc0 100755 --- a/tests/ts/cramfs/mkfs +++ b/tests/ts/cramfs/mkfs @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="mkfs checksums" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/cramfs/mkfs-endianness b/tests/ts/cramfs/mkfs-endianness index 68237c0ed..147cb9c8e 100755 --- a/tests/ts/cramfs/mkfs-endianness +++ b/tests/ts/cramfs/mkfs-endianness @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="mkfs endianness" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/dmesg/console-levels b/tests/ts/dmesg/console-levels index b87d3fd83..7f21d9ab4 100755 --- a/tests/ts/dmesg/console-levels +++ b/tests/ts/dmesg/console-levels @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="levels" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/dmesg/decode b/tests/ts/dmesg/decode index a1afa6fdf..0519a0200 100755 --- a/tests/ts/dmesg/decode +++ b/tests/ts/dmesg/decode @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="decode" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/dmesg/delta b/tests/ts/dmesg/delta index 774ffb12f..2ad247746 100755 --- a/tests/ts/dmesg/delta +++ b/tests/ts/dmesg/delta @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="delta" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/dmesg/facilities b/tests/ts/dmesg/facilities index 1b7b0d4c9..e503c1a13 100755 --- a/tests/ts/dmesg/facilities +++ b/tests/ts/dmesg/facilities @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="facilities" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/eject/umount b/tests/ts/eject/umount index 3c1f84edf..b7ea688a8 100755 --- a/tests/ts/eject/umount +++ b/tests/ts/eject/umount @@ -1,6 +1,6 @@ #!/bin/bash -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="umount" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/align-512-4K b/tests/ts/fdisk/align-512-4K index c5ea72e7a..2b247f802 100755 --- a/tests/ts/fdisk/align-512-4K +++ b/tests/ts/fdisk/align-512-4K @@ -20,7 +20,7 @@ # I/O size (32KiB) # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="align 512/4K" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/align-512-4K-63 b/tests/ts/fdisk/align-512-4K-63 index 4ec81982f..6190ae152 100755 --- a/tests/ts/fdisk/align-512-4K-63 +++ b/tests/ts/fdisk/align-512-4K-63 @@ -20,7 +20,7 @@ # I/O size (32KiB) # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="align 512/4K +alignment_offset" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/align-512-4K-md b/tests/ts/fdisk/align-512-4K-md index ad5568a04..be078357f 100755 --- a/tests/ts/fdisk/align-512-4K-md +++ b/tests/ts/fdisk/align-512-4K-md @@ -20,7 +20,7 @@ # I/O size (32KiB) # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="align 512/4K +MD" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/align-512-512 b/tests/ts/fdisk/align-512-512 index 03133a6d1..afcb612ef 100755 --- a/tests/ts/fdisk/align-512-512 +++ b/tests/ts/fdisk/align-512-512 @@ -19,7 +19,7 @@ # topology. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="align 512/512" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/align-512-512-topology b/tests/ts/fdisk/align-512-512-topology index 9354e45c7..8cc300929 100755 --- a/tests/ts/fdisk/align-512-512-topology +++ b/tests/ts/fdisk/align-512-512-topology @@ -20,7 +20,7 @@ # I/O size (32KiB) # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="align 512/512 +topology" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/bsd b/tests/ts/fdisk/bsd index 288388d8e..23ac0537e 100755 --- a/tests/ts/fdisk/bsd +++ b/tests/ts/fdisk/bsd @@ -16,7 +16,7 @@ # # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="nested BSD" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/gpt b/tests/ts/fdisk/gpt index 25079070e..75bd006e7 100755 --- a/tests/ts/fdisk/gpt +++ b/tests/ts/fdisk/gpt @@ -16,7 +16,7 @@ # # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="GPT" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/id b/tests/ts/fdisk/id index 2c76f428f..866cf6ecf 100755 --- a/tests/ts/fdisk/id +++ b/tests/ts/fdisk/id @@ -14,7 +14,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="MBR - id" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/mbr-dos-mode b/tests/ts/fdisk/mbr-dos-mode index b16e95c13..45b315b64 100755 --- a/tests/ts/fdisk/mbr-dos-mode +++ b/tests/ts/fdisk/mbr-dos-mode @@ -16,7 +16,7 @@ # # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="MBR - dos mode" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/mbr-nondos-mode b/tests/ts/fdisk/mbr-nondos-mode index 88a80e636..878c1190b 100755 --- a/tests/ts/fdisk/mbr-nondos-mode +++ b/tests/ts/fdisk/mbr-nondos-mode @@ -14,7 +14,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="MBR - non-dos mode" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/oddinput b/tests/ts/fdisk/oddinput index 5b9bb3108..2120ce7c8 100755 --- a/tests/ts/fdisk/oddinput +++ b/tests/ts/fdisk/oddinput @@ -14,7 +14,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="invalid input tests" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fdisk/sunlabel b/tests/ts/fdisk/sunlabel index f610ad8f5..b31ec4f5a 100755 --- a/tests/ts/fdisk/sunlabel +++ b/tests/ts/fdisk/sunlabel @@ -14,7 +14,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="sunlabel tests" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/fsck/ismounted b/tests/ts/fsck/ismounted index 6b7f0f7bc..6c64390ff 100755 --- a/tests/ts/fsck/ismounted +++ b/tests/ts/fsck/ismounted @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="is mounted" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/hexdump/format-strings b/tests/ts/hexdump/format-strings index 9b6745c7f..8716197cd 100755 --- a/tests/ts/hexdump/format-strings +++ b/tests/ts/hexdump/format-strings @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="format-strings" FILES="$TS_TOPDIR/ts/hexdump/files" #sample input consists of hexdump-ed results of the following py3script: diff --git a/tests/ts/hexdump/highlighting b/tests/ts/hexdump/highlighting index 8a0aa1d9c..f3b8c8172 100755 --- a/tests/ts/hexdump/highlighting +++ b/tests/ts/hexdump/highlighting @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="highlighting" FILES="$TS_TOPDIR/ts/hexdump/files" OPTS="--color=always" diff --git a/tests/ts/hwclock/systohc b/tests/ts/hwclock/systohc index 401ee937e..8dc56b779 100755 --- a/tests/ts/hwclock/systohc +++ b/tests/ts/hwclock/systohc @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="system to hw" NTP_SERVER="0.fedora.pool.ntp.org" diff --git a/tests/ts/ipcs/headers b/tests/ts/ipcs/headers index 99b82a383..52e108c23 100755 --- a/tests/ts/ipcs/headers +++ b/tests/ts/ipcs/headers @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="headers" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/ipcs/limits b/tests/ts/ipcs/limits index b44adb1c1..9e164e526 100755 --- a/tests/ts/ipcs/limits +++ b/tests/ts/ipcs/limits @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="limits overflow" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/ipcs/limits2 b/tests/ts/ipcs/limits2 index f99a35448..39f26d708 100755 --- a/tests/ts/ipcs/limits2 +++ b/tests/ts/ipcs/limits2 @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="basic limits" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/ipcs/mk-rm-msg b/tests/ts/ipcs/mk-rm-msg index 529d86142..5bea09bed 100755 --- a/tests/ts/ipcs/mk-rm-msg +++ b/tests/ts/ipcs/mk-rm-msg @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="mk-rm-msg" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/ipcs/mk-rm-sem b/tests/ts/ipcs/mk-rm-sem index 2eb149d5f..816d306d4 100755 --- a/tests/ts/ipcs/mk-rm-sem +++ b/tests/ts/ipcs/mk-rm-sem @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="mk-rm-sem" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/ipcs/mk-rm-shm b/tests/ts/ipcs/mk-rm-shm index f2bc33ec5..8aa604df9 100755 --- a/tests/ts/ipcs/mk-rm-shm +++ b/tests/ts/ipcs/mk-rm-shm @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="mk-rm-shm" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/isosize/print-size b/tests/ts/isosize/print-size index cd260a0c8..3c7325b71 100755 --- a/tests/ts/isosize/print-size +++ b/tests/ts/isosize/print-size @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="print-size" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/last/ipv6 b/tests/ts/last/ipv6 index 60b72bd4b..138cf4570 100755 --- a/tests/ts/last/ipv6 +++ b/tests/ts/last/ipv6 @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="last ipv6" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/last/last b/tests/ts/last/last index 83b7f8d08..fa263506c 100755 --- a/tests/ts/last/last +++ b/tests/ts/last/last @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="last" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/context b/tests/ts/libmount/context index 0c3bce986..7d06a28f0 100755 --- a/tests/ts/libmount/context +++ b/tests/ts/libmount/context @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="context" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/context-py b/tests/ts/libmount/context-py index 4be19dde6..9535171ba 100755 --- a/tests/ts/libmount/context-py +++ b/tests/ts/libmount/context-py @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="context-py" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/context-utab b/tests/ts/libmount/context-utab index b3aaff99f..9c1487e87 100755 --- a/tests/ts/libmount/context-utab +++ b/tests/ts/libmount/context-utab @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="context (utab)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/context-utab-py b/tests/ts/libmount/context-utab-py index ed379d4a6..c36d8acae 100755 --- a/tests/ts/libmount/context-utab-py +++ b/tests/ts/libmount/context-utab-py @@ -1,7 +1,7 @@ #!/bin/bash # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="context-py (utab)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/lock b/tests/ts/libmount/lock index 5c8bcb645..26f001544 100755 --- a/tests/ts/libmount/lock +++ b/tests/ts/libmount/lock @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="lock" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/optstr b/tests/ts/libmount/optstr index f6a5c0530..7de299dbe 100755 --- a/tests/ts/libmount/optstr +++ b/tests/ts/libmount/optstr @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="options string" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/tabdiff b/tests/ts/libmount/tabdiff index c988258c2..80753ea2a 100755 --- a/tests/ts/libmount/tabdiff +++ b/tests/ts/libmount/tabdiff @@ -2,7 +2,7 @@ # Copyright (C) 2011 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="table diffs" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/tabfiles b/tests/ts/libmount/tabfiles index c6fa360b3..a60c03894 100755 --- a/tests/ts/libmount/tabfiles +++ b/tests/ts/libmount/tabfiles @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="tab files" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/tabfiles-py b/tests/ts/libmount/tabfiles-py index b89fb5bc9..89e4da249 100755 --- a/tests/ts/libmount/tabfiles-py +++ b/tests/ts/libmount/tabfiles-py @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="tab files-py" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/tabfiles-tags b/tests/ts/libmount/tabfiles-tags index f52c4047c..318ccf05c 100755 --- a/tests/ts/libmount/tabfiles-tags +++ b/tests/ts/libmount/tabfiles-tags @@ -1,6 +1,6 @@ #!/bin/bash -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="tags" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/tabfiles-tags-py b/tests/ts/libmount/tabfiles-tags-py index 05c2c2076..237a6d827 100755 --- a/tests/ts/libmount/tabfiles-tags-py +++ b/tests/ts/libmount/tabfiles-tags-py @@ -1,6 +1,6 @@ #!/bin/bash -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="tags-py" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/update b/tests/ts/libmount/update index 6d4bce81c..89279ba26 100755 --- a/tests/ts/libmount/update +++ b/tests/ts/libmount/update @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="tab update" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/update-py b/tests/ts/libmount/update-py index e49d33ef0..da14b9bae 100755 --- a/tests/ts/libmount/update-py +++ b/tests/ts/libmount/update-py @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="tab update-py" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/libmount/utils b/tests/ts/libmount/utils index 6facaad10..211f015a9 100755 --- a/tests/ts/libmount/utils +++ b/tests/ts/libmount/utils @@ -2,7 +2,7 @@ # Copyright (C) 2010 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="utils" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/login/islocal b/tests/ts/login/islocal index c25da6a07..a1a7a3b60 100755 --- a/tests/ts/login/islocal +++ b/tests/ts/login/islocal @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="islocal" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/login/logindefs b/tests/ts/login/logindefs index 10caed752..0b3b9a44c 100755 --- a/tests/ts/login/logindefs +++ b/tests/ts/login/logindefs @@ -4,7 +4,7 @@ # # This file is part of util-linux. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="defs" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/look/separator b/tests/ts/look/separator index 51e96c9e7..967dec401 100755 --- a/tests/ts/look/separator +++ b/tests/ts/look/separator @@ -28,7 +28,7 @@ # uniq > words # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="separator" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/losetup/losetup b/tests/ts/losetup/losetup index 29d4b4201..64eb03888 100755 --- a/tests/ts/losetup/losetup +++ b/tests/ts/losetup/losetup @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="losetup" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/lscpu/lscpu b/tests/ts/lscpu/lscpu index a7d7a952b..2b8747165 100755 --- a/tests/ts/lscpu/lscpu +++ b/tests/ts/lscpu/lscpu @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." . $TS_TOPDIR/functions.sh ts_init "$*" diff --git a/tests/ts/md5/md5 b/tests/ts/md5/md5 index e94fb6360..6fe3f147e 100755 --- a/tests/ts/md5/md5 +++ b/tests/ts/md5/md5 @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." . $TS_TOPDIR/functions.sh ts_init "$*" diff --git a/tests/ts/minix/fsck b/tests/ts/minix/fsck index f635fc1b4..2b290b0f8 100755 --- a/tests/ts/minix/fsck +++ b/tests/ts/minix/fsck @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="mkfs checksums" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/minix/mkfs b/tests/ts/minix/mkfs index 39185ad81..00d5a863d 100755 --- a/tests/ts/minix/mkfs +++ b/tests/ts/minix/mkfs @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="mkfs" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/fallocate b/tests/ts/misc/fallocate index 735baab0f..b39794a1f 100755 --- a/tests/ts/misc/fallocate +++ b/tests/ts/misc/fallocate @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="fallocate" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/getopt b/tests/ts/misc/getopt index a6b91cb53..082e41170 100755 --- a/tests/ts/misc/getopt +++ b/tests/ts/misc/getopt @@ -15,7 +15,7 @@ # This test script is modified version of 'getopt-parse.bash' example # file in misc/ directory. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="getopt" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/ionice b/tests/ts/misc/ionice index d0cca8e8f..29f4d6164 100755 --- a/tests/ts/misc/ionice +++ b/tests/ts/misc/ionice @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="ionice" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/line b/tests/ts/misc/line index 3863a3f89..2acf2d217 100755 --- a/tests/ts/misc/line +++ b/tests/ts/misc/line @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="line" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/mcookie b/tests/ts/misc/mcookie index 9e650b26b..c5051bcea 100755 --- a/tests/ts/misc/mcookie +++ b/tests/ts/misc/mcookie @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="mcookie" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/rev b/tests/ts/misc/rev index 035ce8230..5b95f289a 100755 --- a/tests/ts/misc/rev +++ b/tests/ts/misc/rev @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="rev" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/setarch b/tests/ts/misc/setarch index 805055688..62e00707c 100755 --- a/tests/ts/misc/setarch +++ b/tests/ts/misc/setarch @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="setarch" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/setsid b/tests/ts/misc/setsid index 43a76f9b5..a758c1273 100755 --- a/tests/ts/misc/setsid +++ b/tests/ts/misc/setsid @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="setsid" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/strtosize b/tests/ts/misc/strtosize index 7fb2ff996..4b08b5e56 100755 --- a/tests/ts/misc/strtosize +++ b/tests/ts/misc/strtosize @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="strtosize" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/ul b/tests/ts/misc/ul index bc0ecf74f..974a7f25e 100755 --- a/tests/ts/misc/ul +++ b/tests/ts/misc/ul @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="ul" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/misc/whereis b/tests/ts/misc/whereis index 853b27a65..98441193b 100755 --- a/tests/ts/misc/whereis +++ b/tests/ts/misc/whereis @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="whereis" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/more/regexp b/tests/ts/more/regexp index 06a00a290..947f55624 100755 --- a/tests/ts/more/regexp +++ b/tests/ts/more/regexp @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="regexp" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/more/squeeze b/tests/ts/more/squeeze index d448fc15f..16b537e3a 100755 --- a/tests/ts/more/squeeze +++ b/tests/ts/more/squeeze @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="squeeze" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/devname b/tests/ts/mount/devname index 8f32ef1ae..016a16e0e 100755 --- a/tests/ts/mount/devname +++ b/tests/ts/mount/devname @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by devname" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/fstab-broken b/tests/ts/mount/fstab-broken index 48fe1a18d..522453503 100755 --- a/tests/ts/mount/fstab-broken +++ b/tests/ts/mount/fstab-broken @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="broken fstab" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/fstab-devname b/tests/ts/mount/fstab-devname index 9af8db648..9cf73e008 100755 --- a/tests/ts/mount/fstab-devname +++ b/tests/ts/mount/fstab-devname @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by devname (fstab)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/fstab-devname2label b/tests/ts/mount/fstab-devname2label index 34214dbcb..63e8126f9 100755 --- a/tests/ts/mount/fstab-devname2label +++ b/tests/ts/mount/fstab-devname2label @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by devname (fstab label)" LABEL="testMountD2L" diff --git a/tests/ts/mount/fstab-devname2uuid b/tests/ts/mount/fstab-devname2uuid index 859bcda47..8cdf946e5 100755 --- a/tests/ts/mount/fstab-devname2uuid +++ b/tests/ts/mount/fstab-devname2uuid @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by devname (fstab uuid)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/fstab-label b/tests/ts/mount/fstab-label index 2c1e7eb5d..5e8a97a0f 100755 --- a/tests/ts/mount/fstab-label +++ b/tests/ts/mount/fstab-label @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by label (fstab)" LABEL="testFstabLabel" diff --git a/tests/ts/mount/fstab-label2devname b/tests/ts/mount/fstab-label2devname index 0d10f1b89..1bb8d042c 100755 --- a/tests/ts/mount/fstab-label2devname +++ b/tests/ts/mount/fstab-label2devname @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by label (fstab devname)" LABEL="testMountL2D" diff --git a/tests/ts/mount/fstab-label2uuid b/tests/ts/mount/fstab-label2uuid index 0ad4f050b..ba63a38ea 100755 --- a/tests/ts/mount/fstab-label2uuid +++ b/tests/ts/mount/fstab-label2uuid @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by label (fstab uuid)" LABEL="testMountL2U" diff --git a/tests/ts/mount/fstab-none b/tests/ts/mount/fstab-none index 62a89ca44..1a8fa78e4 100755 --- a/tests/ts/mount/fstab-none +++ b/tests/ts/mount/fstab-none @@ -1,6 +1,6 @@ #!/bin/bash -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="none" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/fstab-symlink b/tests/ts/mount/fstab-symlink index 7f9d91f7b..c8d5eec72 100755 --- a/tests/ts/mount/fstab-symlink +++ b/tests/ts/mount/fstab-symlink @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by devname (fstab symlink)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/fstab-uuid b/tests/ts/mount/fstab-uuid index 8c65b4d9e..a0394a4ff 100755 --- a/tests/ts/mount/fstab-uuid +++ b/tests/ts/mount/fstab-uuid @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by uuid (fstab)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/fstab-uuid2devname b/tests/ts/mount/fstab-uuid2devname index 51bac141a..572291146 100755 --- a/tests/ts/mount/fstab-uuid2devname +++ b/tests/ts/mount/fstab-uuid2devname @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by uuid (fstab devname)" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/fstab-uuid2label b/tests/ts/mount/fstab-uuid2label index 442cdb7e3..098f43bad 100755 --- a/tests/ts/mount/fstab-uuid2label +++ b/tests/ts/mount/fstab-uuid2label @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by uuid (fstab label)" LABEL="testMountU2L" diff --git a/tests/ts/mount/label b/tests/ts/mount/label index 873ea95a5..2dda82530 100755 --- a/tests/ts/mount/label +++ b/tests/ts/mount/label @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by label" LABEL="testMountLabel" diff --git a/tests/ts/mount/move b/tests/ts/mount/move index ea376856a..dc130d484 100755 --- a/tests/ts/mount/move +++ b/tests/ts/mount/move @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="move" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/noncanonical b/tests/ts/mount/noncanonical index 1d28304e0..a5402d3d9 100755 --- a/tests/ts/mount/noncanonical +++ b/tests/ts/mount/noncanonical @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="non canonical path" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/paths b/tests/ts/mount/paths index 0b3432bd9..8a6ed352b 100755 --- a/tests/ts/mount/paths +++ b/tests/ts/mount/paths @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="basic paths" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/regfile b/tests/ts/mount/regfile index 8d786adbf..b342ececd 100755 --- a/tests/ts/mount/regfile +++ b/tests/ts/mount/regfile @@ -3,7 +3,7 @@ # Copyright (C) 2011 Karel Zak # This file is part of util-linux. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="regular file" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/remount b/tests/ts/mount/remount index 051c595a8..c6c772f91 100755 --- a/tests/ts/mount/remount +++ b/tests/ts/mount/remount @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="remount" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/rlimit b/tests/ts/mount/rlimit index 7d7e42bbc..dc7a2c821 100755 --- a/tests/ts/mount/rlimit +++ b/tests/ts/mount/rlimit @@ -23,7 +23,7 @@ # calls are successful. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="rlimit-fsize" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/shared-subtree b/tests/ts/mount/shared-subtree index 995aed204..c0716de2b 100755 --- a/tests/ts/mount/shared-subtree +++ b/tests/ts/mount/shared-subtree @@ -1,6 +1,6 @@ #!/bin/bash -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="shared-subtree" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/special b/tests/ts/mount/special index 6e198b3b3..633f23df8 100755 --- a/tests/ts/mount/special +++ b/tests/ts/mount/special @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="call mount." MOUNTER="/sbin/mount.mytest" diff --git a/tests/ts/mount/umount-alltargets b/tests/ts/mount/umount-alltargets index 434ecab2d..e6a284727 100755 --- a/tests/ts/mount/umount-alltargets +++ b/tests/ts/mount/umount-alltargets @@ -2,7 +2,7 @@ # Copyright (C) 2013 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="umount-all-targets" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/umount-recursive b/tests/ts/mount/umount-recursive index 85e54df7a..83d6dee3c 100755 --- a/tests/ts/mount/umount-recursive +++ b/tests/ts/mount/umount-recursive @@ -2,7 +2,7 @@ # Copyright (C) 2012 Karel Zak -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="umount-recursive" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/mount/uuid b/tests/ts/mount/uuid index e29ad3929..14df0b140 100755 --- a/tests/ts/mount/uuid +++ b/tests/ts/mount/uuid @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by uuid" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/namei/logic b/tests/ts/namei/logic index eda5d1b05..b216ee7cc 100755 --- a/tests/ts/namei/logic +++ b/tests/ts/namei/logic @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="basic functionality" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/partx/partx b/tests/ts/partx/partx index 76d1db49a..74600cbc2 100755 --- a/tests/ts/partx/partx +++ b/tests/ts/partx/partx @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="partitions probing" TS_IMGDIR="$TS_TOPDIR/ts/blkid/images-pt" PARTS=3 diff --git a/tests/ts/paths/built-in b/tests/ts/paths/built-in index 84ee55539..f866514c7 100755 --- a/tests/ts/paths/built-in +++ b/tests/ts/paths/built-in @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="built-in" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/schedutils/cpuset b/tests/ts/schedutils/cpuset index f3f11ddb4..9872e270c 100755 --- a/tests/ts/schedutils/cpuset +++ b/tests/ts/schedutils/cpuset @@ -14,7 +14,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="cpuset" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/script/race b/tests/ts/script/race index e4822644f..98ac56a47 100755 --- a/tests/ts/script/race +++ b/tests/ts/script/race @@ -16,7 +16,7 @@ # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="race conditions" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/swapon/devname b/tests/ts/swapon/devname index cbab1285d..10fcc4282 100755 --- a/tests/ts/swapon/devname +++ b/tests/ts/swapon/devname @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by devname" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/swapon/fixpgsz b/tests/ts/swapon/fixpgsz index 0a694add3..53f8833f5 100755 --- a/tests/ts/swapon/fixpgsz +++ b/tests/ts/swapon/fixpgsz @@ -1,6 +1,6 @@ #!/bin/bash -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="fix page size" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/swapon/fixsig b/tests/ts/swapon/fixsig index 2005dec4b..d7ba65625 100755 --- a/tests/ts/swapon/fixsig +++ b/tests/ts/swapon/fixsig @@ -1,6 +1,6 @@ #!/bin/bash -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="fix signature" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/swapon/label b/tests/ts/swapon/label index 5df0541c1..5f9599cd2 100755 --- a/tests/ts/swapon/label +++ b/tests/ts/swapon/label @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by label" LABEL="testSwapLabel" diff --git a/tests/ts/swapon/uuid b/tests/ts/swapon/uuid index f40720ce2..858350630 100755 --- a/tests/ts/swapon/uuid +++ b/tests/ts/swapon/uuid @@ -15,7 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="by uuid" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/tailf/simple b/tests/ts/tailf/simple index e8bdb5012..60257aee6 100755 --- a/tests/ts/tailf/simple +++ b/tests/ts/tailf/simple @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="simple" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/utmpdump/ipv6tobin b/tests/ts/utmpdump/ipv6tobin index 6de99ad1b..cb52e513b 100755 --- a/tests/ts/utmpdump/ipv6tobin +++ b/tests/ts/utmpdump/ipv6tobin @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="IPv6 to binary" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/utmpdump/ipv6totxt b/tests/ts/utmpdump/ipv6totxt index fb81f3922..560806c5b 100755 --- a/tests/ts/utmpdump/ipv6totxt +++ b/tests/ts/utmpdump/ipv6totxt @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="IPv6 to text" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/utmpdump/to-binary b/tests/ts/utmpdump/to-binary index f2ec324ce..dcfe6ea1e 100755 --- a/tests/ts/utmpdump/to-binary +++ b/tests/ts/utmpdump/to-binary @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="to-binary" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/utmpdump/to-text b/tests/ts/utmpdump/to-text index 220f4d0a5..56f411a5d 100755 --- a/tests/ts/utmpdump/to-text +++ b/tests/ts/utmpdump/to-text @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="to-text" . $TS_TOPDIR/functions.sh diff --git a/tests/ts/wipefs/wipefs b/tests/ts/wipefs/wipefs index 38dbedbb1..e6ace2166 100755 --- a/tests/ts/wipefs/wipefs +++ b/tests/ts/wipefs/wipefs @@ -1,6 +1,6 @@ #!/bin/bash -TS_TOPDIR="$(dirname $0)/../.." +TS_TOPDIR="${0%/*}/../.." TS_DESC="wipefs" . $TS_TOPDIR/functions.sh -- cgit v1.2.3-55-g7522