mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
create userland tests
Fix some more tabs. Parse the "Simulated exit code not 0!" string in gem5 and exit with the proper status
This commit is contained in:
30
gem5-shell
30
gem5-shell
@@ -1,17 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
|
||||
import common
|
||||
from shell_helpers import LF
|
||||
|
||||
parser = self.get_argparse(
|
||||
default_args={'gem5':True},
|
||||
argparse_args={'description':'Connect a terminal to a running gem5 instance'}
|
||||
)
|
||||
args = self.setup(parser)
|
||||
sys.exit(self.sh.run_cmd([
|
||||
kwargs['gem5_m5term'], LF,
|
||||
'localhost', LF,
|
||||
str(kwargs['gem5_telnet_port']), LF,
|
||||
]))
|
||||
class Main(common.LkmcCliFunction):
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
defaults={
|
||||
'gem5': True,
|
||||
},
|
||||
description='Connect a terminal to a running gem5 instance',
|
||||
)
|
||||
def timed_main(self):
|
||||
return self.sh.run_cmd([
|
||||
self.env['gem5_m5term'],
|
||||
'localhost',
|
||||
str(self.env['gem5_telnet_port']),
|
||||
LF,
|
||||
])
|
||||
|
||||
if __name__ == '__main__':
|
||||
Main().cli_exit()
|
||||
|
||||
Reference in New Issue
Block a user