SHA256
1
0
forked from pool/qemu
qemu/0039-qapi-ensure-stable-sort-ordering-wh.patch
Bruce Rogers f3c3b22dd7 Accepting request 574394 from home:bfrogers:branches:Virtualization
- Add AMD SEV (Secure Encrypted Virtualization) support by taking the v7 series of the patches posted to qemu ml. (fate#322124)
- Update python3 related patches now that they are upstream

OBS-URL: https://build.opensuse.org/request/show/574394
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=390
2018-02-08 19:55:31 +00:00

38 lines
1.3 KiB
Diff

From a16a7259aace92ff5cf815b31e1201310fc344a0 Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Tue, 16 Jan 2018 13:42:10 +0000
Subject: [PATCH] qapi: ensure stable sort ordering when checking QAPI entities
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Some early python 3.x versions will have different default
ordering when calling the 'values()' method on a dict, compared
to python 2.x and later 3.x versions. Explicitly sort the items
to get a stable ordering.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <20180116134217.8725-8-berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
(cherry picked from commit f7a5376d4b667cf6c83c1d640e32d22456d7b5ee)
[BR: BSC#1077564]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
scripts/qapi.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 88e854edec..94d52f7eb5 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -1687,7 +1687,7 @@ class QAPISchema(object):
assert False
def check(self):
- for ent in self._entity_dict.values():
+ for (name, ent) in sorted(self._entity_dict.items()):
ent.check(self)
def visit(self, visitor):