]> err.no Git - util-linux/commitdiff
tests: check for mtab
authorKarel Zak <kzak@redhat.com>
Wed, 22 Dec 2010 12:13:45 +0000 (13:13 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 3 Jan 2011 11:28:48 +0000 (12:28 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/mount/devname
tests/ts/mount/mtablock

index 0448a4b34a04bbf6fea4d5d7c337f44b31728a19..4cbd08711f2bb7261a8878d9dd6456d78745358e 100755 (executable)
@@ -38,8 +38,14 @@ $TS_CMD_MOUNT $DEVICE $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
 
 ts_is_mounted $DEVICE || ts_die "Cannot found $DEVICE in /proc/mounts" $DEVICE
 
+grep -q $DEVICE /etc/mtab ||
+       echo "mount failed: cannot found $DEVICE in mtab" >> $TS_OUTPUT 2>&1
+
 $TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE" $DEVICE
 
+grep -q $DEVICE /etc/mtab &&
+       echo "umount failed: found $DEVICE in mtab" >> $TS_OUTPUT 2>&1
+
 ts_device_deinit $DEVICE
 
 ts_log "Success"
index b9f710ef8eb1d2ab84073066c37218af0130783b..445e893e3dae115a8d483ea45ddc14d306ba4914 100755 (executable)
@@ -23,7 +23,7 @@ ts_init "$*"
 ts_skip_nonroot
 
 if [ ! -x "$TS_CMD_MTABLOCK" ]; then
-       ts_slip "not compiled"
+       ts_skip "not compiled"
 fi
 
 #