[Spice-devel] [server/tests PATCH 4/6] server/tests: remove option from usage if AUTOMATED_TESTS is not configured

Uri Lublin uril at redhat.com
Wed Jul 17 07:28:22 PDT 2013


On 07/14/2013 03:47 PM, Uri Lublin wrote:
> On 07/14/2013 12:19 PM, Alon Levy wrote:
>> On Tue, 2013-07-09 at 19:15 +0300, Uri Lublin wrote:
>>
>> ACK, just one comment that is nice to fix before pushing.
>>
>>> diff --git a/server/tests/test_display_base.c 
>>> b/server/tests/test_display_base.c
>>> index a4fdae9..3312b11 100644
>>> --- a/server/tests/test_display_base.c
>>> +++ b/server/tests/test_display_base.c
>>>
>>> @@ -878,6 +879,19 @@ void init_automated()
>>>       sigaction(SIGCHLD, &sa, NULL);
>>>   }
>>>   +__attribute__((noreturn))
>>> +void usage(const char *argv0, const int exitcode)
>>> +{
>>> +#ifdef AUTOMATED_TESTS
>>> +    const char *autoopt="[--automated-tests]";
>> Would be slightly nicer to add the space to the string.
>
> There exists a space before the "%s" in the printf's format below.
> Do you mean it would be nicer to have that space in autoopt and
> have the printf format "%s%s\n" ?

Pushed as you've requested with the space in autoopt and the format "%s%s"


>
>>
>>> +#else
>>> +    const char *autoopt="";
>>> +#endif
>>> +
>>> +    printf("usage: %s %s\n", argv0, autoopt);
>>> +    exit(exitcode);
>>> +}
>>> +
>



More information about the Spice-devel mailing list