Commit Graph

7929 Commits

Author SHA1 Message Date
Ján Tomko
d2e767d237 qemu: do not probe for properties of nec-usb-xhci
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Ján Tomko
6600c0ff18 qemu: retire QEMU_CAPS_VIRTIO_PACKED_QUEUES
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Ján Tomko
b710fcaff7 qemu: assume QEMU_CAPS_VIRTIO_PACKED_QUEUES
Added by QEMU commit:

commit 74b3e46630446568aecb0be1c77c4875d7a52f6d
Author:     Jason Wang <jasowang@redhat.com>
CommitDate: 2019-10-25 07:46:22 -0400

    virtio: add property to enable packed virtqueue

    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
    Reviewed-by: Jens Freimann <jfreimann@redhat.com>
    Message-Id: <20191025083527.30803-9-eperezma@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

git describe: v4.1.0-1780-g74b3e46630 contains: v4.2.0-rc0~32^2~17

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Ján Tomko
3ae85b6a69 qemu: retire QEMU_CAPS_VIRTIO_SCSI_IOTHREAD
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Ján Tomko
d8e274253a qemu: retire QEMU_CAPS_NEC_USB_XHCI_PORTS
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Ján Tomko
04bf98a418 qemu: assume QEMU_CAPS_NEC_USB_XHCI_PORTS
Introduced by QEMU commit 0846e6359c407e372f446723b8b7b09ac20d0f03
released in QEMU 1.3.0

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Ján Tomko
935865e057 qemu: retire QEMU_CAPS_CHARDEV_LOGFILE
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Ján Tomko
72768bde3d qemu: assume QEMU_CAPS_CHARDEV_LOGFILE
Introduced in QEMU 2.6

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Ján Tomko
be217321eb qemu: retire QEMU_CAPS_CHARDEV_FILE_APPEND
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Ján Tomko
0a5b820f8f qemu: assume QEMU_CAPS_CHARDEV_FILE_APPEND
Introduced in QEMU 2.6

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-09-07 12:05:40 +02:00
Peter Krempa
4a95d1ede4 tests: qemuxml2argvdata: Remove two unused output files
Commit d7ae7ce363 forgot to clean up unused error output files
'boot-dev+order.err' and 'boot-menu-enable-with-timeout-invalid'
after converting tests to DO_TEST_CAPS_LATEST.

Fixes: d7ae7ce363
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2022-09-05 17:22:28 +02:00
Peter Krempa
35acaa9488 qemucapabilitiestest: Update qemu capabilities for qemu-7.1 release
qemu-7.1 is released now. Update the capabilities for the final time.

Notable change since last update:
 - 'exit-failure' action for 'panic' lifecycle action added

