Generally we want the QEMU capabilities data in git to report KVM
related features, and thus we strongly prefer that the capabilities are
generated on a native host.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
tests/qemucapsprobe.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/qemucapsprobe.c b/tests/qemucapsprobe.c
index 26ea9ff5ed..e4d09468bd 100644
--- a/tests/qemucapsprobe.c
+++ b/tests/qemucapsprobe.c
@@ -46,6 +46,7 @@ main(int argc, char **argv)
{
virThread thread;
virQEMUCapsPtr caps;
+ virArch guest, host;
const char *mock = VIR_TEST_MOCK("qemucapsprobe");
if (!virFileIsExecutable(mock)) {
@@ -80,6 +81,17 @@ main(int argc, char **argv)
-1, -1, NULL, 0, NULL)))
return EXIT_FAILURE;
+ host = virArchFromHost();
+ guest = virQEMUCapsGetArch(caps);
+
+ if (host != guest)
+ fprintf(stderr,
+ "WARNING: guest architecture '%s' does not match host
'%s'.\n"
+ "WARNING: When generating capabilities for the libvirt test\n"
+ "WARNING: suite, it is strongly desired to generate
capabilities\n"
+ "WARNING: on the native host to capture KVM related
features.\n",
+ virArchToString(guest), virArchToString(host));
+
virObjectUnref(caps);
return EXIT_SUCCESS;
--
2.30.2