diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index a60c8d1c9389b5f731c5871525b0f6ba719f3819..6a3e61c54bdd7ca096e24ff13e9fb83e6f15134f 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -634,6 +634,11 @@ mymain(void) return EXIT_FAILURE; driver.hostdevMgr = virHostdevManagerGetDefault(); + if (driver.hostdevMgr == NULL) { + VIR_TEST_VERBOSE("Could not initialize HostdevManager - %s\n", + virGetLastErrorMessage()); + return EXIT_FAILURE; + } #define DO_TEST(file, ACTION, dev, fial, kep, ...) \