mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
tests: add warning that qemucapsprobe prefers native host/guest arch
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. Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
713ad30004
commit
a8c9b49747
@ -46,6 +46,8 @@ main(int argc, char **argv)
|
||||
{
|
||||
virThread thread;
|
||||
virQEMUCapsPtr caps;
|
||||
virArch host;
|
||||
virArch guest;
|
||||
const char *mock = VIR_TEST_MOCK("qemucapsprobe");
|
||||
|
||||
if (!virFileIsExecutable(mock)) {
|
||||
@ -80,6 +82,18 @@ 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user