summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorRuediger Meier2014-05-15 16:56:18 +0200
committerRuediger Meier2014-05-16 12:07:26 +0200
commitd2cc2ba722d5fd0775855bf6ae977bb66a31c09c (patch)
treedb0abf268bdb5fb748111255fa25d7a289a03991 /tests/functions.sh
parenttests: ts_mount validates error message (diff)
downloadkernel-qcow2-util-linux-d2cc2ba722d5fd0775855bf6ae977bb66a31c09c.tar.gz
kernel-qcow2-util-linux-d2cc2ba722d5fd0775855bf6ae977bb66a31c09c.tar.xz
kernel-qcow2-util-linux-d2cc2ba722d5fd0775855bf6ae977bb66a31c09c.zip
tests: ts_mount knows which fs is expected
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index cc3dc054a..384fccdc8 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -496,6 +496,8 @@ function ts_mount {
local result
local msg
local fs
+ local fs_exp=$1
+ shift
out=$($TS_CMD_MOUNT "$@" 2>&1)
result=$?
@@ -506,7 +508,7 @@ function ts_mount {
then
# skip only if reported fs correctly and if it's not available
fs=$(echo "$msg" | sed -n "s/.*type '\(.*\)'$/\1/p")
- [ -n "$fs" ] \
+ [ "$fs" = "fs_exp" ] \
&& grep -qe "[[:space:]]${fs}$" /proc/filesystems &>/dev/null \
|| ts_skip "$msg"
fi