Module: Mesa Branch: main Commit: 8c8fca53fda09aa452edf6336a0e2b343e264064 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c8fca53fda09aa452edf6336a0e2b343e264064
Author: Jordan Justen <[email protected]> Date: Tue Aug 15 03:07:30 2023 -0700 intel/genxml: Fix comparing xml when node counts differ This fix is more relevant to MR !20593. Normally when sorting the number of nodes will be equivalent today, so this bug will not be encountered. But in !20593, we can shrink (--import) or grow the number of elements (--flatten) when the genxml_import.py tool is used. Fixes: e60a0b16163 ("intel/genxml: Move sorting & writing into GenXml class") Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24902> --- src/intel/genxml/intel_genxml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/genxml/intel_genxml.py b/src/intel/genxml/intel_genxml.py index 21fe15952e5..9cb90219943 100755 --- a/src/intel/genxml/intel_genxml.py +++ b/src/intel/genxml/intel_genxml.py @@ -199,6 +199,8 @@ class GenXml(object): return clone def is_equivalent_xml(self, other): + if len(self.et.getroot()) != len(other.et.getroot()): + return False return all(node_validator(old, new) for old, new in zip(self.et.getroot(), other.et.getroot()))
