From: Sami Kerola Date: Sun, 16 Feb 2014 23:54:14 +0000 (+0000) Subject: tests: avoid executing dirname(1) command X-Git-Tag: v2.25-rc1~593 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e130ce53ce87f39f4bee3288d106c681e82dbb86;p=thirdparty%2Futil-linux.git tests: avoid executing dirname(1) command Bash parameter expansion does the same thing. Signed-off-by: Sami Kerola --- diff --git a/tests/functions.sh b/tests/functions.sh index f210204e22..c802136e2f 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 474c21cb31..8a7924ae14 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 62e380c40d..6b843f85e9 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 0ecc664c35..e22d6c849e 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 b88dd6003c..8def673f95 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 bf95f77f5e..07ffc584a5 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 30900eae6c..43140728ca 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 fe419017e6..8743d3d661 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 508bdee856..308c34b2d1 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 cf77095366..ddb0129aae 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 2997f14ceb..c258564a44 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 dc6de1e9f7..64e7c4e384 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 d3b122811d..934cfdc0a1 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 e1f4a85f49..a01a9defcd 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 6fddb0bb83..a0220bfe37 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 12a48b3bfa..67883a2ebc 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 b08656e453..8b43461d58 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 df86b73177..4e7fafc490 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 293df39edc..bc792143c5 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 507b564c99..dc500ac192 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 e25b71b954..a3de709c95 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 78b3546ef5..f6b7cc7d23 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 9c72590134..9dd673cb7c 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 70010290e9..5769dd8408 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 a8419cbade..d44e60e2de 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 172e8587fa..71c40da37c 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 654a1da7d7..6264bb23d8 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 fe6f83c0ac..9d39090bd6 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 ed4e4aa72d..3053ab5aff 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 6a98c9e005..200445eb02 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 5facfe9a5b..bc9375dc08 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 68237c0ed6..147cb9c8ee 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 b87d3fd83b..7f21d9ab42 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 a1afa6fdfb..0519a02008 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 774ffb12fe..2ad2477464 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 1b7b0d4c92..e503c1a132 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 3c1f84edfb..b7ea688a86 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 c5ea72e7a1..2b247f8023 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 4ec81982fa..6190ae1520 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 ad5568a045..be078357f0 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 03133a6d1e..afcb612efd 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 9354e45c76..8cc300929b 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 288388d8ec..23ac0537e5 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 25079070ec..75bd006e77 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 2c76f428f9..866cf6ecfd 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 b16e95c13f..45b315b64e 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 88a80e6360..878c1190b4 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 5b9bb31084..2120ce7c81 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 f610ad8f58..b31ec4f5a0 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 6b7f0f7bc7..6c64390ffd 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 9b6745c7fd..8716197cd5 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 8a0aa1d9c8..f3b8c81725 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 401ee937ed..8dc56b7798 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 99b82a3831..52e108c238 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 b44adb1c18..9e164e5260 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 f99a35448f..39f26d7081 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 529d86142d..5bea09bed6 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 2eb149d5fa..816d306d44 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 f2bc33ec57..8aa604df97 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 cd260a0c87..3c7325b71a 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 60b72bd4bb..138cf45704 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 83b7f8d08a..fa263506ca 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 0c3bce986d..7d06a28f03 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 4be19dde64..9535171ba7 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 b3aaff99ff..9c1487e87d 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 ed379d4a61..c36d8acaed 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 5c8bcb645f..26f001544b 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 f6a5c0530f..7de299dbee 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 c988258c2b..80753ea2a9 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 c6fa360b3f..a60c038947 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 b89fb5bc91..89e4da249e 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 f52c4047c6..318ccf05c8 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 05c2c20765..237a6d8277 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 6d4bce81ce..89279ba262 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 e49d33ef0e..da14b9bae9 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 6facaad103..211f015a93 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 c25da6a078..a1a7a3b609 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 10caed752a..0b3b9a44c0 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 51e96c9e7e..967dec4018 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 29d4b42011..64eb03888a 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 a7d7a952b8..2b87471656 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 e94fb63603..6fe3f147e4 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 f635fc1b47..2b290b0f8f 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 39185ad811..00d5a863dd 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 735baab0f4..b39794a1f9 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 a6b91cb532..082e411709 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 d0cca8e8f1..29f4d61649 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 3863a3f891..2acf2d217a 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 9e650b26b0..c5051bceab 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 035ce8230e..5b95f289ae 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 8050556882..62e00707c6 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 43a76f9b55..a758c12732 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 7fb2ff9966..4b08b5e561 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 bc0ecf74f8..974a7f25ea 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 853b27a655..98441193bb 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 06a00a290c..947f556241 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 d448fc15fb..16b537e3a4 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 8f32ef1ae7..016a16e0ec 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 48fe1a18d8..5224535031 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 9af8db6484..9cf73e008c 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 34214dbcb5..63e8126f91 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 859bcda475..8cdf946e58 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 2c1e7eb5d9..5e8a97a0f2 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 0d10f1b89d..1bb8d042cf 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 0ad4f050b7..ba63a38ea2 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 62a89ca445..1a8fa78e44 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 7f9d91f7b3..c8d5eec72e 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 8c65b4d9e6..a0394a4ff1 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 51bac141a3..5722911468 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 442cdb7e3b..098f43badf 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 873ea95a50..2dda82530f 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 ea376856a5..dc130d4843 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 1d28304e02..a5402d3d91 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 0b3432bd9d..8a6ed352ba 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 8d786adbf3..b342ececd9 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 051c595a8f..c6c772f918 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 7d7e42bbc1..dc7a2c821d 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 995aed2049..c0716de2bd 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 6e198b3b38..633f23df81 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 434ecab2d6..e6a2847274 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 85e54df7a9..83d6dee3cf 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 e29ad39295..14df0b140a 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 eda5d1b05e..b216ee7cc6 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 76d1db49ab..74600cbc20 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 84ee55539e..f866514c7f 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 f3f11ddb44..9872e270c4 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 e4822644f8..98ac56a47f 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 cbab1285dc..10fcc4282e 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 0a694add3a..53f8833f53 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 2005dec4b6..d7ba656258 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 5df0541c1a..5f9599cd2e 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 f40720ce2e..8583506308 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 e8bdb50127..60257aee64 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 6de99ad1b7..cb52e513b7 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 fb81f39222..560806c5b3 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 f2ec324ce1..dcfe6ea1e0 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 220f4d0a5d..56f411a5d8 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 38dbedbb1d..e6ace2166b 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