hwsim tests: Check kernel messages for warnings/bugs
When a test passes but the kernel printed warnings, consider the test to have failed. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
efc58df29c
commit
5061a301e5
2 changed files with 35 additions and 3 deletions
22
tests/hwsim/check_kernel.py
Normal file
22
tests/hwsim/check_kernel.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# kernel message checker module
|
||||
#
|
||||
# Copyright (c) 2013, Intel Corporation
|
||||
#
|
||||
# Author: Johannes Berg <johannes@sipsolutions.net>
|
||||
#
|
||||
# This software may be distributed under the terms of the BSD license.
|
||||
# See README for more details.
|
||||
#
|
||||
"""
|
||||
Tests for kernel messages to find if there were any issues in them.
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
issue = re.compile('(\[[0-9 .]*\] )?(WARNING:|BUG:).*')
|
||||
|
||||
def check_kernel(logfile):
|
||||
for line in open(logfile, 'r'):
|
||||
if issue.match(line):
|
||||
return False
|
||||
return True
|
Loading…
Add table
Add a link
Reference in a new issue