bug#28153: Test suite fails due to mkpart no longer taking partition label

"A. Wilcox" <[email protected]>
Newsgroups gmane.comp.gnu.parted.bugs
Organization Adélie Linux
Message-ID <[email protected]>
While testing parted 3.2 for our new Linux distribution, I came across a
few test failures; they were all due to 'mkpart' no longer naming
partitions.  I believe this patch to correct this.

Best,
--arw
-- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
http://adelielinux.org
tests-call-name-correctly.patch (text/x-patch, 2 KB)
mkpart syntax recently changed, tests do not reflect that.

--- parted-3.2/tests/t5000-tags.sh.old	2014-06-15 18:17:43.000000000 +0000
+++ parted-3.2/tests/t5000-tags.sh	2017-08-19 18:55:03.207451920 +0000
@@ -48,7 +48,7 @@
 compare exp out || fail=1
 
 # add a partition
-parted -s $dev u s mkpart name1 ${start_sector} ${end_sector} >out 2>&1 \
+parted -s $dev u s mkpart primary ${start_sector} ${end_sector} name 1 name1 >out 2>&1 \
   || fail=1
 
 # print the table before modification
--- parted-3.2/tests/t0208-mkpart-end-in-IEC.sh.old	2014-06-15 18:17:43.000000000 +0000
+++ parted-3.2/tests/t0208-mkpart-end-in-IEC.sh	2017-08-19 20:05:19.650875813 +0000
@@ -25,22 +25,22 @@
 
 dd if=/dev/null of=$dev bs=1M seek=$n_mbs || fail=1
 # create 1st partition
-parted --align=none -s $dev mklabel gpt mkpart p1 1MiB 2MiB > err 2>&1 || fail=1
+parted --align=none -s $dev mklabel gpt mkpart primary 1MiB 2MiB name 1 p1 > err 2>&1 || fail=1
 compare /dev/null err || fail=1  # expect no output
 #parted -m -s $dev u s p > exp || fail=1
 
 # create 2nd partition - they should not overlap
 # this time specify default unit
-parted --align=none -s $dev unit MiB mkpart p2 2 3 > err 2>&1 || fail=1
+parted --align=none -s $dev unit MiB mkpart primary 2 3 name 2 p2 > err 2>&1 || fail=1
 compare /dev/null err || fail=1  # expect no output
 
 # create 3rd partition - expect no overlap
 # specify default unit, but explicitly override it
-parted --align=none -s $dev unit TB mkpart p3 3MiB 4MiB > err 2>&1 || fail=1
+parted --align=none -s $dev unit TB mkpart primary 3MiB 4MiB name 3 p3 > err 2>&1 || fail=1
 compare /dev/null err || fail=1  # expect no output
 
 # Specify default unit of MiB, yet use explicit ending sector number.
-parted --align=none -s $dev unit MiB mkpart p4 4MiB 10239s > err 2>&1 || fail=1
+parted --align=none -s $dev unit MiB mkpart primary 4MiB 10239s name 4 p4 > err 2>&1 || fail=1
 compare /dev/null err || fail=1  # expect no output
 
 # check boundaries of the partitions
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJZmLQgAAoJEMspy1GSK50Uf70P/ivAsCBeRz6qCGf0LLntwArF
xuQsKn9SriP3Tpp1Y+S2enHbOJ3pUaqPIaKVC0IlA6eQ8rCivW+OmUiOWajKBmFe
meYjk7b6azHz2oAzNW0fyP7oF2pK/cITo9q8SQdIH5EfLTqYvmWbNrYdPAi+NL0R
Q35BKjQ8rrACTE84GPDZ4CGsjDgJIDQoEsbxXjhHzx6r5uhfXnhTA2f/sIi9kn1x
GVcp75LD/2vk+5RDb6tXKYuyWwsCaeA9OgmNJrHf/messGUwyREppba4uCEts4sB
be6oMoshWUZJp3Ff5Nsnqh9dng9fRtpt8QcShZKFHQvCR1OmGR2u3QJ2J7gak16a
M9ixyGZV9QFwH60cCiLpkYJGfEOTVW7HNdBcAteAD8begSOscz31BTZIcYUPi9m6
DcaQmBFW98oLCUhFsvEwpr7o1KA07T6mvvGQ3ZnUQXHnoTSv59+QXBYM2y9Qbtz8
r0huxUXjira+7OPJAwv172zUTQUd0V5blhufBOxMClvfZm2fX7pDSvUxM8hlrDjE
08E7KZm60eLmcyB3e70hReGshOVbmWObOqYv9MrBU4KVjnJaNZe4dqGudA0iu1D5
i3BBOOwurMMEREyqjt2MrKaDp/m4PiOamCY+fwqAulgCJ62YAcRkAsM3aOSKedxD
KX/4V7xeOCnBznzgUjIv
=rhnu
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.