aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/pci.c
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>2018-08-09 12:44:56 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-03-07 17:28:26 +0100
commit92bbafc71812fb9d20e9da00286a2e319e77a103 (patch)
treeafbe1d3a47717ff3000a6ada9c9afbce41d83840 /tests/libqos/pci.c
parent7985b582d68a990d0285afd3ad6f9eff5ff5c3c5 (diff)
downloadqemu-92bbafc71812fb9d20e9da00286a2e319e77a103.zip
qemu-92bbafc71812fb9d20e9da00286a2e319e77a103.tar.gz
qemu-92bbafc71812fb9d20e9da00286a2e319e77a103.tar.bz2
tests/libqos: has_buggy_msi flag
The Qgraph framework makes any test using pci bus run the same function using pci-pci and pci-spapr bus. However, some tests are not ready to use the spapr bus, due to a MSI bug. Until it does not get fixed, this flag allows them to skip the test Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/libqos/pci.c')
-rw-r--r--tests/libqos/pci.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/libqos/pci.c b/tests/libqos/pci.c
index 8257904..662ee7a 100644
--- a/tests/libqos/pci.c
+++ b/tests/libqos/pci.c
@@ -51,6 +51,20 @@ void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id,
}
}
+bool qpci_has_buggy_msi(QPCIDevice *dev)
+{
+ return dev->bus->has_buggy_msi;
+}
+
+bool qpci_check_buggy_msi(QPCIDevice *dev)
+{
+ if (qpci_has_buggy_msi(dev)) {
+ g_test_skip("Skipping due to incomplete support for MSI");
+ return true;
+ }
+ return false;
+}
+
static void qpci_device_set(QPCIDevice *dev, QPCIBus *bus, int devfn)
{
g_assert(dev);