mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 03:01:36 +01:00
common.run_cmd: assert result == 0 by default
This commit is contained in:
7
run
7
run
@@ -118,7 +118,7 @@ def main(args, extra_args=None):
|
||||
# This is to run gem5 from a prebuilt download.
|
||||
if (not args.baremetal is None) or (not os.path.exists(common.linux_image)):
|
||||
raise_image_not_found()
|
||||
assert common.run_cmd([os.path.join(common.extract_vmlinux, common.linux_image)]) == 0
|
||||
common.run_cmd([os.path.join(common.extract_vmlinux, common.linux_image)])
|
||||
os.makedirs(os.path.dirname(common.gem5_readfile), exist_ok=True)
|
||||
with open(common.gem5_readfile, 'w') as readfile:
|
||||
readfile.write(args.gem5_readfile)
|
||||
@@ -313,10 +313,7 @@ def main(args, extra_args=None):
|
||||
out_file = None
|
||||
else:
|
||||
out_file = common.termout_file
|
||||
returncode = common.run_cmd(cmd, cmd_file=common.run_cmd_file, out_file=out_file, extra_env=extra_env)
|
||||
if returncode != 0:
|
||||
common.log_error('simulator exited with status != 0')
|
||||
return returncode
|
||||
common.run_cmd(cmd, cmd_file=common.run_cmd_file, out_file=out_file, extra_env=extra_env)
|
||||
# Check if guest panicked.
|
||||
if args.gem5:
|
||||
# We have to do some parsing here because gem5 exits with status 0 even when panic happens.
|
||||
|
||||
Reference in New Issue
Block a user