parted/tests-adapt-to-SUSE.patch

122 lines
4.2 KiB
Diff
Raw Normal View History

From: Sebastian Parschauer <sparschauer@suse.de>
Date: Wed Sep 13 11:14:42 2017 +0200
Subject: tests: Adapt to SUSE parted
Patch-mainline: no, custom SUSE patch
msdos type flag
Tests: t0283, t2200, t2310, t3200, t3300, t4100, t6002, t9042
For: parted-type.patch
Change dm partition name from 'pN' to '-partN'
Tests: t6001, t6002, t6004, t6005
For: libparted-partition-naming.patch
---
Accepting request 760713 from home:anicka:branches:Base:System - fix crash in do_resizepart + parted-fix-end_input-usage.patch: Fix end_input usage in do_resizepart - update to version 3.3, noteworthy changes: - s390: Re-enabled virtio-attached DASD heuristics by using HDIO_GETGEO when probing device geometry. Fixes a bug with KVM virtio-blk backed by a DASD. Parted now recognizes NVMe devices, NVDIMM, and RAM drives. - Fix atari disklabel false positives by probing other labels first. - Fix resizepart to adjust the end to be -1 sector when using iec power of 2 units so that the next partition can start immediately following the new end, just like mkpart does. - Fix set and disk_set to not crash when there are no flags to set. - Fix a udev cookie leak when using resizepart on device-mapper devices. - Fix a gettext crash/error sometimes when using localized languages. - Fix fat resize to preverve boot code, and thus not render the filesystem unreconized by Windows. - Fix rescue command: the rescue command often failed to find filesystems due to leaving on cylinder alignment. - libparted-fs-resize: Prevent crash resizing FAT file systems with very deep directories with path names over 512 bytes long. - Use 512b sector size when communicating with device-mapper. Fixes problems with partitions being created too small on dm devices with sector sizes > 5121b - Don't crash in the disk_set command when a disk label is not found - libparted-fs-resize: Prevent crash resizing FAT16 file systems. - libparted-fs-resize: Prevent crash resizing FAT16 file systems. - If the user specifies start/end of the partition as cylinders and a cylinder has a size which is power of 2, then such address OBS-URL: https://build.opensuse.org/request/show/760713 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=144
2020-01-12 14:40:37 +01:00
Index: parted-3.3/tests/t6001-psep.sh
===================================================================
--- parted-3.3.orig/tests/t6001-psep.sh
+++ parted-3.3/tests/t6001-psep.sh
@@ -31,9 +31,9 @@ linear2_=plinear-$$foo
d1= d2=
f1= f2=
cleanup_fn_() {
- dmsetup remove ${linear_}p1
+ dmsetup remove ${linear_}-part1
dmsetup remove $linear_
- dmsetup remove ${linear2_}1
+ dmsetup remove ${linear2_}-part1
dmsetup remove $linear2_
test -n "$d1" && losetup -d "$d1"
test -n "$d2" && losetup -d "$d2"
@@ -56,7 +56,7 @@ parted -s $dev mklabel msdos mkpart prim
compare /dev/null out || fail=1
#make sure device name is correct
-wait_for_dev_to_appear_ ${dev}p1 || fail=1
+wait_for_dev_to_appear_ ${dev}-part1 || fail=1
#repeat on name not ending in a digit
# setup: create a mapping
@@ -68,7 +68,7 @@ parted -s $dev mklabel msdos mkpart prim
compare /dev/null out || fail=1
#make sure device name is correct
-wait_for_dev_to_appear_ ${dev}1 || fail=1
+wait_for_dev_to_appear_ ${dev}-part1 || fail=1
if [ -n "$fail" ]; then
ls /dev/mapper
Accepting request 760713 from home:anicka:branches:Base:System - fix crash in do_resizepart + parted-fix-end_input-usage.patch: Fix end_input usage in do_resizepart - update to version 3.3, noteworthy changes: - s390: Re-enabled virtio-attached DASD heuristics by using HDIO_GETGEO when probing device geometry. Fixes a bug with KVM virtio-blk backed by a DASD. Parted now recognizes NVMe devices, NVDIMM, and RAM drives. - Fix atari disklabel false positives by probing other labels first. - Fix resizepart to adjust the end to be -1 sector when using iec power of 2 units so that the next partition can start immediately following the new end, just like mkpart does. - Fix set and disk_set to not crash when there are no flags to set. - Fix a udev cookie leak when using resizepart on device-mapper devices. - Fix a gettext crash/error sometimes when using localized languages. - Fix fat resize to preverve boot code, and thus not render the filesystem unreconized by Windows. - Fix rescue command: the rescue command often failed to find filesystems due to leaving on cylinder alignment. - libparted-fs-resize: Prevent crash resizing FAT file systems with very deep directories with path names over 512 bytes long. - Use 512b sector size when communicating with device-mapper. Fixes problems with partitions being created too small on dm devices with sector sizes > 5121b - Don't crash in the disk_set command when a disk label is not found - libparted-fs-resize: Prevent crash resizing FAT16 file systems. - libparted-fs-resize: Prevent crash resizing FAT16 file systems. - If the user specifies start/end of the partition as cylinders and a cylinder has a size which is power of 2, then such address OBS-URL: https://build.opensuse.org/request/show/760713 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=144
2020-01-12 14:40:37 +01:00
Index: parted-3.3/tests/t6004-dm-many-partitions.sh
===================================================================
--- parted-3.3.orig/tests/t6004-dm-many-partitions.sh
+++ parted-3.3/tests/t6004-dm-many-partitions.sh
@@ -50,10 +50,10 @@ parted -m -a min -s /dev/mapper/$dm_name
# Make sure all the partitions appeared under /dev/mapper/
for ((i=1; i<=$n_partitions; i+=1)); do
- wait_for_dev_to_appear_ "/dev/mapper/${dm_name}p$i" || { fail=1; break; }
+ wait_for_dev_to_appear_ "/dev/mapper/${dm_name}-part$i" || { fail=1; break; }
# remove the partitions as we go, otherwise cleanup won't work.
- dmsetup remove /dev/mapper/${dm_name}p$i
+ dmsetup remove /dev/mapper/${dm_name}-part$i
done
Exit $fail
Accepting request 760713 from home:anicka:branches:Base:System - fix crash in do_resizepart + parted-fix-end_input-usage.patch: Fix end_input usage in do_resizepart - update to version 3.3, noteworthy changes: - s390: Re-enabled virtio-attached DASD heuristics by using HDIO_GETGEO when probing device geometry. Fixes a bug with KVM virtio-blk backed by a DASD. Parted now recognizes NVMe devices, NVDIMM, and RAM drives. - Fix atari disklabel false positives by probing other labels first. - Fix resizepart to adjust the end to be -1 sector when using iec power of 2 units so that the next partition can start immediately following the new end, just like mkpart does. - Fix set and disk_set to not crash when there are no flags to set. - Fix a udev cookie leak when using resizepart on device-mapper devices. - Fix a gettext crash/error sometimes when using localized languages. - Fix fat resize to preverve boot code, and thus not render the filesystem unreconized by Windows. - Fix rescue command: the rescue command often failed to find filesystems due to leaving on cylinder alignment. - libparted-fs-resize: Prevent crash resizing FAT file systems with very deep directories with path names over 512 bytes long. - Use 512b sector size when communicating with device-mapper. Fixes problems with partitions being created too small on dm devices with sector sizes > 5121b - Don't crash in the disk_set command when a disk label is not found - libparted-fs-resize: Prevent crash resizing FAT16 file systems. - libparted-fs-resize: Prevent crash resizing FAT16 file systems. - If the user specifies start/end of the partition as cylinders and a cylinder has a size which is power of 2, then such address OBS-URL: https://build.opensuse.org/request/show/760713 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=144
2020-01-12 14:40:37 +01:00
Index: parted-3.3/tests/t6005-dm-uuid.sh
===================================================================
--- parted-3.3.orig/tests/t6005-dm-uuid.sh
+++ parted-3.3/tests/t6005-dm-uuid.sh
@@ -47,14 +47,14 @@ for ((i=1; i<=$n_partitions; i+=1)); do
cmd="$cmd mkpart p$i ${s}s ${s}s"
done
parted -m -a min -s /dev/mapper/$dm_name mklabel gpt $cmd > /dev/null 2>&1 || fail=1
-wait_for_dev_to_appear_ /dev/mapper/${dm_name}p${n_partitions} || fail=1
+wait_for_dev_to_appear_ /dev/mapper/${dm_name}-part${n_partitions} || fail=1
# Make sure all the partitions have UUIDs
for ((i=1; i<=$n_partitions; i+=1)); do
- dmsetup info /dev/mapper/${dm_name}p$i | grep UUID || fail=1
+ dmsetup info /dev/mapper/${dm_name}-part$i | grep UUID || fail=1
# remove the partitions as we go, otherwise cleanup won't work.
- dmsetup remove /dev/mapper/${dm_name}p$i
+ dmsetup remove /dev/mapper/${dm_name}-part$i
done
Exit $fail
Accepting request 760713 from home:anicka:branches:Base:System - fix crash in do_resizepart + parted-fix-end_input-usage.patch: Fix end_input usage in do_resizepart - update to version 3.3, noteworthy changes: - s390: Re-enabled virtio-attached DASD heuristics by using HDIO_GETGEO when probing device geometry. Fixes a bug with KVM virtio-blk backed by a DASD. Parted now recognizes NVMe devices, NVDIMM, and RAM drives. - Fix atari disklabel false positives by probing other labels first. - Fix resizepart to adjust the end to be -1 sector when using iec power of 2 units so that the next partition can start immediately following the new end, just like mkpart does. - Fix set and disk_set to not crash when there are no flags to set. - Fix a udev cookie leak when using resizepart on device-mapper devices. - Fix a gettext crash/error sometimes when using localized languages. - Fix fat resize to preverve boot code, and thus not render the filesystem unreconized by Windows. - Fix rescue command: the rescue command often failed to find filesystems due to leaving on cylinder alignment. - libparted-fs-resize: Prevent crash resizing FAT file systems with very deep directories with path names over 512 bytes long. - Use 512b sector size when communicating with device-mapper. Fixes problems with partitions being created too small on dm devices with sector sizes > 5121b - Don't crash in the disk_set command when a disk label is not found - libparted-fs-resize: Prevent crash resizing FAT16 file systems. - libparted-fs-resize: Prevent crash resizing FAT16 file systems. - If the user specifies start/end of the partition as cylinders and a cylinder has a size which is power of 2, then such address OBS-URL: https://build.opensuse.org/request/show/760713 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=144
2020-01-12 14:40:37 +01:00
Index: parted-3.3/tests/t6002-dm-busy.sh
===================================================================
--- parted-3.3.orig/tests/t6002-dm-busy.sh
+++ parted-3.3/tests/t6002-dm-busy.sh
@@ -35,9 +35,9 @@ d1=
f1=
dev=
cleanup_fn_() {
- umount "${dev}p2" > /dev/null 2>&1
- dmsetup remove ${linear_}p1
- dmsetup remove ${linear_}p2
+ umount "${dev}-part2" > /dev/null 2>&1
+ dmsetup remove ${linear_}-part1
+ dmsetup remove ${linear_}-part2
dmsetup remove $linear_
test -n "$d1" && losetup -d "$d1"
rm -f "$f1"
@@ -62,14 +62,14 @@ parted -s $dev -a none mkpart primary fa
compare /dev/null out || fail=1
# wait for new partition device to appear
-wait_for_dev_to_appear_ ${dev}p2 || fail_ ${dev}p2 did not appear
+wait_for_dev_to_appear_ ${dev}-part2 || fail_ ${dev}-part2 did not appear
-mkfs.vfat -F 32 ${dev}p2 || fail_ mkfs.vfat failed
+mkfs.vfat -F 32 ${dev}-part2 || fail_ mkfs.vfat failed
mount_point=$(pwd)/mnt
mkdir $mount_point || fail=1
-mount "${dev}p2" "$mount_point" || fail=1
+mount "${dev}-part2" "$mount_point" || fail=1
# Removal of unmounted partition must succeed.
parted -s "$dev" rm 1 > /dev/null 2>&1 || fail=1