[libvirt] Entering freeze for libvirt-1.2.4
Eric Blake
eblake at redhat.com
Tue Apr 29 13:14:37 UTC 2014
On 04/29/2014 01:42 AM, Jiri Denemark wrote:
>>
>> I'm currently seeing some test failures on i386 Debian wheezy:
Thanks for doing 32-bit testing.
>>
>> virstoragetest
>> --------------
>>
>> 97) Chain lookup 27 ... index: expected 0, got 4294967295 FAILED
>
> Yeah, our virStrToLong_* APIs are not doing a very good job here. The
> problem is that virStrToLong_ui happily parses -1 as 4294967295 on
> systems where sizeof(unsigned long) == sizeof(unsigned int).
We DO have places in our code base where we WANT to parse -1 as
ULONG_MAX (it is a convenience of virsh to be able to have one spelling
that works for both 32- and 64-bit hosts).
> I'm not
> sure what's the best solution for this. Should we parse the string with
> strtoull instead of strtoul to make it a little bit better since
> unsigned long long will always be bigger than unsigned int? Anyway, I
> hate strtou* for silently parsing negative numbers.
Outright rejecting negative numbers by default in our strto* wrappers
does not feel right; maybe we need to flavors of the unsigned wrappers,
the normal one that accepts negatives, and a new stricter one that
rejects negatives. At any rate, I'll investigate today and propose
something.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140429/db394cf0/attachment-0001.sig>
More information about the libvir-list
mailing list