parted/0022-tests-t6006-Change-dev_size_mb-to-10.patch
Brian C. Lane ce8126ec00 - tests/t3000: Use mkfs.hfsplus and fsck.hfsplus for resize tests (bcl)
- tests/t3000: Check for hfs and vfat support separately (bcl)
- tests: Reduce memory usage for tests using scsi_debug module (bcl)
- spec: Install to /usr/sbin and /usr/lib64 (bcl)
2021-08-03 16:18:33 -07:00

49 lines
1.8 KiB
Diff

From 0caf2d7f1363b9c4b3b63cf7d3a1260eb5a72f34 Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Mon, 12 Jul 2021 15:30:45 -0700
Subject: [PATCH 22/24] tests/t6006: Change dev_size_mb to 10
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
---
tests/t6006-dm-512b-sectors.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/t6006-dm-512b-sectors.sh b/tests/t6006-dm-512b-sectors.sh
index 2460c49..83bf3b1 100644
--- a/tests/t6006-dm-512b-sectors.sh
+++ b/tests/t6006-dm-512b-sectors.sh
@@ -46,9 +46,9 @@ cleanup_fn_() {
udevadm settle
}
-# Create a 500M device
+# Create a 10M device
ss=$sector_size_
-scsi_debug_setup_ sector_size=$ss dev_size_mb=500 > dev-name ||
+scsi_debug_setup_ sector_size=$ss dev_size_mb=11 > dev-name ||
skip_ 'failed to create scsi_debug device'
scsi_dev=$(cat dev-name)
@@ -58,13 +58,13 @@ scsi_dev_size=$(blockdev --getsz $scsi_dev) || framework_failure
dmsetup create $linear_ --table "0 $scsi_dev_size linear $scsi_dev 0" || framework_failure
dev="/dev/mapper/$linear_"
-# Create msdos partition table with a partition from 1MiB to 100MiB
-parted -s $dev mklabel msdos mkpart primary ext2 1MiB 101MiB > out 2>&1 || fail=1
+# Create msdos partition table with a partition from 1MiB to 10MiB
+parted -s $dev mklabel msdos mkpart primary ext2 1MiB 100% > out 2>&1 || fail=1
compare /dev/null out || fail=1
wait_for_dev_to_appear_ ${dev}1 || fail=1
-# The size of the partition should be 100MiB, or 204800 512b sectors
+# The size of the partition should be 10MiB, or 20480 512b sectors
p1_size=$(blockdev --getsz ${dev}1) || framework_failure
-[ $p1_size == 204800 ] || fail=1
+[ $p1_size == 20480 ] || fail=1
Exit $fail
--
2.31.1