From fb8d41b123337b505e704f28592635d63b8cff5c Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 1 Dec 2023 08:12:13 +0000 Subject: [PATCH] scripts/build/elf_parser.py: make dependency graph output deterministic Python's sets are not deterministic. `devices` were already sorted but `dev_supports` is still a non-deterministic set. Sort dev_supports to make the graph output deterministic. Fixes commit 29942475c5ce ("scripts: gen_handles: output dependency graph") It is quite ironic that this initial and non-deterministic graph commit was concurrent with and slightly delayed other commit f896fc2306a0 ("scripts: gen_handles: Sort the device handles") which fixed another, similar non-determinism issue in the same area. A true "whack-a-mole"! Signed-off-by: Marc Herbert --- scripts/build/elf_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/elf_parser.py b/scripts/build/elf_parser.py index 07ca6f078063c9..101e61dbadfcf5 100644 --- a/scripts/build/elf_parser.py +++ b/scripts/build/elf_parser.py @@ -283,6 +283,6 @@ def device_dependency_graph(self, title, comment): ) dot.node(str(dev.ordinal), text) for dev in self.devices: - for sup in dev.devs_supports: + for sup in sorted(dev.devs_supports): dot.edge(str(dev.ordinal), str(sup.ordinal)) return dot