From b37b41f86829246f28c16ac7e76889c2c918f0eb Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Fri, 14 Sep 2018 13:10:27 +0200 Subject: [PATCH] qemu: Don't duplicate binary name in capabilities virCapabilitiesAddGuestDomain() takes an optional binary name: this is intended for cases where a certain domain type can't use the default one registered for the guest architecture, but has to use a special binary instead. The current code, however, will pass 'binary' again when 'kvmbin' is not defined, which is unnecessary as 'binary' has been registered as default earlier, and will result in capabilities output such as /usr/bin/qemu-system-x86_64 /usr/bin/qemu-system-x86_64 with the second element providing no additional information. Change it so that, when 'kvmbin' is not defined, NULL is passed and so the default emulator will be used instead. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 2 +- tests/qemucaps2xmloutdata/caps_1.5.3.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_1.6.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_1.7.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.1.1.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.10.0.aarch64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.10.0.ppc64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.10.0.s390x.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.10.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.11.0.s390x.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.11.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.12.0.aarch64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.12.0.ppc64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.12.0.s390x.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.12.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.4.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.5.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.6.0.aarch64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.6.0.ppc64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.6.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.7.0.s390x.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.7.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.8.0.s390x.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.8.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.9.0.ppc64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.9.0.s390x.xml | 4 +--- tests/qemucaps2xmloutdata/caps_2.9.0.x86_64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_3.0.0.ppc64.xml | 4 +--- tests/qemucaps2xmloutdata/caps_3.0.0.x86_64.xml | 4 +--- 29 files changed, 29 insertions(+), 85 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2bfd94995f..ed92e99b90 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -885,7 +885,7 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps, if ((dom = virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_KVM, - kvmbin ? kvmbin : binary, + kvmbin ? kvmbin : NULL, NULL, nmachines, machines)) == NULL) { diff --git a/tests/qemucaps2xmloutdata/caps_1.5.3.x86_64.xml b/tests/qemucaps2xmloutdata/caps_1.5.3.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_1.5.3.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_1.5.3.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_1.6.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_1.6.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_1.6.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_1.6.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_1.7.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_1.7.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_1.7.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_1.7.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.1.1.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.1.1.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.1.1.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.1.1.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.10.0.aarch64.xml b/tests/qemucaps2xmloutdata/caps_2.10.0.aarch64.xml index a879d67df3..f6572c8ecd 100644 --- a/tests/qemucaps2xmloutdata/caps_2.10.0.aarch64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.10.0.aarch64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-aarch64 - - /usr/bin/qemu-system-aarch64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.10.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_2.10.0.ppc64.xml index 74eaf3ba0e..85623f3980 100644 --- a/tests/qemucaps2xmloutdata/caps_2.10.0.ppc64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.10.0.ppc64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-ppc64 - - /usr/bin/qemu-system-ppc64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.10.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.10.0.s390x.xml index 20ef995d62..bb82a15040 100644 --- a/tests/qemucaps2xmloutdata/caps_2.10.0.s390x.xml +++ b/tests/qemucaps2xmloutdata/caps_2.10.0.s390x.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-s390x - - /usr/bin/qemu-system-s390x - + diff --git a/tests/qemucaps2xmloutdata/caps_2.10.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.10.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.10.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.10.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.11.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.11.0.s390x.xml index 20ef995d62..bb82a15040 100644 --- a/tests/qemucaps2xmloutdata/caps_2.11.0.s390x.xml +++ b/tests/qemucaps2xmloutdata/caps_2.11.0.s390x.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-s390x - - /usr/bin/qemu-system-s390x - + diff --git a/tests/qemucaps2xmloutdata/caps_2.11.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.11.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.11.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.12.0.aarch64.xml b/tests/qemucaps2xmloutdata/caps_2.12.0.aarch64.xml index a879d67df3..f6572c8ecd 100644 --- a/tests/qemucaps2xmloutdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.12.0.aarch64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-aarch64 - - /usr/bin/qemu-system-aarch64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.12.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_2.12.0.ppc64.xml index 74eaf3ba0e..85623f3980 100644 --- a/tests/qemucaps2xmloutdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.12.0.ppc64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-ppc64 - - /usr/bin/qemu-system-ppc64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.12.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.12.0.s390x.xml index 20ef995d62..bb82a15040 100644 --- a/tests/qemucaps2xmloutdata/caps_2.12.0.s390x.xml +++ b/tests/qemucaps2xmloutdata/caps_2.12.0.s390x.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-s390x - - /usr/bin/qemu-system-s390x - + diff --git a/tests/qemucaps2xmloutdata/caps_2.12.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.12.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.12.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.4.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.4.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.4.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.4.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.5.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.5.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.5.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.5.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.6.0.aarch64.xml b/tests/qemucaps2xmloutdata/caps_2.6.0.aarch64.xml index a879d67df3..f6572c8ecd 100644 --- a/tests/qemucaps2xmloutdata/caps_2.6.0.aarch64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.6.0.aarch64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-aarch64 - - /usr/bin/qemu-system-aarch64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.6.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_2.6.0.ppc64.xml index 74eaf3ba0e..85623f3980 100644 --- a/tests/qemucaps2xmloutdata/caps_2.6.0.ppc64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.6.0.ppc64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-ppc64 - - /usr/bin/qemu-system-ppc64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.6.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.6.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.6.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.6.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.7.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.7.0.s390x.xml index 20ef995d62..bb82a15040 100644 --- a/tests/qemucaps2xmloutdata/caps_2.7.0.s390x.xml +++ b/tests/qemucaps2xmloutdata/caps_2.7.0.s390x.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-s390x - - /usr/bin/qemu-system-s390x - + diff --git a/tests/qemucaps2xmloutdata/caps_2.7.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.7.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.7.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.7.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.8.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.8.0.s390x.xml index 20ef995d62..bb82a15040 100644 --- a/tests/qemucaps2xmloutdata/caps_2.8.0.s390x.xml +++ b/tests/qemucaps2xmloutdata/caps_2.8.0.s390x.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-s390x - - /usr/bin/qemu-system-s390x - + diff --git a/tests/qemucaps2xmloutdata/caps_2.8.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.8.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.8.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.8.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.9.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_2.9.0.ppc64.xml index 74eaf3ba0e..85623f3980 100644 --- a/tests/qemucaps2xmloutdata/caps_2.9.0.ppc64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.9.0.ppc64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-ppc64 - - /usr/bin/qemu-system-ppc64 - + diff --git a/tests/qemucaps2xmloutdata/caps_2.9.0.s390x.xml b/tests/qemucaps2xmloutdata/caps_2.9.0.s390x.xml index 20ef995d62..bb82a15040 100644 --- a/tests/qemucaps2xmloutdata/caps_2.9.0.s390x.xml +++ b/tests/qemucaps2xmloutdata/caps_2.9.0.s390x.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-s390x - - /usr/bin/qemu-system-s390x - + diff --git a/tests/qemucaps2xmloutdata/caps_2.9.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_2.9.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_2.9.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + diff --git a/tests/qemucaps2xmloutdata/caps_3.0.0.ppc64.xml b/tests/qemucaps2xmloutdata/caps_3.0.0.ppc64.xml index 74eaf3ba0e..85623f3980 100644 --- a/tests/qemucaps2xmloutdata/caps_3.0.0.ppc64.xml +++ b/tests/qemucaps2xmloutdata/caps_3.0.0.ppc64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-ppc64 - - /usr/bin/qemu-system-ppc64 - + diff --git a/tests/qemucaps2xmloutdata/caps_3.0.0.x86_64.xml b/tests/qemucaps2xmloutdata/caps_3.0.0.x86_64.xml index b58f54fefd..d41693a001 100644 --- a/tests/qemucaps2xmloutdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucaps2xmloutdata/caps_3.0.0.x86_64.xml @@ -14,9 +14,7 @@ 64 /usr/bin/qemu-system-x86_64 - - /usr/bin/qemu-system-x86_64 - + -- GitLab