aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNisarg Shah <nshah@disroot.org>2019-01-17 00:03:58 +0530
committerEduardo Habkost <ehabkost@redhat.com>2019-01-25 11:41:33 -0200
commit55e0a3463528f0588e4b8813baddc4179777b3e3 (patch)
tree5949119b5b5885ec2c3d7385c9c6692c2851dbc6
parent9dd0d8111fbb8015db75a38933aee1d45f9e64a3 (diff)
downloadqemu-55e0a3463528f0588e4b8813baddc4179777b3e3.zip
qemu-55e0a3463528f0588e4b8813baddc4179777b3e3.tar.gz
qemu-55e0a3463528f0588e4b8813baddc4179777b3e3.tar.bz2
device-crash-test: Python 3 compatibility fix
Restrict whitelist entry stats in debug mode to be sorted only by "count", since Python 3 does not implicitly support comparing dictionaries. Signed-off-by: Nisarg Shah <nshah@disroot.org> Message-Id: <20190116183358.30287-1-nshah@disroot.org> [ehabkost: removed 2 unnecessary hunks from patch] [ehabkost: edited commit message] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rwxr-xr-xscripts/device-crash-test3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 483dafb..2a13fa4 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -557,7 +557,8 @@ def main():
logger.info("Skipped %d test cases", skipped)
if args.debug:
- stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in enumerate(ERROR_WHITELIST)])
+ stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in
+ enumerate(ERROR_WHITELIST)], key=lambda x: x[0])
for count, wl in stats:
dbg("whitelist entry stats: %d: %r", count, wl)