summaryrefslogtreecommitdiffstats
path: root/tests/ts/misc
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/misc
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/misc')
-rwxr-xr-xtests/ts/misc/fallocate2
-rwxr-xr-xtests/ts/misc/getopt2
-rwxr-xr-xtests/ts/misc/ionice2
-rwxr-xr-xtests/ts/misc/line2
-rwxr-xr-xtests/ts/misc/mcookie2
-rwxr-xr-xtests/ts/misc/rev2
-rwxr-xr-xtests/ts/misc/setarch2
-rwxr-xr-xtests/ts/misc/setsid2
-rwxr-xr-xtests/ts/misc/strtosize2
-rwxr-xr-xtests/ts/misc/ul2
-rwxr-xr-xtests/ts/misc/whereis2
11 files changed, 11 insertions, 11 deletions
diff --git a/tests/ts/misc/fallocate b/tests/ts/misc/fallocate
index 735baab0f..b39794a1f 100755
--- a/tests/ts/misc/fallocate
+++ b/tests/ts/misc/fallocate
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="fallocate"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/getopt b/tests/ts/misc/getopt
index a6b91cb53..082e41170 100755
--- a/tests/ts/misc/getopt
+++ b/tests/ts/misc/getopt
@@ -15,7 +15,7 @@
# This test script is modified version of 'getopt-parse.bash' example
# file in misc/ directory.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="getopt"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/ionice b/tests/ts/misc/ionice
index d0cca8e8f..29f4d6164 100755
--- a/tests/ts/misc/ionice
+++ b/tests/ts/misc/ionice
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="ionice"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/line b/tests/ts/misc/line
index 3863a3f89..2acf2d217 100755
--- a/tests/ts/misc/line
+++ b/tests/ts/misc/line
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="line"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/mcookie b/tests/ts/misc/mcookie
index 9e650b26b..c5051bcea 100755
--- a/tests/ts/misc/mcookie
+++ b/tests/ts/misc/mcookie
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="mcookie"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/rev b/tests/ts/misc/rev
index 035ce8230..5b95f289a 100755
--- a/tests/ts/misc/rev
+++ b/tests/ts/misc/rev
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="rev"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/setarch b/tests/ts/misc/setarch
index 805055688..62e00707c 100755
--- a/tests/ts/misc/setarch
+++ b/tests/ts/misc/setarch
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="setarch"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/setsid b/tests/ts/misc/setsid
index 43a76f9b5..a758c1273 100755
--- a/tests/ts/misc/setsid
+++ b/tests/ts/misc/setsid
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="setsid"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/strtosize b/tests/ts/misc/strtosize
index 7fb2ff996..4b08b5e56 100755
--- a/tests/ts/misc/strtosize
+++ b/tests/ts/misc/strtosize
@@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="strtosize"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/ul b/tests/ts/misc/ul
index bc0ecf74f..974a7f25e 100755
--- a/tests/ts/misc/ul
+++ b/tests/ts/misc/ul
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="ul"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/misc/whereis b/tests/ts/misc/whereis
index 853b27a65..98441193b 100755
--- a/tests/ts/misc/whereis
+++ b/tests/ts/misc/whereis
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="whereis"
. $TS_TOPDIR/functions.sh