From: Karel Zak Date: Thu, 29 Sep 2011 18:50:27 +0000 (+0200) Subject: tests: add loopdev libmount test X-Git-Tag: v2.21-rc1~369 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=faa9d6431f831bcf6b6f3d962da7451a4d3e9e7f;p=thirdparty%2Futil-linux.git tests: add loopdev libmount test Signed-off-by: Karel Zak --- diff --git a/tests/ts/libmount/context b/tests/ts/libmount/context index 0b10098234..5a01caebc1 100755 --- a/tests/ts/libmount/context +++ b/tests/ts/libmount/context @@ -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