[libvirt] testsuite formatting bugs [was: [PATCH] Skip some xen tests if xend is not running]

Eric Blake eblake at redhat.com
Sat Jul 9 13:35:51 UTC 2011


On 07/09/2011 03:53 AM, Matthias Bolte wrote:
>>     if (!virTestGetVerbose()) {
> 
> When we add && ret != EXIT_AM_SKIP here ...

as you did in
https://www.redhat.com/archives/libvir-list/2011-July/msg00522.html

> 
>> -        int i;
>> -        for (i = (testCounter % 40) ; i > 0 && i < 40 ; i++)
>> -            fprintf(stderr, " ");
>> -        fprintf(stderr, " %-3d %s\n", testCounter, ret == 0 ? "OK" :
>> "FAIL");
>> +        if (testCounter == 0 || testCounter % 40)
>> +            fprintf(stderr, "%*s", 40 - (testCounter % 40), "");
>> +        fprintf(stderr, " %-3d %s\n", testCounter,
>> +                ret == 0 ? "OK" : ret == EXIT_AM_SKIP ? "SKIP" : "FAIL");
> 
> .. then we don't need to handle EXIT_AM_SKIP here.

I'll wait until your patches are in, at which point, I think the only
thing left is just the fprintf optimization to avoid the loop (that is,
only the first two lines out of the four + in the above hunk).

> 
> ACK.
> 

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110709/806c194f/attachment-0001.sig>


More information about the libvir-list mailing list