[libvirt] [PATCH 1/3] tests: virnetsockettest: Print the error if getifaddrs fails.

Eric Blake eblake at redhat.com
Wed Jan 1 16:49:56 UTC 2014


On 01/01/2014 09:24 AM, Eric Blake wrote:
> On 01/01/2014 08:49 AM, Richard W.M. Jones wrote:
>> From: "Richard W.M. Jones" <rjones at redhat.com>
>>
>> ---
>>  tests/virnetsockettest.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c
>> index eda95bc..82c202e 100644
>> --- a/tests/virnetsockettest.c
>> +++ b/tests/virnetsockettest.c
>> @@ -60,8 +60,10 @@ checkProtocols(bool *hasIPv4, bool *hasIPv6,
>>      *hasIPv4 = *hasIPv6 = false;
>>      *freePort = 0;
>>  
>> -    if (getifaddrs(&ifaddr) < 0)
>> +    if (getifaddrs(&ifaddr) < 0) {
>> +        perror ("getifaddrs");
>>          goto cleanup;
>> +    }
> 
> ACK.  Doesn't change pass/fail status, but makes debugging failure nicer.

Jenkins caught you.  'make syntax-check' would have warned you about the
spurious space in the function call.  I'll push the obvious fix.

-- 
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/20140101/eb2ab335/attachment-0001.sig>


More information about the libvir-list mailing list