[libvirt] [PATCHv2 5/6] tests: Add support for catching domain XML parsing errors
Eric Blake
eblake at redhat.com
Wed Jul 18 21:50:52 UTC 2012
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 at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120718/69262b70/attachment-0001.sig>
More information about the libvir-list
mailing list