On 07/18/2012 03:44 PM, Daniel P. Berrange wrote:
On Thu, Jul 12, 2012 at 11:30:59AM +0200, Peter Krempa wrote:
> This patch enhances qemuxml2argvtest to deal with sematicaly incorrect
s/sematicaly/semantically/
> domain XMLs, that generate errors while parsing.
>
> This patch cleans up macros that invoke the tests and changes boolean
> flags to a bit array flag variable.
> ---
> tests/qemuxml2argvtest.c | 505 +++++++++++++++++++++++-----------------------
> 1 files changed, 257 insertions(+), 248 deletions(-)
Cool.
>
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index a4fa8fe..56cfc4f 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -80,14 +80,19 @@ static virSecretDriver fakeSecretDriver = {
> .undefine = NULL,
> };
>
> +typedef enum {
> + FLAG_EXPECT_ERROR = 1,
I'd use 1<<0 for consistency here...
> + FLAG_EXPECT_FAILURE = 1<<1,
> + FLAG_EXPECT_PARSE_ERROR = 1<<2,
> + FLAG_JSON = 1<<3,
and even put spaces around both sides of the << operator.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org