mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
gem5: parse logs and exit with status 1 in case of errors
This commit is contained in:
@@ -3618,11 +3618,11 @@ Basically just calls `panic("BUG!")` for most archs.
|
||||
|
||||
===== Exit emulator on panic
|
||||
|
||||
For testing purposes, it is very useful to quit the emulator automatically with exit status non zero in case of kernel panic, instead of just hanging forever.
|
||||
|
||||
====== Exit QEMU on panic
|
||||
|
||||
For testing purposes, it is very useful to quit the emulator automatically in case of kernel panic, instead of just hanging forever.
|
||||
|
||||
In QEMU, we enable it by default with:
|
||||
Enabled by default with:
|
||||
|
||||
* `panic=-1` command line option which reboots the kernel immediately on panic, see: <<reboot-on-panic>>
|
||||
* QEMU `-no-reboot`, which makes QEMU exit when the guest tries to reboot
|
||||
@@ -3654,7 +3654,7 @@ Source: link:patches/manual/gem5-panic.patch[].
|
||||
|
||||
It does not seem to be exposed to `fs.py`.
|
||||
|
||||
However TODO it still exits with status 0... so we are just parsing the logs for now, like QEMU does.
|
||||
However TODO it still exits with status 0... so we are just parsing the logs for now, as for QEMU.
|
||||
|
||||
Detection seems to be symbol based: it parses the kernel image, and triggers when the PC reaches the address of a symbol: https://github.com/gem5/gem5/blob/1da285dfcc31b904afc27e440544d006aae25b38/src/arch/arm/linux/system.cc#L73
|
||||
|
||||
|
||||
Reference in New Issue
Block a user