From: Nisarg Shah <nshah@disroot.org>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, ehabkost@redhat.com,
Nisarg Shah <nshah@disroot.org>
Subject: [Qemu-devel] [PATCH] device-crash-test: Convert to Python 3
Date: Thu, 17 Jan 2019 00:03:58 +0530 [thread overview]
Message-ID: <20190116183358.30287-1-nshah@disroot.org> (raw)
Apply 2to3 tool to scripts/device-crash-test.
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>
---
scripts/device-crash-test | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index e93a7c0c84..ecdc9828c2 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -23,7 +23,7 @@
Run QEMU with all combinations of -machine and -device types,
check for crashes and unexpected errors.
"""
-from __future__ import print_function
+
import sys
import os
@@ -272,7 +272,7 @@ def qemuOptsEscape(s):
def formatTestCase(t):
"""Format test case info as "key=value key=value" for prettier logging output"""
- return ' '.join('%s=%s' % (k, v) for k, v in t.items())
+ return ' '.join('%s=%s' % (k, v) for k, v in list(t.items()))
def qomListTypeNames(vm, **kwargs):
@@ -574,7 +574,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)
--
2.19.2
next reply other threads:[~2019-01-16 18:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 18:33 Nisarg Shah [this message]
2019-01-23 18:50 ` [Qemu-devel] [PATCH] device-crash-test: Convert to Python 3 Eduardo Habkost
2019-01-30 18:00 ` Nisarg Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190116183358.30287-1-nshah@disroot.org \
--to=nshah@disroot.org \
--cc=ehabkost@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).