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

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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