Commit Graph

13 Commits

Author SHA1 Message Date
Peter Krempa
12aedb4145 qemucapabilitiesdata: Add (fake) '+hvf' variant of aarch64 data
The data is based on the generic variant of the 7.2.0 data on aarch64.

Only modification to the '.replies' file is that KVM is reported as
unavailable/unsupported.

Ideally this will be replaced by a dump captured from a real system.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-04-03 09:19:06 +02:00
Peter Krempa
3fe14604bc qemucapabilitiesdata: Add (fake) '+hvf' variant of x86_64 data
The data is based on the generic variant of the 7.2.0 data on x86_64.

Only modification to the '.replies' file is that KVM is reported as
unavailable/unsupported.

Ideally this will be replaced by a dump captured from a real system.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-04-03 09:19:06 +02:00
Peter Krempa
d24e1e6b31 tests: qemu: Add 'ppc' machine caps based on 'qemu-system-ppc' on fedora
The data are obtained from a x86_64 machine thus don't really represent
physical hardware, but it's better than nothing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2023-03-06 20:55:50 +01:00
Daniel P. Berrangé
a46ca90d27 tests: add capabilities data files for sparc emulator target
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-20 12:09:51 +00:00
Peter Krempa
7a6e7bad1c conf: Refactor storage of guest capabilities
The capabilities are declared in the XML schema so passing feature names
as strings from hypervisor drivers makes no sense.

Additionally some of the features expose so called 'toggles' while
others not. This knowledge was encoded by a bunch of 'STREQ's in the
formatter.

Change all of this by declaring the features as an enum and use it
instead of a dynamically allocated array.

Presence of 'toggles' is encoded together with the conversion strings
rather than in the formatter directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-11-13 08:16:04 +01:00
Andrea Bolognani
eeafebc51d tests: Unify qemucaps2xml output files
Turns out different versions of QEMU on the same architecture
produce the same output, so we can have a single output file
per architecture instead of duplicating the same data over and
over again.

Spotted-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2019-02-05 17:15:05 +01:00
Andrea Bolognani
bca2346641 tests: Update qemucaps2xml for QEMU 4.0.0 on x86_64
Commit fb0d0d6c54 added capabilities data and updated
qemucapabilitiestest but forgot to update qemucaps2xmltest
at the same time.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-02-01 12:28:32 +01:00
Andrea Bolognani
030f963129 tests: Add capabilities data for QEMU 4.0.0 on RISC-V
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-02-01 11:57:33 +01:00
Andrea Bolognani
022c4b7a9c tests: Sync qemucaps2xml with qemucapabilities
Commits d7434ae800 and 9c4afbda34 added replies files for
QEMU 3.0.0 on s390x and QEMU 3.1.0 on x86_64 respectively, but
only enabled the corresponding test in qemucapabilities and not
in qemucaps2xml.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-11-29 15:24:03 +01:00
Andrea Bolognani
e95bcd8d18 tests: Add capabilities data for QEMU 3.1.0 on ppc64
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-11-27 17:12:15 +01:00
Andrea Bolognani
b37b41f868 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

  <emulator>/usr/bin/qemu-system-x86_64</emulator>
  <domain type='qemu'/>
  <domain type='kvm'>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
  </domain>

with the second <emulator> 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 <abologna@redhat.com>
2018-09-21 15:53:42 +02:00
Andrea Bolognani
a3676f3763 tests: Add more tests to qemucaps2xml
More specifically, everything that's tested by qemucapabilities
now goes through qemucaps2xml as well.

Ideally we'll rewrite both so that listing all test cases is
unnecessary and they get picked up automatically by listing the
contents of the input directory instead, but that's a refactor
for another day :)

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2018-09-17 14:52:31 +02:00
Andrea Bolognani
562990849a tests: Reuse qemucapabilities data for qemucaps2xml
While qemucaps2xml has a meager two test cases to its name, we
have plenty of data from qemucapabilities which is taken from
actual QEMU binaries, covers pretty much all supported QEMU
versions and architectures and is even in the right format already!

Rewrite qemucaps2xml so that it uses qemucapabilities data as
input. Right now we have a single test case, but we're going to
add a lot more next.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2018-09-17 14:52:12 +02:00