The 'min-xlevel' change is related to upgrade of the host kernel.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2022-09-01 13:11:10 +02:00
Peter Krempa
d34be15c6c qemu: command: Don't use deprecated chardev backend drivers 'tty' and 'parport'
The replacement is 'serial' and 'parallel' respectively introduced at
least in qemu-2.9 and the old versions are deprecated since qemu-6.0
(qemu commit 5965243641d797b22 ).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:10 +02:00
Peter Krempa
e55888d075 virDomainControllerDefParseXML: Parse 'index' by virXMLPropInt
'index' is parsed to fit into a signed int but not have negative values.
virXMLPropInt can do that internally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:10 +02:00
Peter Krempa
45e5648350 qemu: capabilities: Retire QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:10 +02:00
Peter Krempa
ec91195ead qemuxml2xmltest: Convert all test cases asserting QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
Turn them into DO_TEST_CAPS_LATEST tests so that we are closer to real
world.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:10 +02:00
Peter Krempa
517ca3c46a qemuxml2*test: Remove 'q35-virtio-pci' test case
As noted by the comments the only difference was the qemu capabilities
asserted. Now that we use only real caps for this test case it makes no
sense to have two copies.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:10 +02:00
Peter Krempa
80a0f44a7a qemuxml2argvtest: Convert all test cases asserting QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
Turn them into DO_TEST_CAPS_VER bound to qemu-4.2 to show the minimum
amount of change. We already have DO_TEST_CAPS_LATEST versions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:10 +02:00
Peter Krempa
e097e1a755 qemuxml2argvtest: Add DO_TEST_CAPS_LATEST versions of tests which assert QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
Further patches will try to remove QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
so add few more modern tests before doing that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:10 +02:00
Peter Krempa
a7669aa119 qemuxml2*test: Use QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL for macos hfv tests
Switch from QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY to
QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL as it has no impact on the test
output.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:09 +02:00
Peter Krempa
50704f6c25 qemudomainsnapshotxml2xmltest: Add test case for a snapshot with 'inactiveDomain' element
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:09 +02:00
Peter Krempa
bbda8bea04 qemudomainsnapshotxml2xmltest: Allow regenerating into non-existing output file
Replacing the 'virTestLoadFile' + 'virTestDifferenceFull' by '
virTestCompareToFile' allows to use the VIR_TEST_REGENERATE_OUTPUT=1
option to also generate the output file if it doesn't exist.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:09 +02:00
Peter Krempa
41460774ea nodedevschematest: Add example file for a HBA with 'vport_ops' capability
Illustrate the problem in the schema fixed by previous commit.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:09 +02:00
Peter Krempa
9ac2bbcbbf tests: Remove storage pool/vol tests for sheepdog
The support for the sheepdog storage backend will be dropped in the
upcoming patches. Remove all the relevant tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:09 +02:00
Peter Krempa
d7ae7ce363 tests: qemuxml2argv: Convert all 'boot*' cases to DO_TEST_CAPS_LATEST
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:09 +02:00
Peter Krempa
89bef9575a tests: qemuxml2argv: Use x86_64 arch and emulator in all boot* test files
Using the modern emulator and arch will allow us to convert all of the
tests to use DO_TEST_CAPS_LATEST.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:09 +02:00
Peter Krempa
9b2902c835 qemuxml2argvtest: Use different network storage protocol for boot order tests
The support for 'sheepdog' was dropped from qemu-6.1 and later, to
convert the tests to latest caps we need to use something else. Use
'nbd'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-09-01 13:11:09 +02:00
Martin Kletzander
6457619d18 Rename iterface type='dummy' to type='null'
When commit bac6b266fb added this "functionality" this was the only
naming I could think of, but after discussion with Dan we found the name
'null' fits a bit better, so change it before we make a release with the
old name.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2022-08-25 13:27:04 +02:00
Laine Stump
15bd9179be tests: remove superfluous cleanup: labels and ret return variables
After converting virNetworkDef * to g_autoptr(virNetworkDef) the
cleanup codepath was empty, so it has been removed.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-24 12:22:47 -04:00
Laine Stump
d9074b8e01 tests: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-24 12:22:47 -04:00
Michal Privoznik
da255ce831 lib: Don't check for retval for virCommandNew*()
The virCommand module is specifically designed so that no caller
has to check for retval of individual virCommand*() APIs except
for virCommandRun() where the actual error is reported. Moreover,
virCommandNew*() use g_new0() to allocate memory and thus it's
not really possible for those APIs to return NULL. Which is why
they are even marked as ATTRIBUTE_NONNULL. But there are few
places where we do check the retval which is a dead code
effectively. Drop those checks.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2022-08-23 16:14:05 +02:00
Ján Tomko
f3ce408b67 qemu: do not probe for -pcihost properties
Now that we no longer care about any of their properties, there's no need
to call `device-list-properties` on these devices.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-08-22 14:45:04 +02:00
Ján Tomko
f4d70f3ef3 qemu: retire QEMU_CAPS_Q35_PCI_HOLE64_SIZE
We no longer use it.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-08-22 14:45:04 +02:00
Ján Tomko
a2fc283ab6 qemu: Retire QEMU_CAPS_I440FX_PCI_HOLE64_SIZE
We no longer use it.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-08-22 14:45:04 +02:00
Ján Tomko
6b4c1e010e qemu: always assume QEMU_CAPS_*_HOLE64_SIZE
Introduced back in 2013 by QEMU commit:
  commit 398489018183d613306ab022653552247d93919f

      pc: limit 64 bit hole to 2G by default

