Re: [PATCHv2] conf: more useful error message when pci function is out of range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/28/2015 08:53 AM, Ján Tomko wrote:
> On Thu, Jul 23, 2015 at 04:37:05PM -0400, Laine Stump wrote:
>> (The RNG for PCI
>> addresses already enforces this limit, which by the way means that we
>> can't add any negative tests for this - as far as I know our
>> domainschematest has no provisions for passing XML that is supposed to
>> fail).
>>
> Any XML file with a name ending in *-invalid.xml is expected to fail
> validation, see tests/schematestutils.sh

Cool! I added a negative schema and parse test for each of domain, bus,
slot, and function before I pushed.


>> -int virDevicePCIAddressIsValid(virDevicePCIAddressPtr addr)
>> +int virDevicePCIAddressIsValid(virDevicePCIAddressPtr addr,
> Returning bool would match the usage more closely, but that's
> pre-existing.

Yeah, I had thought of changing that, but if I changed the return of
this function, I would need to change the return type of
virDomainDeviceAddressIsValid(), and then
virDomainDeviceCCWAddressIsValid() (since it's used in
virDomainDeviceAddressIsValid() identically to
virDevicePCIAddressIsValid()). Fortunately it would have stopped there
(as all the uses of all three functions essentially behave as if they
returned bool anyway), but it seemed like a bit too much change
unrelated to fixing the bug.

I've finally pushed this patch. Thanks for the review!

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]