On Fri, Apr 22, 2016 at 07:33:41PM +0200, Andrew Jones wrote: > Users may want to run kvm-unit-tests with a QEMU that doesn't > support pci-testdev. There will still be plenty (someday) of tests > that don't require it, so we should proceed. Only the pci-test > should fail, and it should fail with an informative message. Actually > the unit test should probably make use of xfail, like this > > have_testdev = pci_testdev_probe(); > ret = pci_testdev_run(); > report_xfail("PCI test device passed...", !have_testdev, ret, ...); A problem with this piece is pci_testdev_run() is called even when pci_testdev_probe() failed. What about this one instead? int main(void) { int ret = pci_probe(); report("PCI bus probing", ret); if (!ret) goto done; pci_print(); if (pci_find_dev(PCI_VENDOR_ID_REDHAT, PCI_DEVICE_ID_REDHAT_TEST) == PCIDEVADDR_INVALID) goto done; ret = pci_testdev(); report("PCI test device passed %d tests", ret >= PCI_TESTDEV_NUM_BARS * PCI_TESTDEV_NUM_TESTS, ret); done: return report_summary(); } > thanks, > drew -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html