From: Jim Fehlig <[email protected]> Commit 1504b7f687 moved the corresponding logic from the generic postparse code to drivers but failed to update the test driver, which causes failures in virt-manager's test suite.
Fixes: 1504b7f687bdfc679377e605d076776b18533468 Signed-off-by: Jim Fehlig <[email protected]> --- As an alternative to this patch, we can consider reverting 1504b7f687 (and the subsequent bhyve fix) to avoid duplicating the logic. src/test/test_driver.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 1165689de7..536e291861 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -421,6 +421,22 @@ testDomainDevicesDefPostParse(virDomainDeviceDef *dev G_GNUC_UNUSED, } +static int +testDomainDefPostParse(virDomainDef *def, + unsigned int parseFlags G_GNUC_UNUSED, + void *opaque G_GNUC_UNUSED, + void *parseOpaque G_GNUC_UNUSED) +{ + if (def->os.loader && + def->os.loader->path && + !def->os.loader->type) { + def->os.loader->type = VIR_DOMAIN_LOADER_TYPE_ROM; + } + + return 0; +} + + static void testDomainObjPrivateFree(void *data) { @@ -448,6 +464,7 @@ testDriverNew(void) VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT | VIR_DOMAIN_DEF_FEATURE_NET_MODEL_STRING, .devicesPostParseCallback = testDomainDevicesDefPostParse, + .domainPostParseCallback = testDomainDefPostParse, .defArch = VIR_ARCH_I686, }; virDomainXMLPrivateDataCallbacks privatecb = { -- 2.51.0