Released in 1.6.0

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-08-22 14:45:04 +02:00
Ján Tomko
ec73ad2ea5 qemu: retire QEMU_CAPS_DUMP_GUEST_MEMORY
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-08-22 14:45:04 +02:00
Andrea Bolognani
838f64515e tests: Reset macOS dyld environment
This is needed to ensure the environment variables that we need
for the test program itself, specifically to load mock libraries,
do not interfere with any command that gets invoked by it, either
directly or indirectly. We already perform the same cleanup step
for LD_* variables.

This makes the test failures

  error : virCommandWait:2752 : internal error: Child process
    (/usr/libexec/qemu/vhost-user/test-vhost-user-gpu --print-capabilities)
    unexpected fatal signal 6: dyld[8896]: symbol not found in flat
    namespace '_virQEMUCapsGet'
  error : qemuVhostUserFillDomainGPU:394 : operation failed: Unable to
    find a satisfying vhost-user-gpu

that were showing up on macOS 12 go away.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-22 10:50:56 +02:00
Jiri Denemark
f1929d4289 tests: Drop irrelevant CPU config from graphics-spice-timeout
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/243

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-08-18 16:32:21 +02:00
Amneesh Singh
ceaa74dfe0 qemu_capabilities: add "query-stats" QMP command to the QEMU capabilities
Related: https://gitlab.com/libvirt/libvirt/-/issues/276

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-08-18 15:09:49 +02:00
Martin Kletzander
580538c5dd vmx: Add support for VDS interface
Since we cannot properly plug a new VM into the distributed switch, we can at
least report the provided pieces of information, so that XML editing still works
even for VMs with such interfaces.

https://bugzilla.redhat.com/show_bug.cgi?id=1988211

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-18 08:34:32 +02:00
Martin Kletzander
9c9fc39ded tests: Fix vmx/xml filenames
Commit 70768cda97 added a functionality that was previously (in an unsubmitted
version of the commit) represented differently in the XML, but the filenames
kept the old name.  Fix the name so they are not misleading.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-18 08:34:30 +02:00
Jim Fehlig
231af0a08c schema: Add maxphysaddr element to hostcpu
The output of "virsh capabilities" was not conformant to the
capability.rng schema. Add the missing element to the schema.

Fixes: c647bf29af
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-08-15 09:32:59 -06:00
Jim Fehlig
65e8ac6f92 schema: Don't enforce ordering of hostcpu capabilities elements
The change to caps-test.xml demonstrates the need for the change to
cputypes.rng.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-08-15 09:32:59 -06:00
Ján Tomko
01cf26d41f qemu: retire QEMU_CAPS_VIRTIO_TX_ALG
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-08-11 18:34:47 +02:00
Ján Tomko
c80b10e88f qemu: always assume QEMU_CAPS_VIRTIO_TX_ALG
Introduced back in 2010 by QEMU commit:
  commit a697a334b3c4d3250e6420f5d38550ea10eb5319
      virtio-net: Introduce a new bottom half packet TX

Released in QEMU 0.14.0

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-08-11 18:34:47 +02:00
Ján Tomko
9a23c55b04 tests: qemuxml2xmltest: remove interface from disk test
There is no need to specify an interface for a disk test.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-08-11 18:34:47 +02:00
Peter Krempa
5eb283e294 qemu: Assume and retire QEMU_CAPS_BLOCKDEV_BACKUP
The blockdev-backup QMP command was introduced in qemu-2.3.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-11 15:26:32 +02:00
Peter Krempa
66c442f80f qemu: Assume support and retire QEMU_CAPS_BLOCK_WRITE_THRESHOLD
The event was introduced in qemu-2.3

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-11 15:26:17 +02:00
Peter Krempa
3a7955979c qemu: capabilities: Retire QEMU_CAPS_QUERY_NAMED_BLOCK_NODES
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-11 15:26:02 +02:00
Peter Krempa
a0b8b54348 qemu: Retire QEMU_CAPS_BLOCKDEV
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-08-11 15:25:36 +02:00