[PATCH] test: Default to ROM type for loader
From: Jim Fehlig <jfehlig@suse.com> 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 <jfehlig@suse.com> --- 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
On Fri, Mar 06, 2026 at 09:56:16AM -0700, Jim Fehlig wrote:
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 <jfehlig@suse.com> --- src/test/test_driver.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
Thanks for catching this, fixing it and CC'ing me, I might have missed it otherwise! Reviewed-by: Andrea Bolognani <abologna@redhat.com> and pushed. -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani -
Jim Fehlig