mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
run: fix error log parsing
This commit is contained in:
4
run
4
run
@@ -398,13 +398,13 @@ def main(args, extra_args=None):
|
|||||||
with open(common.termout_file, 'br') as logfile:
|
with open(common.termout_file, 'br') as logfile:
|
||||||
for line in logfile:
|
for line in logfile:
|
||||||
if panic_re.search(line):
|
if panic_re.search(line):
|
||||||
error_string_found = true
|
error_string_found = True
|
||||||
with open(common.guest_terminal_file, 'br') as logfile:
|
with open(common.guest_terminal_file, 'br') as logfile:
|
||||||
lines = logfile.readlines()
|
lines = logfile.readlines()
|
||||||
if lines:
|
if lines:
|
||||||
last_line = lines[-1]
|
last_line = lines[-1]
|
||||||
if last_line.rstrip() == common.magic_fail_string:
|
if last_line.rstrip() == common.magic_fail_string:
|
||||||
error_string_found = true
|
error_string_found = True
|
||||||
if error_string_found:
|
if error_string_found:
|
||||||
common.log_error('simulation error detected by parsing logs')
|
common.log_error('simulation error detected by parsing logs')
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user