]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemuxml2argvtest: Fake response from numad
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Feb 2015 16:39:34 +0000 (17:39 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Feb 2015 07:38:19 +0000 (08:38 +0100)
Well, we can pretend that we've asked numad for its suggestion and let
qemu command line be built with that respect. Again, this alone has no
big value, but see later commits which build on the top of this.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxml2argvtest.c

index 316f4793a6fe24c1a16fd8e36478f2479323b90f..2de92ebfc35ff42fd876a2b2d35312ababde717d 100644 (file)
@@ -265,12 +265,16 @@ static int testCompareXMLToArgvFiles(const char *xml,
     size_t i;
     size_t nnicindexes = 0;
     int *nicindexes = NULL;
+    virBitmapPtr nodeset = NULL;
 
     if (!(conn = virGetConnect()))
         goto out;
     conn->secretDriver = &fakeSecretDriver;
     conn->storageDriver = &fakeStorageDriver;
 
+    if (virBitmapParse("0-3", '\0', &nodeset, 4) < 0)
+        goto out;
+
     if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
                                         QEMU_EXPECTED_VIRT_TYPES,
                                         VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
@@ -349,7 +353,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
                                      VIR_NETDEV_VPORT_PROFILE_OP_NO_OP,
                                      &testCallbacks, false,
                                      (flags & FLAG_FIPS),
-                                     NULL, &nnicindexes, &nicindexes))) {
+                                     nodeset, &nnicindexes, &nicindexes))) {
         if (!virtTestOOMActive() &&
             (flags & FLAG_EXPECT_FAILURE)) {
             ret = 0;
@@ -403,6 +407,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
     virCommandFree(cmd);
     virDomainDefFree(vmdef);
     virObjectUnref(conn);
+    virBitmapFree(nodeset);
     return ret;
 }