We don't need this for any functional purpose, but when debugging hosts
it is useful to know what binary a given capabilities XML document is
associated with.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 15 +++++++++++++++
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 +
tests/qemucapabilitiestest.c | 7 ++++++-
tests/testutilsqemu.c | 5 ++++-
47 files changed, 69 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 2ab7ead92e..0929fd3e28 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3872,6 +3872,7 @@ virQEMUCapsParseSEVInfo(virQEMUCapsPtr qemuCaps, xmlXPathContextPtr
ctxt)
* Parsing a doc that looks like
*
* <qemuCaps>
+ * <emulator>/some/path</emulator>
* <qemuctime>234235253</qemuctime>
* <selfctime>234235253</selfctime>
* <selfvers>1002016</selfvers>
@@ -3915,6 +3916,18 @@ virQEMUCapsLoadCache(virArch hostArch,
goto cleanup;
}
+ if (!(str = virXPathString("string(./emulator)", ctxt))) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("missing emulator in QEMU capabilities cache"));
+ goto cleanup;
+ }
+ if (STRNEQ(str, qemuCaps->binary)) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Expected caps for '%s' but saw
'%s'"),
+ qemuCaps->binary, str);
+ goto cleanup;
+ }
+ VIR_FREE(str);
if (virXPathLongLong("string(./qemuctime)", ctxt, &l) < 0) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("missing qemuctime in QEMU capabilities XML"));
@@ -4252,6 +4265,8 @@ virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps)
virBufferAddLit(&buf, "<qemuCaps>\n");
virBufferAdjustIndent(&buf, 2);
+ virBufferEscapeString(&buf, "<emulator>%s</emulator>\n",
+ qemuCaps->binary);
virBufferAsprintf(&buf, "<qemuctime>%llu</qemuctime>\n",
(long long)qemuCaps->ctime);
virBufferAsprintf(&buf, "<selfctime>%llu</selfctime>\n",
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
index 3ee25a7ea7..f2257d6bd2 100644
--- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
index cbeeb5c5e2..3a70ec8146 100644
--- a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
index 1424e1418d..cbb29ef2de 100644
--- a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
index f9ddfbef31..a6d0981224 100644
--- a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
index a1da42ba16..f598b4678a 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
index 8a6622efda..5a57cb7760 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
index 2bbd92aa37..aa9027d514 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
index 8204db4fc4..53872abf2f 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
index 8caf45f7e8..db51d461a8 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
index 5f34b945a5..f70335db8f 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
index 72c63533a3..64d8d4951c 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
index 147c017fe3..74c80d2fe9 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
index 8ff0633724..cbbe24823a 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
index 85954d352e..b51cee9f28 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
index 9cfcf7bd2e..86d85faa73 100644
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
index 75a9c520fb..b217238307 100644
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
index de54df6ed1..fddca13ee2 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
index 4e73396338..862464c2f0 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
index 5d098faf47..6b96e37a16 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
index 02397403cb..762ce4946e 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
index 887a2832af..bc1359b0dd 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
index 1ee7fbfeec..6000bed682 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
index b1db989ba4..c7f3be3a1b 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
index e3833633d7..a00d4b3d4c 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
index dade75081b..95251de022 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
index 12c3e6aef0..3d96f5f5b3 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
index baea300753..3b5a021dcf 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
index 3b81ea11c3..0b507ec80e 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-riscv32</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
index 615667d9b2..0d7c589f71 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-riscv64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
index 34a4999294..da57f8738b 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
index 3d5535f404..c955994ac0 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
index 0f64cfb2ba..cab38d442b 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
index c468ad0153..3e89d7f933 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml
index 9fc3c7e6f5..757bf193fc 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
index e84dd557a4..4e13888042 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
index bc675fc727..7d3a1bec6f 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-riscv32</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
index 1eeda32b7c..1732139db8 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-riscv64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml
index 8b8acd5a33..fd124ce0c5 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
index c29be71658..ba32d4c592 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml
index 2bc9672063..a98945de0e 100644
--- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
index 588e682064..a6469073fd 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index 9a480c4eb3..ee9fb23640 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
index 505b3adcb6..fdf5cb4ce9 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
index 7d886d9a87..4857e2f5a5 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
@@ -1,4 +1,5 @@
<qemuCaps>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index ad1a1f30ee..5b32ac1451 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -75,6 +75,7 @@ testQemuCaps(const void *opaque)
char *capsFile = NULL;
qemuMonitorTestPtr mon = NULL;
virQEMUCapsPtr capsActual = NULL;
+ char *binary = NULL;
char *actual = NULL;
unsigned int fakeMicrocodeVersion = 0;
const char *p;
@@ -93,7 +94,10 @@ testQemuCaps(const void *opaque)
if (qemuProcessQMPInitMonitor(qemuMonitorTestGetMonitor(mon)) < 0)
goto cleanup;
- if (!(capsActual = virQEMUCapsNew()) ||
+ binary = g_strdup_printf("/usr/bin/qemu-system-%s",
+ data->archName);
+
+ if (!(capsActual = virQEMUCapsNewBinary(binary)) ||
virQEMUCapsInitQMPMonitor(capsActual,
qemuMonitorTestGetMonitor(mon)) < 0)
goto cleanup;
@@ -132,6 +136,7 @@ testQemuCaps(const void *opaque)
VIR_FREE(repliesFile);
VIR_FREE(capsFile);
VIR_FREE(actual);
+ VIR_FREE(binary);
qemuMonitorTestFree(mon);
virObjectUnref(capsActual);
return ret;
diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c
index f0c2dbf50e..d077f8cd2d 100644
--- a/tests/testutilsqemu.c
+++ b/tests/testutilsqemu.c
@@ -283,11 +283,14 @@ qemuTestParseCapabilitiesArch(virArch arch,
const char *capsFile)
{
virQEMUCapsPtr qemuCaps = NULL;
+ char *binary = g_strdup_printf("/usr/bin/qemu-system-%s",
+ virArchToString(arch));
- if (!(qemuCaps = virQEMUCapsNew()) ||
+ if (!(qemuCaps = virQEMUCapsNewBinary(binary)) ||
virQEMUCapsLoadCache(arch, qemuCaps, capsFile) < 0)
goto error;
+ virQEMUCapsSetInvalidation(qemuCaps, false);
return qemuCaps;
error:
--
2.23.0