]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: ts_mount knows which fs is expected
authorRuediger Meier <ruediger.meier@ga-group.nl>
Thu, 15 May 2014 14:56:18 +0000 (16:56 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Fri, 16 May 2014 10:07:26 +0000 (12:07 +0200)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests/functions.sh
tests/ts/minix/mkfs

index cc3dc054aacd50708f0773aae1d17937eac470f3..384fccdc86e64723c7d6f973be36cddb8dcb3a64 100644 (file)
@@ -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
index f664e3525914b2df9cd2c4b1e43963a8e25c5768..86230f77ce31038a3d5f919de2f4ce7ec30ef7ca 100755 (executable)
@@ -37,7 +37,7 @@ ts_log "create mountpoint dir"
 [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
 
 ts_log "mount the filesystem"
-ts_mount $DEVICE $TS_MOUNTPOINT
+ts_mount "minix" $DEVICE $TS_MOUNTPOINT
 
 # check it
 ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts" $DEVICE