summaryrefslogtreecommitdiffstats
path: root/tests/ts/libmount
diff options
context:
space:
mode:
authorKarel Zak2016-08-04 15:09:05 +0200
committerKarel Zak2016-08-04 15:15:12 +0200
commit041d33734e845a5fab328ef63771863b445f21dc (patch)
treecf030b141cee070ab47351380e95e8fccabe2cfe /tests/ts/libmount
parenttests: fix libmount loop-overlay test (diff)
downloadkernel-qcow2-util-linux-041d33734e845a5fab328ef63771863b445f21dc.tar.gz
kernel-qcow2-util-linux-041d33734e845a5fab328ef63771863b445f21dc.tar.xz
kernel-qcow2-util-linux-041d33734e845a5fab328ef63771863b445f21dc.zip
tests: fix loop-overlay test
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts/libmount')
-rwxr-xr-xtests/ts/libmount/loop-overlay7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/ts/libmount/loop-overlay b/tests/ts/libmount/loop-overlay
index 6d4b3e4af..97eb32118 100755
--- a/tests/ts/libmount/loop-overlay
+++ b/tests/ts/libmount/loop-overlay
@@ -26,16 +26,17 @@ ts_check_test_command "$TS_CMD_MOUNT"
ts_check_test_command "$TS_CMD_UMOUNT"
ts_skip_nonroot
+ts_check_losetup
ts_check_prog "mkfs.ext3"
ts_check_prog "dd"
ts_check_prog "stat"
-IMG=$(ts_image_init)
+IMG=$(ts_image_init 5)
-mkfs.ext3 -F "$IMG" &> /dev/null || ts_die "Cannot make ext3 on $IMG"
+mkfs.ext2 -F "$IMG" &> /dev/null || ts_die "Cannot make extn on $IMG"
OFFSET=$(stat -c %s "$IMG")
-dd if="$IMG" of="$IMG" oflag=append bs=5MiB count=1 conv=notrunc status=none
+dd if="$IMG" of="$IMG" oflag=append bs=5MiB count=1 conv=notrunc &>/dev/null
[ -d "$TS_MOUNTPOINT-1" ] || mkdir -p $TS_MOUNTPOINT-1
[ -d "$TS_MOUNTPOINT-2" ] || mkdir -p $TS_MOUNTPOINT-2