summaryrefslogtreecommitdiffstats
path: root/tests/ts/mount
diff options
context:
space:
mode:
authorSami Kerola2014-02-17 00:54:14 +0100
committerKarel Zak2014-02-17 13:55:41 +0100
commite130ce53ce87f39f4bee3288d106c681e82dbb86 (patch)
treecc8c576a2aef0d463bdf1c8d5dd4f65971519cc1 /tests/ts/mount
parenttests: fix trailing spaces in cal(1) stuff (diff)
downloadkernel-qcow2-util-linux-e130ce53ce87f39f4bee3288d106c681e82dbb86.tar.gz
kernel-qcow2-util-linux-e130ce53ce87f39f4bee3288d106c681e82dbb86.tar.xz
kernel-qcow2-util-linux-e130ce53ce87f39f4bee3288d106c681e82dbb86.zip
tests: avoid executing dirname(1) command
Bash parameter expansion does the same thing. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'tests/ts/mount')
-rwxr-xr-xtests/ts/mount/devname2
-rwxr-xr-xtests/ts/mount/fstab-broken2
-rwxr-xr-xtests/ts/mount/fstab-devname2
-rwxr-xr-xtests/ts/mount/fstab-devname2label2
-rwxr-xr-xtests/ts/mount/fstab-devname2uuid2
-rwxr-xr-xtests/ts/mount/fstab-label2
-rwxr-xr-xtests/ts/mount/fstab-label2devname2
-rwxr-xr-xtests/ts/mount/fstab-label2uuid2
-rwxr-xr-xtests/ts/mount/fstab-none2
-rwxr-xr-xtests/ts/mount/fstab-symlink2
-rwxr-xr-xtests/ts/mount/fstab-uuid2
-rwxr-xr-xtests/ts/mount/fstab-uuid2devname2
-rwxr-xr-xtests/ts/mount/fstab-uuid2label2
-rwxr-xr-xtests/ts/mount/label2
-rwxr-xr-xtests/ts/mount/move2
-rwxr-xr-xtests/ts/mount/noncanonical2
-rwxr-xr-xtests/ts/mount/paths2
-rwxr-xr-xtests/ts/mount/regfile2
-rwxr-xr-xtests/ts/mount/remount2
-rwxr-xr-xtests/ts/mount/rlimit2
-rwxr-xr-xtests/ts/mount/shared-subtree2
-rwxr-xr-xtests/ts/mount/special2
-rwxr-xr-xtests/ts/mount/umount-alltargets2
-rwxr-xr-xtests/ts/mount/umount-recursive2
-rwxr-xr-xtests/ts/mount/uuid2
25 files changed, 25 insertions, 25 deletions
diff --git a/tests/ts/mount/devname b/tests/ts/mount/devname
index 8f32ef1ae..016a16e0e 100755
--- a/tests/ts/mount/devname
+++ b/tests/ts/mount/devname
@@ -16,7 +16,7 @@
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by devname"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/fstab-broken b/tests/ts/mount/fstab-broken
index 48fe1a18d..522453503 100755
--- a/tests/ts/mount/fstab-broken
+++ b/tests/ts/mount/fstab-broken
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="broken fstab"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/fstab-devname b/tests/ts/mount/fstab-devname
index 9af8db648..9cf73e008 100755
--- a/tests/ts/mount/fstab-devname
+++ b/tests/ts/mount/fstab-devname
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by devname (fstab)"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/fstab-devname2label b/tests/ts/mount/fstab-devname2label
index 34214dbcb..63e8126f9 100755
--- a/tests/ts/mount/fstab-devname2label
+++ b/tests/ts/mount/fstab-devname2label
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by devname (fstab label)"
LABEL="testMountD2L"
diff --git a/tests/ts/mount/fstab-devname2uuid b/tests/ts/mount/fstab-devname2uuid
index 859bcda47..8cdf946e5 100755
--- a/tests/ts/mount/fstab-devname2uuid
+++ b/tests/ts/mount/fstab-devname2uuid
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by devname (fstab uuid)"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/fstab-label b/tests/ts/mount/fstab-label
index 2c1e7eb5d..5e8a97a0f 100755
--- a/tests/ts/mount/fstab-label
+++ b/tests/ts/mount/fstab-label
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by label (fstab)"
LABEL="testFstabLabel"
diff --git a/tests/ts/mount/fstab-label2devname b/tests/ts/mount/fstab-label2devname
index 0d10f1b89..1bb8d042c 100755
--- a/tests/ts/mount/fstab-label2devname
+++ b/tests/ts/mount/fstab-label2devname
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by label (fstab devname)"
LABEL="testMountL2D"
diff --git a/tests/ts/mount/fstab-label2uuid b/tests/ts/mount/fstab-label2uuid
index 0ad4f050b..ba63a38ea 100755
--- a/tests/ts/mount/fstab-label2uuid
+++ b/tests/ts/mount/fstab-label2uuid
@@ -16,7 +16,7 @@
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by label (fstab uuid)"
LABEL="testMountL2U"
diff --git a/tests/ts/mount/fstab-none b/tests/ts/mount/fstab-none
index 62a89ca44..1a8fa78e4 100755
--- a/tests/ts/mount/fstab-none
+++ b/tests/ts/mount/fstab-none
@@ -1,6 +1,6 @@
#!/bin/bash
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="none"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/fstab-symlink b/tests/ts/mount/fstab-symlink
index 7f9d91f7b..c8d5eec72 100755
--- a/tests/ts/mount/fstab-symlink
+++ b/tests/ts/mount/fstab-symlink
@@ -16,7 +16,7 @@
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by devname (fstab symlink)"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/fstab-uuid b/tests/ts/mount/fstab-uuid
index 8c65b4d9e..a0394a4ff 100755
--- a/tests/ts/mount/fstab-uuid
+++ b/tests/ts/mount/fstab-uuid
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by uuid (fstab)"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/fstab-uuid2devname b/tests/ts/mount/fstab-uuid2devname
index 51bac141a..572291146 100755
--- a/tests/ts/mount/fstab-uuid2devname
+++ b/tests/ts/mount/fstab-uuid2devname
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by uuid (fstab devname)"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/fstab-uuid2label b/tests/ts/mount/fstab-uuid2label
index 442cdb7e3..098f43bad 100755
--- a/tests/ts/mount/fstab-uuid2label
+++ b/tests/ts/mount/fstab-uuid2label
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by uuid (fstab label)"
LABEL="testMountU2L"
diff --git a/tests/ts/mount/label b/tests/ts/mount/label
index 873ea95a5..2dda82530 100755
--- a/tests/ts/mount/label
+++ b/tests/ts/mount/label
@@ -16,7 +16,7 @@
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by label"
LABEL="testMountLabel"
diff --git a/tests/ts/mount/move b/tests/ts/mount/move
index ea376856a..dc130d484 100755
--- a/tests/ts/mount/move
+++ b/tests/ts/mount/move
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="move"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/noncanonical b/tests/ts/mount/noncanonical
index 1d28304e0..a5402d3d9 100755
--- a/tests/ts/mount/noncanonical
+++ b/tests/ts/mount/noncanonical
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="non canonical path"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/paths b/tests/ts/mount/paths
index 0b3432bd9..8a6ed352b 100755
--- a/tests/ts/mount/paths
+++ b/tests/ts/mount/paths
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="basic paths"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/regfile b/tests/ts/mount/regfile
index 8d786adbf..b342ececd 100755
--- a/tests/ts/mount/regfile
+++ b/tests/ts/mount/regfile
@@ -3,7 +3,7 @@
# Copyright (C) 2011 Karel Zak <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
diff --git a/tests/ts/mount/remount b/tests/ts/mount/remount
index 051c595a8..c6c772f91 100755
--- a/tests/ts/mount/remount
+++ b/tests/ts/mount/remount
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="remount"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/rlimit b/tests/ts/mount/rlimit
index 7d7e42bbc..dc7a2c821 100755
--- a/tests/ts/mount/rlimit
+++ b/tests/ts/mount/rlimit
@@ -23,7 +23,7 @@
# calls are successful.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="rlimit-fsize"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/shared-subtree b/tests/ts/mount/shared-subtree
index 995aed204..c0716de2b 100755
--- a/tests/ts/mount/shared-subtree
+++ b/tests/ts/mount/shared-subtree
@@ -1,6 +1,6 @@
#!/bin/bash
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="shared-subtree"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/special b/tests/ts/mount/special
index 6e198b3b3..633f23df8 100755
--- a/tests/ts/mount/special
+++ b/tests/ts/mount/special
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="call mount.<type>"
MOUNTER="/sbin/mount.mytest"
diff --git a/tests/ts/mount/umount-alltargets b/tests/ts/mount/umount-alltargets
index 434ecab2d..e6a284727 100755
--- a/tests/ts/mount/umount-alltargets
+++ b/tests/ts/mount/umount-alltargets
@@ -2,7 +2,7 @@
# Copyright (C) 2013 Karel Zak <kzak@redhat.com>
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="umount-all-targets"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/umount-recursive b/tests/ts/mount/umount-recursive
index 85e54df7a..83d6dee3c 100755
--- a/tests/ts/mount/umount-recursive
+++ b/tests/ts/mount/umount-recursive
@@ -2,7 +2,7 @@
# Copyright (C) 2012 Karel Zak <kzak@redhat.com>
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="umount-recursive"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/mount/uuid b/tests/ts/mount/uuid
index e29ad3929..14df0b140 100755
--- a/tests/ts/mount/uuid
+++ b/tests/ts/mount/uuid
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="by uuid"
. $TS_TOPDIR/functions.sh