[PATCH 2/2] tests: set QEMUD_CMD_FLAG_PCI_MULTIBUS in testCompareXMLToArgvFiles()

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

 



set QEMUD_CMD_FLAG_PCI_MULTIBUS before calling qemuBuildCommandLine()
as the flags is not set by qemuCapsExtractVersionInfo().

Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx>

---
 tests/qemuxml2argvtest.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 52808b5..96260c0 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -111,6 +111,15 @@ static int testCompareXMLToArgvFiles(const char *xml,
     free(virtTestLogContentAndReset());
     virResetLastError();
 
+    /* We do not call qemuCapsExtractVersionInfo() before calling
+     * qemuBuildCommandLine(), so we should set QEMUD_CMD_FLAG_PCI_MULTIBUS for
+     * x86_64 and i686 architectures here.
+     */
+    if (STREQLEN(vmdef->os.arch, "x86_64", 6) ||
+        STREQLEN(vmdef->os.arch, "i686", 4)) {
+        flags |= QEMUD_CMD_FLAG_PCI_MULTIBUS;
+    }
+
     if (!(cmd = qemuBuildCommandLine(conn, &driver,
                                      vmdef, &monitor_chr, false, flags,
                                      migrateFrom, migrateFd, NULL,
-- 
1.7.1

--
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]