]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: avoid executing dirname(1) command
authorSami Kerola <kerolasa@iki.fi>
Sun, 16 Feb 2014 23:54:14 +0000 (23:54 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 17 Feb 2014 12:55:41 +0000 (13:55 +0100)
Bash parameter expansion does the same thing.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
138 files changed:
tests/functions.sh
tests/run.sh
tests/ts/bitops/swapbytes
tests/ts/blkid/low-probe
tests/ts/blkid/lowprobe-pt
tests/ts/blkid/md-raid0-whole
tests/ts/blkid/md-raid1-part
tests/ts/blkid/md-raid1-whole
tests/ts/build-sys/config
tests/ts/cal/1m
tests/ts/cal/1mw
tests/ts/cal/3m
tests/ts/cal/3mw
tests/ts/cal/bigyear
tests/ts/cal/bigyearw
tests/ts/cal/color
tests/ts/cal/colorw
tests/ts/cal/sep1752
tests/ts/cal/sep1752w
tests/ts/cal/weekarg
tests/ts/cal/weeknum
tests/ts/cal/year
tests/ts/cal/yearw
tests/ts/col/multibyte
tests/ts/colrm/rm2-2
tests/ts/column/fillrow
tests/ts/column/multi-file
tests/ts/column/separator_table
tests/ts/cramfs/doubles
tests/ts/cramfs/fsck-endianness
tests/ts/cramfs/mkfs
tests/ts/cramfs/mkfs-endianness
tests/ts/dmesg/console-levels
tests/ts/dmesg/decode
tests/ts/dmesg/delta
tests/ts/dmesg/facilities
tests/ts/eject/umount
tests/ts/fdisk/align-512-4K
tests/ts/fdisk/align-512-4K-63
tests/ts/fdisk/align-512-4K-md
tests/ts/fdisk/align-512-512
tests/ts/fdisk/align-512-512-topology
tests/ts/fdisk/bsd
tests/ts/fdisk/gpt
tests/ts/fdisk/id
tests/ts/fdisk/mbr-dos-mode
tests/ts/fdisk/mbr-nondos-mode
tests/ts/fdisk/oddinput
tests/ts/fdisk/sunlabel
tests/ts/fsck/ismounted
tests/ts/hexdump/format-strings
tests/ts/hexdump/highlighting
tests/ts/hwclock/systohc
tests/ts/ipcs/headers
tests/ts/ipcs/limits
tests/ts/ipcs/limits2
tests/ts/ipcs/mk-rm-msg
tests/ts/ipcs/mk-rm-sem
tests/ts/ipcs/mk-rm-shm
tests/ts/isosize/print-size
tests/ts/last/ipv6
tests/ts/last/last
tests/ts/libmount/context
tests/ts/libmount/context-py
tests/ts/libmount/context-utab
tests/ts/libmount/context-utab-py
tests/ts/libmount/lock
tests/ts/libmount/optstr
tests/ts/libmount/tabdiff
tests/ts/libmount/tabfiles
tests/ts/libmount/tabfiles-py
tests/ts/libmount/tabfiles-tags
tests/ts/libmount/tabfiles-tags-py
tests/ts/libmount/update
tests/ts/libmount/update-py
tests/ts/libmount/utils
tests/ts/login/islocal
tests/ts/login/logindefs
tests/ts/look/separator
tests/ts/losetup/losetup
tests/ts/lscpu/lscpu
tests/ts/md5/md5
tests/ts/minix/fsck
tests/ts/minix/mkfs
tests/ts/misc/fallocate
tests/ts/misc/getopt
tests/ts/misc/ionice
tests/ts/misc/line
tests/ts/misc/mcookie
tests/ts/misc/rev
tests/ts/misc/setarch
tests/ts/misc/setsid
tests/ts/misc/strtosize
tests/ts/misc/ul
tests/ts/misc/whereis
tests/ts/more/regexp
tests/ts/more/squeeze
tests/ts/mount/devname
tests/ts/mount/fstab-broken
tests/ts/mount/fstab-devname
tests/ts/mount/fstab-devname2label
tests/ts/mount/fstab-devname2uuid
tests/ts/mount/fstab-label
tests/ts/mount/fstab-label2devname
tests/ts/mount/fstab-label2uuid
tests/ts/mount/fstab-none
tests/ts/mount/fstab-symlink
tests/ts/mount/fstab-uuid
tests/ts/mount/fstab-uuid2devname
tests/ts/mount/fstab-uuid2label
tests/ts/mount/label
tests/ts/mount/move
tests/ts/mount/noncanonical
tests/ts/mount/paths
tests/ts/mount/regfile
tests/ts/mount/remount
tests/ts/mount/rlimit
tests/ts/mount/shared-subtree
tests/ts/mount/special
tests/ts/mount/umount-alltargets
tests/ts/mount/umount-recursive
tests/ts/mount/uuid
tests/ts/namei/logic
tests/ts/partx/partx
tests/ts/paths/built-in
tests/ts/schedutils/cpuset
tests/ts/script/race
tests/ts/swapon/devname
tests/ts/swapon/fixpgsz
tests/ts/swapon/fixsig
tests/ts/swapon/label
tests/ts/swapon/uuid
tests/ts/tailf/simple
tests/ts/utmpdump/ipv6tobin
tests/ts/utmpdump/ipv6totxt
tests/ts/utmpdump/to-binary
tests/ts/utmpdump/to-text
tests/ts/wipefs/wipefs

index f210204e22b97b308504fc501c9fdebe9fa11f91..c802136e2fe46fb713962550ec7a958b94280b08 100644 (file)
@@ -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"
index 474c21cb31c6e4740203d913e1dbc5cecdd4322e..8a7924ae144d736db2852d4d48d419c8a000909d 100755 (executable)
@@ -16,7 +16,7 @@
 # GNU General Public License for more details.
 #
 
-TS_TOPDIR=$(cd $(dirname $0) && pwd)
+TS_TOPDIR=$(cd ${0%/*} && pwd)
 SUBTESTS=
 OPTS=
 
index 62e380c40d4100ad55c6f58ae065bec61a5d6c35..6b843f85e9187e2e8838ca10a2cec538ba40cd8d 100755 (executable)
@@ -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
index 0ecc664c3556c038fc7f7ebc287ee404cdccb360..e22d6c849ef7499357219220ef1c4d514857e6f5 100755 (executable)
@@ -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
index b88dd6003cd10428b4fdccc6974bd05fe3491c7e..8def673f95e3a8ab840f82d96b98b63ffbf85e5a 100755 (executable)
@@ -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
index bf95f77f5e10d17fc118b058ea82ee8ee7270713..07ffc584a523170971cea0b7e109c16b270e5b31 100755 (executable)
@@ -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
index 30900eae6ccd5cdfbe5e211f89ad659aa894a812..43140728caec7f9fc6bb3065fc7ea12b181e5279 100755 (executable)
@@ -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
index fe419017e68ec4e517baeb16e8801f49ea6e1c41..8743d3d661983c12d2876c214ad952b3be3917d3 100755 (executable)
@@ -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
index 508bdee856fb1f1906e58c18ccbd9823ee873644..308c34b2d1caeec654f8fac54d4a982e1ead83b5 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2011 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="config"
 
 # Don't execute this test by default, --force required
index cf77095366fc2a3917773b63f69053028eb46248..ddb0129aae5587f142ad74c066eb291de2b79033 100755 (executable)
@@ -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
index 2997f14cebef1d4520d93624e1ebd8c128f5b9bd..c258564a44338918bcc7dbdf17ceeff394ce8f2a 100755 (executable)
@@ -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
index dc6de1e9f7a766091afe600d71996ebba5e5c7f2..64e7c4e384e4061d190008cf1911fb156fa45b77 100755 (executable)
@@ -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
index d3b122811dc1bc30632ab97ad7b9da00805d8ece..934cfdc0a1547045a2e273545e7d2a6dd3df595e 100755 (executable)
@@ -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
index e1f4a85f4957786677374ba7c2188b17ea49823a..a01a9defcdc996236f161eee62a81dbdd8fdb489 100755 (executable)
@@ -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
index 6fddb0bb839a4a4f22cb024227b334233076c0fe..a0220bfe37784b2bf577b6df5d7c7bd012adef1b 100755 (executable)
@@ -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
index 12a48b3bfa8c1595523450c77299985622079fb7..67883a2ebc31b0b2e11d070c832aa93b3ab384f0 100755 (executable)
@@ -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
index b08656e4533b6ddec2fb789149f609eb5149731a..8b43461d58a6ca8bc1805399ba7fbd14e3d5ba7e 100755 (executable)
@@ -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
index df86b73177b02b4758eb8f2504b5382183835326..4e7fafc490a11582ac4def6bae753df07ed1d055 100755 (executable)
@@ -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
index 293df39edc07d9b0e109b51cfefdca9c45c2ab9e..bc792143c5ed7aef3bea1bcfaefd0d69349c9556 100755 (executable)
@@ -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
index 507b564c995c9c4d13502cbad2bd1aae958aa033..dc500ac1928648362fc3a509f9876610501813cb 100755 (executable)
@@ -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
index e25b71b9545455fa587105856078538e4a5d72f6..a3de709c9508e9bc1de7966aedcd6a5430f634ff 100755 (executable)
@@ -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
index 78b3546ef52927d02663cc4a547d822af810a5d7..f6b7cc7d238dbf96f27bd932fc8155650428d681 100755 (executable)
@@ -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
index 9c72590134a3a1e06d7b4ecbcf3700f1a78f9250..9dd673cb7ce577dd281ab40db10731e6a6023492 100755 (executable)
@@ -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
index 70010290e981ddf8f98925b682a47db5f1dd251e..5769dd84081d8af983f6fec1e6227ee689e7fb08 100755 (executable)
@@ -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
index a8419cbade3c3cf37295238a76b62bdf198ee7ba..d44e60e2de5fde6c47cbe9a7b3194328df0c9dc1 100755 (executable)
@@ -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
index 172e8587fa39ea7d44f46bd34cb42544508c5503..71c40da37c5fb67f25616c939c02abb1542d0915 100755 (executable)
@@ -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
index 654a1da7d7e2f192ad93eb28a649356fbebc877a..6264bb23d862347eef5c6c976616049f339b041f 100755 (executable)
@@ -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
index fe6f83c0acc28c9507f2d5fd85792c7954b5c987..9d39090bd61acc7fb404c47c73f7f2d8bb970b09 100755 (executable)
@@ -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
index ed4e4aa72d1d76bb68f955e984a27b14b06018b2..3053ab5aff0c669f577b3f0316b9c0544a9e80c4 100755 (executable)
@@ -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
index 6a98c9e00562cddfc65ad0bb4fa529645885fd1d..200445eb02552a190d4e917880b61da0eaa8dabd 100755 (executable)
@@ -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
index 5facfe9a5b3e357ba097d8fadffa676ac1e3342d..bc9375dc08ba1f0903b6e227bbd9b8c9000b1c97 100755 (executable)
@@ -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
index 68237c0ed667ed9ae52d4b98f9a087bd65eb2380..147cb9c8ee61d262a36a28bd61ccfd77f84a137e 100755 (executable)
@@ -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
index b87d3fd83bb6983747350d2373ff3b9b8dc00b36..7f21d9ab42d5b19168e7d3e7e1f46b75b36aee19 100755 (executable)
@@ -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
index a1afa6fdfbffe19fe9a76e5f0f3f6f432329d3ff..0519a02008b00fb4c98cbc94e8aa3d84ef01d4d2 100755 (executable)
@@ -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
index 774ffb12fef1079ab3c4b00b215a18b8fb530b09..2ad2477464c6869cf11f949bf7a85b111561d2cc 100755 (executable)
@@ -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
index 1b7b0d4c92682b0e8a75fcbc66f0297e6ca09082..e503c1a13281ddeb6e09b5f9b4b733d4e44b647a 100755 (executable)
@@ -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
index 3c1f84edfb68b93188bdd89c332b76940aa157e4..b7ea688a86a8919208e1f97800d87ede6177fd9d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="umount"
 
 . $TS_TOPDIR/functions.sh
index c5ea72e7a18071b6fed764c40520ae4fd72559ff..2b247f8023fddb234ed70911eac9ac26e5b702ef 100755 (executable)
@@ -20,7 +20,7 @@
 # I/O size (32KiB)
 #
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="align 512/4K"
 
 . $TS_TOPDIR/functions.sh
index 4ec81982facf0f9c904f607fac4838f15bc8ae08..6190ae1520964355271cfc1568d7b35be3acd97e 100755 (executable)
@@ -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
index ad5568a045645819d191b66bfdaff90ebdefcd08..be078357f02bf33c5a19cc4d3ea0766f6a1978f8 100755 (executable)
@@ -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
index 03133a6d1e0801ac72746c8223aff3833eb00a50..afcb612efd8d6e345deb401829ed56b879de5883 100755 (executable)
@@ -19,7 +19,7 @@
 # topology.
 #
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="align 512/512"
 
 . $TS_TOPDIR/functions.sh
index 9354e45c769e042a1434212a8252ce29cf39f77f..8cc300929b3d85a834b12258d179dd991c6479ca 100755 (executable)
@@ -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
index 288388d8ec7c8cf623334187c56e85761ee8101d..23ac0537e54cc88604615561418541ea96f889c3 100755 (executable)
@@ -16,7 +16,7 @@
 #
 #
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="nested BSD"
 
 . $TS_TOPDIR/functions.sh
index 25079070ecdf913016bb6d10f56784be91541896..75bd006e77538f80d24c6a6b27381d7e850316db 100755 (executable)
@@ -16,7 +16,7 @@
 #
 #
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="GPT"
 
 . $TS_TOPDIR/functions.sh
index 2c76f428f983759132ac3c544dd5f2eb6a0f1556..866cf6ecfdc160a547e7afb2ece0f52fd3dbc7c9 100755 (executable)
@@ -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
index b16e95c13f41b3ffdd580cd7eb0590b50fdf518b..45b315b64ecb81a069c8d4c205a32d51019aac4d 100755 (executable)
@@ -16,7 +16,7 @@
 #
 #
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="MBR - dos mode"
 
 . $TS_TOPDIR/functions.sh
index 88a80e63608c1efc4119ea8ef8ef4804b3303262..878c1190b40a7bd6938ed2cdc87dfaae16baa3d5 100755 (executable)
@@ -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
index 5b9bb310841d3e85e23eed0544fe1ba7fa363d22..2120ce7c815aa4bbc64753e95b7239466bd0319c 100755 (executable)
@@ -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
index f610ad8f58b4011b51b17aca928fbbd84210482e..b31ec4f5a024c385611eb38df1f3458d0bc24d2a 100755 (executable)
@@ -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
index 6b7f0f7bc784372c75c911522719ea3a36093326..6c64390ffd0cbdd13fb36d4eb068b6e141cddb65 100755 (executable)
@@ -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
index 9b6745c7fd4b65a42c6740e79109770869162581..8716197cd5e384aafb0afde34ce80d62e7cb8938 100755 (executable)
@@ -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:
index 8a0aa1d9c8bf3ac2778269dfa123d76aba1df345..f3b8c8172587e0edf5e5a8de17f53a3197e00e02 100755 (executable)
@@ -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"
index 401ee937edecf5db099163dec7f246c47fba4678..8dc56b7798078e7b7113579e4958cada2f51826f 100755 (executable)
@@ -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"
 
index 99b82a38310a3b28c252e68fb3779090a112158f..52e108c238c05178c21fd1887c5690a8807192f7 100755 (executable)
@@ -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
index b44adb1c180e6f916e3ed85f13740926b268d254..9e164e5260a9dcbd780d8cb6c2338cb174954b8b 100755 (executable)
@@ -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
index f99a35448ff12c120cbaffef7bee05c18d186226..39f26d708105371bbe6c9b93862da620f010d1a7 100755 (executable)
@@ -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
index 529d86142dc5a0407a164b12d9ea68cf576aa3ff..5bea09bed6b673aff79e0ebcf431275ea42fb81a 100755 (executable)
@@ -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
index 2eb149d5fa899deb7bb4add2a63845c1b1b11db9..816d306d441149d218e18bb3daa9093f638131a5 100755 (executable)
@@ -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
index f2bc33ec576615c358027a0ef9430764cc112dc7..8aa604df979ca67a6096aeb22f3d35b4e4aee0f2 100755 (executable)
@@ -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
index cd260a0c874f4cf3424af96822933a5d4fc8d987..3c7325b71a0b22813e07ac06947bdb7971cdb899 100755 (executable)
@@ -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
index 60b72bd4bba96bf1e31e5f80f3c979b9ae6391bd..138cf4570429dc31f8935eb509d2d6a9ef6a64ae 100755 (executable)
@@ -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
index 83b7f8d08a63d6ba3ad005af4429988a6f875a9c..fa263506ca433813e199cc76d6d3229c597b5348 100755 (executable)
@@ -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
index 0c3bce986d7b2fd439cc49b58c54a6be01a53c56..7d06a28f032a874530d71341286d8d0f469758d5 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="context"
 
 . $TS_TOPDIR/functions.sh
index 4be19dde6484f271f41db3c79e381e0f0d2145f8..9535171ba7dbc054b44e2f4f77970494f2cee788 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="context-py"
 
 . $TS_TOPDIR/functions.sh
index b3aaff99ff1d39869cd7165f2d37297d570fec2e..9c1487e87da817f2a44a5e382c9bcb2a1ce8315a 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="context (utab)"
 
 . $TS_TOPDIR/functions.sh
index ed379d4a61211e1ec75ced3d7336709b274c4121..c36d8acaede2ea25e9045b10f9622bf913943888 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="context-py (utab)"
 
 . $TS_TOPDIR/functions.sh
index 5c8bcb645f990a7dd11855248cac44b37d38a98a..26f001544bacd3a4761e807daa8041f03a99edb2 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="lock"
 
 . $TS_TOPDIR/functions.sh
index f6a5c0530fda74cb59e1002c3f815577ed9a74b8..7de299dbee05ef31dfcc3cf07b20993ac31a8d0e 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="options string"
 
 . $TS_TOPDIR/functions.sh
index c988258c2b49758d823fc1c4f932895bd47502b8..80753ea2a931cab81f022d2657ba9dfa5b448b56 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2011 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="table diffs"
 
 . $TS_TOPDIR/functions.sh
index c6fa360b3fdccf68cacce839be34062a57332051..a60c0389471ed06d7096a0f24d7b7a5ff439eee1 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="tab files"
 
 . $TS_TOPDIR/functions.sh
index b89fb5bc911a119153d2d03b91147d74d84ea701..89e4da249ea07a1f920a12132957e22fbc41ddea 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="tab files-py"
 
 . $TS_TOPDIR/functions.sh
index f52c4047c6747787890b4ef7568246e340173471..318ccf05c8ad1078418f9b75259bacc4e145ae18 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="tags"
 
 . $TS_TOPDIR/functions.sh
index 05c2c207656d382248466c417dd388f140f535aa..237a6d82773b00d973634cab6b807c2a20ed5b3e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="tags-py"
 
 . $TS_TOPDIR/functions.sh
index 6d4bce81ce5d1f4dd8c400970b8b18639a45de3d..89279ba26226abe5519ea663465d9d6f7ee89ca1 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="tab update"
 
 . $TS_TOPDIR/functions.sh
index e49d33ef0e0a82d3d1fb95d58e0d3e0cfb243feb..da14b9bae95b00c2a88a5b9b3eb1deec01768282 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="tab update-py"
 
 . $TS_TOPDIR/functions.sh
index 6facaad103ff39b2b00f1bc0911e94ece3fcf304..211f015a93b8ef8d409d70d18f063aa229d010eb 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2010 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="utils"
 
 . $TS_TOPDIR/functions.sh
index c25da6a0788654c6bbde2af2db5c706c67883cc1..a1a7a3b609925212dd349e31fd66f58f4e420a1d 100755 (executable)
@@ -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
index 10caed752aaf2dbbaa8a9e86de1483f7416cc0fe..0b3b9a44c086a9c544ee9e2b0a2ec64527b95044 100755 (executable)
@@ -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
index 51e96c9e7ecef425b081d1392b9908c2e1cb0543..967dec40183c800de669e4f22b3cfa6ec97317a8 100755 (executable)
@@ -28,7 +28,7 @@
 #              uniq >  words
 #
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="separator"
 
 . $TS_TOPDIR/functions.sh
index 29d4b4201132e6a9b3066707b80ebe75584ec570..64eb03888a4d0f114e3fefff44451d43ff530d02 100755 (executable)
@@ -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
index a7d7a952b8cd5c462230799fdef6ad12ed54344c..2b874716566bca10fd8952f814be1d50157c3e04 100755 (executable)
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 . $TS_TOPDIR/functions.sh
 
 ts_init "$*"
index e94fb636039909324cda09d414841e29b41174da..6fe3f147e46776ee6d80c78ba672bd55cae33c71 100755 (executable)
@@ -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 "$*"
index f635fc1b47894d740f90b723b36468f85608026b..2b290b0f8f20f5284e3f652ae43a5f031fbe361d 100755 (executable)
@@ -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
index 39185ad8117a93e2dacd1442042548129833280e..00d5a863dde128fb39cd71b05abcc11a97ba5387 100755 (executable)
@@ -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
index 735baab0f48c46ce24d0588edf5b842614b26abe..b39794a1f97249504a6c72dbfc993dc11dc2d594 100755 (executable)
@@ -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
index a6b91cb5327184cfe07094d4455b8f955a0e6046..082e411709a03b4c68969b6e104e6041f1ec9d05 100755 (executable)
@@ -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
index d0cca8e8f12df8ffb94fdbc5b9e553e6f1f77491..29f4d61649da9022d75d674fba5ac80b71a249a9 100755 (executable)
@@ -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
index 3863a3f8916c40e7f6d6101de0744632672c49ae..2acf2d217abf71035f08b5650abb203f336c80ca 100755 (executable)
@@ -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
index 9e650b26b09438462c23cb1d19f89f1d4ce5dee5..c5051bceab978c7995ca5763d7811e566ff0538e 100755 (executable)
@@ -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
index 035ce8230e35bf41a09712857b805b585693ef29..5b95f289aeb5fe186279f9238eb5041f38885bd5 100755 (executable)
@@ -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
index 8050556882ea5b0e67e3b5b6aec6d4e2f350dc2b..62e00707c68442ad181ca45284412b77e30f85d7 100755 (executable)
@@ -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
index 43a76f9b55d58abff563875dffc12e3003126d0d..a758c1273265b236fe2ee56d48e15253180d5ed6 100755 (executable)
@@ -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
index 7fb2ff99667b975c9f55e05ee1602deec7504603..4b08b5e561f356eab5e06f40bbb41c073ff8082e 100755 (executable)
@@ -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
index bc0ecf74f879f8f2d594a78d32aa16678dff3beb..974a7f25ea800652b89cfa0d76cb938c34aeebe5 100755 (executable)
@@ -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
index 853b27a655e1b48c2b487d3285401cd583d03316..98441193bb5d610ac4972e3a05d9cbc8a0e0286b 100755 (executable)
@@ -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
index 06a00a290cd958f9fbe4285dd73eb337a515da57..947f5562410b81ebd339d7bc01f9853feaeee9e3 100755 (executable)
@@ -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
index d448fc15fb9ba17f890c4a62ae6ff7307da78765..16b537e3a4652c3379f27477ed8dfbf90bca6fea 100755 (executable)
@@ -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
index 8f32ef1ae770233ad7635b633158f14b619d403f..016a16e0ec4d76b2567bfb43dec4154189153972 100755 (executable)
@@ -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
index 48fe1a18d8380900ddeca165ef031a15ecd20c1e..52245350315cf0167d70aa1962f35890a5645c0d 100755 (executable)
@@ -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
index 9af8db648469379c9b0d236692e70fd6069aabe7..9cf73e008c97167f881928ad4959a76c19c9db5a 100755 (executable)
@@ -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
index 34214dbcb5ba22718f993d33008a7eedda70e5b7..63e8126f9182856fd8fdbe16adcc96dbd257868c 100755 (executable)
@@ -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"
 
index 859bcda4755b71eab8bad77186c8bd754177630b..8cdf946e58bcb19e630a0da0044f03bfe6b9696e 100755 (executable)
@@ -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
index 2c1e7eb5d910edd371667bbb84fe64aeb2f4675b..5e8a97a0f2da3e3c931fa7813876a9c7c43c4ee1 100755 (executable)
@@ -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"
 
index 0d10f1b89dd71b5b06ccd342e64b70b72d2f7950..1bb8d042cfdb31366e4c20a0971e83be54760476 100755 (executable)
@@ -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"
 
index 0ad4f050b77ebad0fe4e02c2b713fd1047646ef5..ba63a38ea260d9593cc1f467dfa6fb3ef87acc44 100755 (executable)
@@ -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"
 
index 62a89ca4456ec4762e17add83170403bdacec376..1a8fa78e4421422da35739446c7cb1c7f5cd4fa9 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="none"
 
 . $TS_TOPDIR/functions.sh
index 7f9d91f7b357e10ba3afb3f93b747c90cade87fd..c8d5eec72efaa7d8fffdd3c4e145b134bdca8acc 100755 (executable)
@@ -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
index 8c65b4d9e69d29f81ad26a4fda237d729660fe3d..a0394a4ff1a5e15a9b800b5f72d179a2f0698f12 100755 (executable)
@@ -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
index 51bac141a3bb5525a1f750392b0ce7514f978f66..57229114684869ba64e0c5ddfdbc02254053557e 100755 (executable)
@@ -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
index 442cdb7e3ba678f8cd81897c5352346817c2a024..098f43badf4ff0026cf0f6ad2e8236f7f5c2596b 100755 (executable)
@@ -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"
 
index 873ea95a50ef6829150179198d09b1dc02793575..2dda82530f61a1323f05d351679a1d6b23a0552c 100755 (executable)
@@ -16,7 +16,7 @@
 # GNU General Public License for more details.
 #
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="by label"
 LABEL="testMountLabel"
 
index ea376856a5eaef58b5b62a426b252dc3a1d7707c..dc130d48430a982113d2a86f85bb77ebe7d9fdba 100755 (executable)
@@ -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
index 1d28304e0261cbbfa8016dfd833e48b08b9bf4c2..a5402d3d919ed448cffc66650b4f860e88280098 100755 (executable)
@@ -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
index 0b3432bd9d53ad0f805702c35e5c8fa25dc13b1d..8a6ed352ba6ffd6f2e4c72577ff1106f4c92671e 100755 (executable)
@@ -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
index 8d786adbf3a824da56890bc9c0c17ccb6c004c20..b342ececd95ffac76b8a5e71d22cc902a893f779 100755 (executable)
@@ -3,7 +3,7 @@
 # Copyright (C) 2011 Karel Zak <kzak@redhat.com>
 # This file is part of util-linux.
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="regular file"
 
 . $TS_TOPDIR/functions.sh
index 051c595a8f95d56547e0504a6b58fad5c8e86497..c6c772f918ae8cbe7d8cbffc328eaf8663b0c042 100755 (executable)
@@ -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
index 7d7e42bbc148b4ff324317a68808ffd50af893c4..dc7a2c821d19cf8a7ff724e2be95ad1ae1430b93 100755 (executable)
@@ -23,7 +23,7 @@
 # calls are successful.
 #
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="rlimit-fsize"
 
 . $TS_TOPDIR/functions.sh
index 995aed2049a096ed3d339754d1bca1fb7ddb8b6f..c0716de2bd2f5cfbb38153363607bd69e85a3e09 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="shared-subtree"
 
 . $TS_TOPDIR/functions.sh
index 6e198b3b38e5ae0653173d13594643484b6c948a..633f23df814a085f437f8fe7a8c8e6b918adfbe5 100755 (executable)
@@ -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.<type>"
 MOUNTER="/sbin/mount.mytest"
 
index 434ecab2d6991ef34e9e1f7889f03bda1966d9a3..e6a284727488164a04c27de4a512aa9698326112 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2013 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="umount-all-targets"
 
 . $TS_TOPDIR/functions.sh
index 85e54df7a957761e648e16628606fbf4b52f1ab7..83d6dee3cfc0592b9c994cbacdf331e867ea16dd 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2012 Karel Zak <kzak@redhat.com>
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="umount-recursive"
 
 . $TS_TOPDIR/functions.sh
index e29ad392958efd8604bf871353dcbc41184e9938..14df0b140a4a69fda9f9e469165684bec4c6283f 100755 (executable)
@@ -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
index eda5d1b05e5d405550baf240457d0fa449e87351..b216ee7cc6313818ff74af03b5bfa6fbac0c0a4c 100755 (executable)
@@ -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
index 76d1db49abb3cab417176b5cdf6f705b504b7ea4..74600cbc208f4516ac1425babda9d7c0a8f992fd 100755 (executable)
@@ -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
index 84ee55539eedfc68f37259f1c09deebc77bc7328..f866514c7f5b8ea868d33a7a9a6958a70b4266b8 100755 (executable)
@@ -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
index f3f11ddb4441c11aeefac0647a20921e16655b72..9872e270c442b72690f00e2f89e8e175ba326d5f 100755 (executable)
@@ -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
index e4822644f826be6934e10f7f9c53fa6157757263..98ac56a47f0d1353405360ed1506b127ed4fbc0c 100755 (executable)
@@ -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
index cbab1285dcf0fed0cd1e88385aa7319d788b9ffd..10fcc4282ee8c12a4ec936f99c8c57a2dbf34b52 100755 (executable)
@@ -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
index 0a694add3accb77ec28e3cd50285fc5aec3cf90c..53f8833f53d11b2f7ac24cf4f62fb88118ef5e2a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="fix page size"
 
 . $TS_TOPDIR/functions.sh
index 2005dec4b631d4d01167c26072150b755e4dafaf..d7ba6562589005a899158ca37428abd8e5312d85 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="fix signature"
 
 . $TS_TOPDIR/functions.sh
index 5df0541c1a5ddf6e99090809b051cc0df87d734e..5f9599cd2e4fd6e24f3c228d54c20691c9985daa 100755 (executable)
@@ -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"
 
index f40720ce2e1d9d516cf79f63aa9f177778e26872..85835063084d686d75bbc32bb44613d70671d787 100755 (executable)
@@ -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
index e8bdb50127eba8f7828638f83fb492ac2ea554ae..60257aee647bc9cb58a6a2193f359567a8d2e602 100755 (executable)
@@ -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
index 6de99ad1b7b9fec98012f001517f632369a55630..cb52e513b71696ff6d8f04dc41579637891f0d02 100755 (executable)
@@ -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
index fb81f39222a9b2ded1030d88252f7a7b726bb776..560806c5b3254ba1e5ed6a3ef382410402553c43 100755 (executable)
@@ -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
index f2ec324ce167b481b3c7fbf67b69944c180ed1a6..dcfe6ea1e04ec9cadb753c62d582e70c71752229 100755 (executable)
@@ -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
index 220f4d0a5dd1e26deef895b70aedb4fe6b424565..56f411a5d864388fcfa8522a40ce23389da527c5 100755 (executable)
@@ -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
index 38dbedbb1ddf8b58b2c8d30d8c4e44b92486b62f..e6ace2166bf26f9d989167c7a7163999abe07282 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
 TS_DESC="wipefs"
 
 . $TS_TOPDIR/functions.sh