Base macro to unify the actual testCompareXMLToArgv test calls
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
* ARG_CAPS_ARCH must be specified with ARG_CAPS_VER
* ARG_QEMU_CAPS shouldn't be specified with ARG_CAPS_*
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Move DO_CAPS_TEST* qemuCaps init and all the associated setup
into testInfoSetArgs, adding ARG_CAPS_ARCH and ARG_CAPS_VER
options and using those to build the capsfile path locally
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
We have tests for simple guests with graphics for basically
all other architectures, so it makes sense to include s390x
too.
The input file was generated by running
$ virt-install \
--name guest --os-variant fedora29 \
--vcpus 4 --memory 4096 --disk size=5 \
--graphics vnc \
--print-xml
followed by minor tweaks, using a version of virt-manager
that includes commit 7b9de27a990f.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
Move DO_TEST* qemuCaps init into testInfoSetArgs. This is a step
towards unifying the different test macro implementations
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This is closer to the pattern of qemuxml2xml tests, and will make
things easier if we extend testInfo to contain more freeable data
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Rather than make callers do it. The operative info is just arch
and ver which we are passing in already.
Fold in stripmachinealiases too since it is just dependent on
ver value
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
They are potentially useful at the moment, but we will be making
things much more flexible
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This allows us to drop parseFlags from DO_TEST_FULL
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This allows us to drop migrateFrom and migrateFd from DO_TEST_FULL
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This allows us to drop stub GIC values from DO_TEST_FULL calls
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This is necessary before we can start adding more optional parameter
implementations to DO_TEST_FULL
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This establishes a pattern that will allow us to make test macros
more general purpose, by taking optional arguments. The general
format will be:
DO_TEST_FULL(...
ARG_FOO, <value1>,
ARG_BAR, <value2>)
ARG_X are just enum values that we look for in the va_args and know
how to interpret.
Implement this for the existing implicit qemuCaps va_args
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
For now it just fills in the qemuCaps list. We will expand it
in future patches
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This code snippet has clearly been cargo-culted, and all its
instances can be safely dropped seeing as 1) a much better
way to handle the scenario in C programs would be to pass the
value via the preprocessor, and 2) the value is actually not
used anywhere after being defined.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This is mostly to avoid a memleak that is not a true memleak
anyway - prefixes will be freed by kernel upon test exit.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=1564270
Now that everything is prepared for qemu driver we can enable
parser feature to allow users define such domains.
At the same time, introduce bunch of tests to test the feature.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
These are similar to the existing simple headless guests, but
also include a graphical output and some input devices.
Input files were generated by running
$ virt-install \
--name guest --os-variant fedora29 \
--vcpus 4 --memory 4096 --disk size=5 \
--graphics vnc \
--print-xml
followed by minor tweaks.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
While the parser and schema have to accept all possible models,
virtio-(non-)transitional models are only applicable to
type=passthrough and should be otherwise rejected.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
<disk> devices lack the model= attribute which is used by
most other device types. bus= mostly acts as one, but it
serves other purposes too like determing what target=
prefix to use, and for matching against controller type=
values.
Extending bus= to handle additional virtio transitional
devices will complicate apps lives, and it isn't a clean
mapping anyways. So let's bite the bullet and add a new
<disk model=X/> attribute, and wire up common handling
for virtio and virtio-{non-}transitional
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Add full and empty cdroms on 'usb' and 'sd' bus to have test
coverage. Note that this does not guarantee that qemu will accept them.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
The split of ide-disk into the two separate devices was introduced by
qemu commit 1f56e32a7f4b3 released in qemu v0.15.
Note that when compared to the previous commit which made sure that no
disk related tests were touched, in this case it's not as careful.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
The split of scsi-disk into the two separate devices was introduced by
qemu commit b443ae67 released in qemu v0.15.
All changes to test files are not really related to disk testing thanks
to previous refactors.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
The tests are for the same feature. Move all the cases to 'disk-shared'
case as it's already using DO_TEST_CAPS_LATEST
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
A lot of code with no real impact and popularity. Remove all the helpers
now that the only test case is gone.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Testing that the cachemode is properly recorded to the configuration
after startup does not add much value and overcomplicates the xml2argv
test.
Remove the 'disk-shared' test with old capabilities as the test with
real capabilities covers the code sufficiently.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Using an old strict set of capabilities is not of much use if a code
path would select a more modern controller by accident.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Now that we have a specific test for testing the 'virtio-scsi'
controller and other tests which test a combination of scsi and non-scsi
devices this test no longer makes sense.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>