qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/6] tests/qtest: add some tests for virtio-net failover
@ 2021-12-06 22:20 Laurent Vivier
  2021-12-06 22:20 ` [PATCH v6 1/6] qtest/libqos: add a function to initialize secondary PCI buses Laurent Vivier
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Laurent Vivier @ 2021-12-06 22:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: Laurent Vivier, Paolo Bonzini, Thomas Huth, Jens Freimann,
	Juan Quintela

This series adds a qtest entry to test virtio-net failover feature.

We check following error cases:

- check missing id on device with failover_pair_id triggers an error
- check a primary device plugged on a bus that doesn't support hotplug
  triggers an error

We check the status of the machine before and after hotplugging cards and
feature negotiation:

- check we don't see the primary device at boot if failover is on
- check we see the primary device at boot if failover is off
- check we don't see the primary device if failover is on
  but failover_pair_id is not the one with on (I think this should be changed)
- check the primary device is plugged after the feature negotiation
- check the result if the primary device is plugged before standby device and
  vice-versa
- check the if the primary device is coldplugged and the standy device
  hotplugged and vice-versa
- check the migration triggers the unplug and the hotplug

There is one preliminary patch in the series:

- PATCH 1 introduces a function to enable PCI bridge.
  Failover needs to be plugged on a pcie-root-port and while
  the root port is not configured the cards behind it are not
  available

v6:
- manage more than 2 root ports
- add a function to check if a card is available or not
- check migration state
- add cancelled migration test cases
- rename tests

v5:
- re-add the wait-unplug test that has been removed from v4 by mistake.

v4:
- rely on query-migrate status to know the migration state rather than
  to wait the STOP event.
- remove the patch to add time out to qtest_qmp_eventwait()

v3:
- fix a bug with ACPI unplug and add the related test

v2:
- remove PATCH 1 that introduced a function that can be replaced by
  qobject_to_json_pretty() (Markus)
- Add migration to a file and from the file to check the card is
  correctly unplugged on the source, and hotplugged on the dest
- Add an ACPI call to eject the card as the kernel would do

Laurent Vivier (6):
  qtest/libqos: add a function to initialize secondary PCI buses
  tests/qtest: add some tests for virtio-net failover
  failover: fix unplug pending detection
  tests/libqtest: update virtio-net failover test
  test/libqtest: add some virtio-net failover migration cancelling tests
  tests/libqtest: add a migration test with two couples of failover
    devices

 hw/acpi/pcihp.c                   |   30 +-
 include/hw/pci/pci_bridge.h       |    8 +
 tests/qtest/libqos/pci.c          |  118 +++
 tests/qtest/libqos/pci.h          |    1 +
 tests/qtest/meson.build           |    3 +
 tests/qtest/virtio-net-failover.c | 1294 +++++++++++++++++++++++++++++
 6 files changed, 1451 insertions(+), 3 deletions(-)
 create mode 100644 tests/qtest/virtio-net-failover.c

-- 
2.33.1




^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-12-08  7:54 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-06 22:20 [PATCH v6 0/6] tests/qtest: add some tests for virtio-net failover Laurent Vivier
2021-12-06 22:20 ` [PATCH v6 1/6] qtest/libqos: add a function to initialize secondary PCI buses Laurent Vivier
2021-12-07  8:09   ` Thomas Huth
2021-12-06 22:20 ` [PATCH v6 2/6] tests/qtest: add some tests for virtio-net failover Laurent Vivier
2021-12-07  8:29   ` Thomas Huth
2021-12-06 22:20 ` [PATCH v6 3/6] failover: fix unplug pending detection Laurent Vivier
2021-12-07  4:13   ` Ani Sinha
2021-12-07  7:31     ` Laurent Vivier
2021-12-06 22:20 ` [PATCH v6 4/6] tests/libqtest: update virtio-net failover test Laurent Vivier
2021-12-07  8:33   ` Thomas Huth
2021-12-06 22:20 ` [PATCH v6 5/6] test/libqtest: add some virtio-net failover migration cancelling tests Laurent Vivier
2021-12-07  8:35   ` Thomas Huth
2021-12-08  7:44   ` Michael S. Tsirkin
2021-12-08  7:48     ` Thomas Huth
2021-12-08  7:53       ` Thomas Huth
2021-12-06 22:20 ` [PATCH v6 6/6] tests/libqtest: add a migration test with two couples of failover devices Laurent Vivier
2021-12-07  8:39   ` Thomas Huth
2021-12-08  7:44 ` [PATCH v6 0/6] tests/qtest: add some tests for virtio-net failover Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).