[parted-devel] [PATCH 2/4] libparted: remove extraneous blkpg add partition ped exception

Phillip Susi psusi at ubuntu.com
Thu Jan 12 15:11:15 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 1/12/2012 9:54 AM, Jim Meyering wrote:
> That test is testing parted behavior. Before the change that
> provoked the addition of that test, parted would allow one to
> violate the 2-sector rule. This test ensures that parted now
> rejects such attempts.

It isn't testing that parted is rejecting the attempt; it is testing
that the kernel is.  The error messages that the test is looking for
are the result of parted issuing the ioctl to the kernel to add the
partition, and that ioctl unexpectedly failing.

> If someday the linux kernel changes how it treats such attempts,
> then we'll adjust the test.

The test shouldn't care whether the kernel rejects it or not.  If
parted is supposed to issue a warning when you try, then the test
should check for that warning.  The test suite should not care whether
the kernel actually fails it or not.

> The change was prompted by a real bug report. Would you like to
> propose an alternate fix or a change to the test of that new
> behavior?

What change?  How was the bug addressed, because it does not appear to
have been addressed from parted's perspective.

I *thought* that parted was supposed to automatically adjust the
partition to leave that room, and if it can't, throw an exception.
That would be parted behavior and as such, should be validated by the
test suite.  Once the request actually makes it to the kernel though,
parted should not care whether it succeeds or not.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPDvgTAAoJEJrBOlT6nu75RlEIANKGLkcCWbm6cFxsSsvzv+Rd
GRELRMJto39JuV1Ir/Lia3wJ1A022Arx7pqKCA35CJT0gEVYmiel11Ybbuvd1Af3
JiDgTpsPmAtMJNUJtt8WA8va7qgPFLh/fJU/ndpYYu3DaVrslfz5GDa34JxCv42K
xNK2A8L4zVE8k+p9wAghxLQZjr3zWKZNVN8Q3Hrq0Gijkz5MleyngKtSIZGilF4d
J8W3hni7KZJijnTinGXB3rjv+P0LS7mfj9gLz6nuMyO9iHs5DdOXp24IRlWDY0ht
ezy6AlXux3GXXyI0GJ1ftOKbsU5jQSCxTThHhfRJRUAPy564g26KjZT8rVxc3tQ=
=pWa7
-----END PGP SIGNATURE-----



More information about the parted-devel mailing list