arm/pci-test: skip on pci/pci-testdev probe failure
Some configurations don't have pci or pci-testdev. This patch
avoids saying FAIL in those cases. Instead we get SKIP.
Cc: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
diff --git a/arm/pci-test.c b/arm/pci-test.c
index 10a367d..cf128ac 100644
--- a/arm/pci-test.c
+++ b/arm/pci-test.c
@@ -14,14 +14,19 @@
{
int ret;
- if (!pci_probe())
- report_abort("PCI bus probing failed\n");
+ if (!pci_probe()) {
+ printf("PCI bus probing failed, skipping tests...\n");
+ return report_summary();
+ }
pci_print();
ret = pci_testdev();
- report("PCI test device passed %d/%d tests",
- ret >= NR_TESTS, ret > 0 ? ret : 0, NR_TESTS);
+ if (ret == -1)
+ report_skip("No PCI test device");
+ else
+ report("PCI test device passed %d/%d tests",
+ ret >= NR_TESTS, ret > 0 ? ret : 0, NR_TESTS);
return report_summary();
}