qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] tests/qtest: add some tests for virtio-net failover
@ 2021-11-10 13:56 Laurent Vivier
  2021-11-10 13:56 ` [PATCH 1/3] qdict: make available dump_qobject(), dump_qdict(), dump_qlist() Laurent Vivier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Laurent Vivier @ 2021-11-10 13:56 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Laurent Vivier, Thomas Huth, qemu-block,
	Michael S. Tsirkin, Markus Armbruster, Hanna Reitz,
	Paolo Bonzini

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
  -> this one needs to be improved as we can't actualy unplug the
     card as the qtest framework doesn't allow to really do
     the OS level unplug. So we receive the UNPLUG_PRIMARY
     event but nothing more.

There are two preliminary patches in the series:

- PATCH 1 makes available functions that helped me to debug
  the qmp command result. I think it's a good point to have them
  available widely

- PATCH 2 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

Laurent Vivier (3):
  qdict: make available dump_qobject(), dump_qdict(), dump_qlist()
  qtest/libqos: add a function to initialize secondary PCI buses
  tests/qtest: add some tests for virtio-net failover

 block/qapi.c                      |  82 +----
 include/hw/pci/pci_bridge.h       |   8 +
 include/qapi/qmp/qdict.h          |   2 +
 include/qapi/qmp/qlist.h          |   1 +
 include/qapi/qmp/qobject.h        |   1 +
 qobject/qdict.c                   |  25 ++
 qobject/qlist.c                   |  17 +
 qobject/qobject.c                 |  35 ++
 tests/qtest/libqos/pci.c          | 118 +++++++
 tests/qtest/libqos/pci.h          |   1 +
 tests/qtest/meson.build           |   3 +
 tests/qtest/virtio-net-failover.c | 567 ++++++++++++++++++++++++++++++
 12 files changed, 779 insertions(+), 81 deletions(-)
 create mode 100644 tests/qtest/virtio-net-failover.c

-- 
2.31.1




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

end of thread, other threads:[~2021-11-10 17:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 13:56 [PATCH 0/3] tests/qtest: add some tests for virtio-net failover Laurent Vivier
2021-11-10 13:56 ` [PATCH 1/3] qdict: make available dump_qobject(), dump_qdict(), dump_qlist() Laurent Vivier
2021-11-10 16:17   ` Markus Armbruster
2021-11-10 17:11     ` Laurent Vivier
2021-11-10 13:56 ` [PATCH 2/3] qtest/libqos: add a function to initialize secondary PCI buses Laurent Vivier
2021-11-10 13:56 ` [PATCH 3/3] tests/qtest: add some tests for virtio-net failover Laurent Vivier

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).