diff options
| author | Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> | 2018-08-09 12:44:56 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-03-07 17:28:26 +0100 |
| commit | 92bbafc71812fb9d20e9da00286a2e319e77a103 (patch) | |
| tree | afbe1d3a47717ff3000a6ada9c9afbce41d83840 /tests/libqos/pci.c | |
| parent | 7985b582d68a990d0285afd3ad6f9eff5ff5c3c5 (diff) | |
| download | focaccia-qemu-92bbafc71812fb9d20e9da00286a2e319e77a103.tar.gz focaccia-qemu-92bbafc71812fb9d20e9da00286a2e319e77a103.zip | |
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.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/libqos/pci.c b/tests/libqos/pci.c index 8257904ba7..662ee7a517 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); |