Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: client/bin/site_utils.py

Issue 6544018: kernel_BootMessagesServer: initial add of new test (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: Fix spacing. Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | server/site_tests/kernel_BootMessagesServer/control » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/bin/site_utils.py
diff --git a/client/bin/site_utils.py b/client/bin/site_utils.py
index 8eb52f49894a8827eea2c3db23e99ae23eacaa8b..b6cc26fc0a2ae75cafa475477430773e0dc06246 100644
--- a/client/bin/site_utils.py
+++ b/client/bin/site_utils.py
@@ -61,3 +61,28 @@ def save_vm_state(checkpoint):
serial = open('/dev/ttyUSB0', 'w')
serial.write("savevm %s\r\n" % checkpoint)
logging.info('Done saving VM state "%s"' % checkpoint)
+
+
+def check_raw_dmesg(dmesg, message_level, whitelist):
+ """Checks dmesg for unexpected warnings.
+
+ This function parses dmesg for message with message_level <= message_level
+ which do not appear in the whitelist.
+
+ Arguments:
+ dmesg - string containing raw dmesg buffer
+ message_level - minimum message priority to check
+ whitelist - messages to ignore
+
+ Returns:
+ List of unexpected warnings
+ """
+
+ unexpected = []
+ for line in dmesg.splitlines():
+ if int(line[1]) <= message_level:
+ if not 'used greatest stack depth' in line:
+ stripped_line = line.split('] ', 1)[1]
+ if not stripped_line in whitelist:
+ unexpected.append(stripped_line)
+ return unexpected
« no previous file with comments | « no previous file | server/site_tests/kernel_BootMessagesServer/control » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698