Phillip Susi wrote: > 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.
The tests records parted's behavior in this case. Of course, we know that parted depends on the kernel, so you can look at it as testing kernel behavior, too. IMHO, that is fine. The kernel is, after all, the reason Colin wrote this change for parted. >> 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. I will repeat: Would you like to propose something else that does the same job? >> 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. It was addressed by the change right after the one that added that new test: 713322fa88e097b5bcaae36ad5b6a41d1acc6db3

