mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
gem5: exit with error status on simulate() limit reached
This commit is contained in:
12
run
12
run
@@ -784,14 +784,18 @@ Extra options to append at the end of the emulator command line.
|
||||
gem5_panic_re = re.compile(b'--- BEGIN LIBC BACKTRACE ---$')
|
||||
line = None
|
||||
for line in logfile:
|
||||
line = line.rstrip()
|
||||
if gem5_panic_re.search(line):
|
||||
exit_status = 1
|
||||
if self.env['userland']:
|
||||
if line is not None:
|
||||
last_line = line.rstrip()
|
||||
last_line = line
|
||||
if last_line is not None:
|
||||
if self.env['userland']:
|
||||
match = re.search(b'Simulated exit code not 0! Exit code is (\d+)', last_line)
|
||||
if match:
|
||||
if match is not None:
|
||||
exit_status = int(match.group(1))
|
||||
print(repr(last_line))
|
||||
if re.search(b'Exiting @ tick \d+ because simulate\(\) limit reached', last_line) is not None:
|
||||
exit_status = 1
|
||||
if not self.env['userland']:
|
||||
if os.path.exists(self.env['guest_terminal_file']):
|
||||
with open(self.env['guest_terminal_file'], 'br') as logfile:
|
||||
|
||||
Reference in New Issue
Block a user