summaryrefslogtreecommitdiffstats
path: root/tests/ts/dmesg
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/dmesg
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/dmesg')
-rwxr-xr-xtests/ts/dmesg/console-levels2
-rwxr-xr-xtests/ts/dmesg/decode2
-rwxr-xr-xtests/ts/dmesg/delta2
-rwxr-xr-xtests/ts/dmesg/facilities2
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/ts/dmesg/console-levels b/tests/ts/dmesg/console-levels
index b87d3fd83..7f21d9ab4 100755
--- a/tests/ts/dmesg/console-levels
+++ b/tests/ts/dmesg/console-levels
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="levels"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/dmesg/decode b/tests/ts/dmesg/decode
index a1afa6fdf..0519a0200 100755
--- a/tests/ts/dmesg/decode
+++ b/tests/ts/dmesg/decode
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="decode"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/dmesg/delta b/tests/ts/dmesg/delta
index 774ffb12f..2ad247746 100755
--- a/tests/ts/dmesg/delta
+++ b/tests/ts/dmesg/delta
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="delta"
. $TS_TOPDIR/functions.sh
diff --git a/tests/ts/dmesg/facilities b/tests/ts/dmesg/facilities
index 1b7b0d4c9..e503c1a13 100755
--- a/tests/ts/dmesg/facilities
+++ b/tests/ts/dmesg/facilities
@@ -12,7 +12,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-TS_TOPDIR="$(dirname $0)/../.."
+TS_TOPDIR="${0%/*}/../.."
TS_DESC="facilities"
. $TS_TOPDIR/functions.sh