]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: add loopdev libmount test
authorKarel Zak <kzak@redhat.com>
Thu, 29 Sep 2011 18:50:27 +0000 (20:50 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Sep 2011 18:50:27 +0000 (20:50 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/libmount/context

index 0b10098234359008acca74e0516498e1b99836da..5a01caebc10b051a7c7b392efb31cd1b58545bcc 100755 (executable)
@@ -116,6 +116,18 @@ grep -q $DEVICE $LIBMOUNT_MTAB &&
 ts_finalize_subtest
 
 
+ts_init_subtest "mount-loopdev"
+mkdir -p $MOUNTPOINT &> /dev/null
+img=$(ts_image_init)
+mkfs.ext3 -F $img &> /dev/null
+$TESTPROG --mount -o loop $img $MOUNTPOINT >> $TS_OUTPUT 2>&1
+grep -q $MOUNTPOINT $LIBMOUNT_MTAB || \
+       echo "(loopdev) cannot find $MOUNTPOINT in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
+$TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
+grep -q $MOUNTPOINT $LIBMOUNT_MTAB &&
+       echo "umount failed: found $MOUNTPOINT in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
 ts_log "...done."
 rmmod scsi_debug
 ts_finalize