Re: [PATCHv2 5/6] tests: Add support for catching domain XML parsing errors

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

 



On 07/18/12 23:50, Eric Blake wrote:
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.


I fixed the spelling error in the commit message and formating of the << operator and pushed this patch. Thanks!

Peter

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]