[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 0/5] tests/qtest: add some tests for virtio-net failover
From: |
Laurent Vivier |
Subject: |
[PATCH v3 0/5] tests/qtest: add some tests for virtio-net failover |
Date: |
Thu, 18 Nov 2021 14:32:20 +0100 |
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
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 (5):
qtest/libqos: add a function to initialize secondary PCI buses
tests/qtest: add some tests for virtio-net failover
failover: fix unplug pending detection
libqtest: add a function to use a timeout when waiting for an event
tests/libqtest: update virtio-net failover test
hw/acpi/pcihp.c | 30 +-
include/hw/pci/pci_bridge.h | 8 +
tests/qtest/libqos/libqtest.h | 26 +-
tests/qtest/libqos/pci.c | 118 ++++++
tests/qtest/libqos/pci.h | 1 +
tests/qtest/libqtest.c | 37 +-
tests/qtest/meson.build | 3 +
tests/qtest/virtio-net-failover.c | 644 ++++++++++++++++++++++++++++++
tests/unit/test-qga.c | 2 +-
9 files changed, 859 insertions(+), 10 deletions(-)
create mode 100644 tests/qtest/virtio-net-failover.c
--
2.33.1
- [PATCH v3 0/5] tests/qtest: add some tests for virtio-net failover,
Laurent Vivier <=
- [PATCH v3 1/5] qtest/libqos: add a function to initialize secondary PCI buses, Laurent Vivier, 2021/11/18
- [PATCH v3 2/5] tests/qtest: add some tests for virtio-net failover, Laurent Vivier, 2021/11/18
- [PATCH v3 3/5] failover: fix unplug pending detection, Laurent Vivier, 2021/11/18
- [PATCH v3 4/5] libqtest: add a function to use a timeout when waiting for an event, Laurent Vivier, 2021/11/18
- [PATCH v3 5/5] tests/libqtest: update virtio-net failover test, Laurent Vivier, 2021/11/18