On 3/19/19 7:36 AM, Andrea Bolognani wrote:
> On Thu, 2019-03-14 at 10:43 -0400, Cole Robinson wrote:
> [...]
>> +typedef enum {
>> +ARG_QEMU_CAPS = 1,
>
> Any specific reason to start from 1 rather than 0, or even leaving
> out the start value entirely?
>
Nope it's not necessary, I've
On Fri, 2019-03-15 at 14:47 -0400, Cole Robinson wrote:
> On 3/14/19 4:29 PM, Eric Blake wrote:
> > On 3/14/19 2:42 PM, Cole Robinson wrote:
> > > The double sentinel is actually a requirement of the current code,
> > > because once we see ARG_QEMU_CAPS, we pass off the va_list to
> > >
On Thu, 2019-03-14 at 10:43 -0400, Cole Robinson wrote:
[...]
> +typedef enum {
> +ARG_QEMU_CAPS = 1,
Any specific reason to start from 1 rather than 0, or even leaving
out the start value entirely?
> +
> +ARG_END = QEMU_CAPS_LAST,
> +} testInfoArgNames;
The name of the enum should be
On 3/14/19 4:29 PM, Eric Blake wrote:
On 3/14/19 2:42 PM, Cole Robinson wrote:
+typedef enum {
+ ARG_QEMU_CAPS = 1,
+
+ ARG_END = QEMU_CAPS_LAST,
+} testInfoArgNames;
+
Do you need some sort of compile-time check that QEMU_CAPS_LAST doesn't
overlap with any other ARG_*?
Sure but
On 3/14/19 2:42 PM, Cole Robinson wrote:
>>
>>> +typedef enum {
>>> + ARG_QEMU_CAPS = 1,
>>> +
>>> + ARG_END = QEMU_CAPS_LAST,
>>> +} testInfoArgNames;
>>> +
Do you need some sort of compile-time check that QEMU_CAPS_LAST doesn't
overlap with any other ARG_*?
>>> + while ((argname =
On 3/14/19 11:23 AM, Eric Blake wrote:
On 3/14/19 9:43 AM, Cole Robinson wrote:
This establishes a pattern that will allow us to make test macros
more general purpose, by taking optional arguments. The general
format will be:
DO_TEST_FULL(...
ARG_FOO, ,
ARG_BAR, )
On 3/14/19 9:43 AM, Cole Robinson wrote:
> This establishes a pattern that will allow us to make test macros
> more general purpose, by taking optional arguments. The general
> format will be:
>
> DO_TEST_FULL(...
> ARG_FOO, ,
> ARG_BAR, )
>
> ARG_X are just enum values
This establishes a pattern that will allow us to make test macros
more general purpose, by taking optional arguments. The general
format will be:
DO_TEST_FULL(...
ARG_FOO, ,
ARG_BAR, )
ARG_X are just enum values that we look for in the va_args and know
how to interpret.