From 71e0cb1f4c248e15ad7494a3bc98d6b32cf1a1c3 Mon Sep 17 00:00:00 2001 From: Yingshun Cui Date: Fri, 27 Dec 2024 17:03:46 +0800 Subject: [PATCH] guest_os_booting: Skip templateFormat when comparing os xml The 'templateFormat' is automatically added in os xml and causes the xml comparison to fail. Signed-off-by: Yingshun Cui --- .../src/guest_os_booting/ovmf_firmware/ovmf_backed_nvram.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt/tests/src/guest_os_booting/ovmf_firmware/ovmf_backed_nvram.py b/libvirt/tests/src/guest_os_booting/ovmf_firmware/ovmf_backed_nvram.py index 9159e9370a..22508b31c8 100644 --- a/libvirt/tests/src/guest_os_booting/ovmf_firmware/ovmf_backed_nvram.py +++ b/libvirt/tests/src/guest_os_booting/ovmf_firmware/ovmf_backed_nvram.py @@ -30,6 +30,8 @@ def compare_guest_xml(vmxml, os_attrs): current_os_attrs = os_xml.fetch_attrs() for key in os_attrs: if key in current_os_attrs: + if key == "nvram_attrs": + current_os_attrs[key].pop("templateFormat") if os_attrs[key] != current_os_attrs[key]: test.fail("Configured os xml value {} doesn't match the" " entry {} in guest xml".format(os_attrs[key], current_os_attrs[key]))