qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 1/6] device-crash-test: Make whitelist code a bit more


From: Eduardo Habkost
Subject: [Qemu-devel] [RFC 1/6] device-crash-test: Make whitelist code a bit more flexible
Date: Tue, 26 Sep 2017 20:07:04 -0300

Allow test results without the 'log' and 'exitcode' keys.  The
new device_add code won't report exitcode/log because multiple
devices will be tested on a single QEMU run.

Signed-off-by: Eduardo Habkost <address@hidden>
---
 scripts/device-crash-test | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index ddc8f72eca..598720ffa9 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -284,9 +284,10 @@ def whitelistResultMatch(wl, r):
     """
     assert whitelistTestCaseMatch(wl, r['testcase'])
     return ((wl.get('exitcode', 1) is None or
-             r['exitcode'] == wl.get('exitcode', 1)) and
+             r.get('exitcode') == wl.get('exitcode', 1)) and
             ('log' not in wl or
-             re.search(wl['log'], r['log'], re.MULTILINE)))
+             ('log' in r and
+              re.search(wl['log'], r['log'], re.MULTILINE))))
 
 
 def checkResultWhitelist(r):
-- 
2.13.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]