run/depot_autopilot: reboot on some kernel faults

This commit is contained in:
Martin Stein 2018-12-05 16:13:57 +01:00 committed by Norman Feske
parent 54d1a676b7
commit 19e928271b

View File

@ -56,6 +56,21 @@ proc autopilot_wait_for_output { wait_for_re timeout_value running_spawn_id } {
expect {
-i $running_spawn_id $platform_msg { puts stderr "Error: platform rebooted unexpectedly"; exit -4 }
-i $running_spawn_id -re $wait_for_re { }
# pistachio kernel fault
-i $running_spawn_id -re {--- "KD# Exception caught" ---} {
puts stderr "Error: Kernel fault";
global reboot
set reboot 1
return
}
# sel4 unknown fault caught by core
-i $running_spawn_id -re {Error: unexpected exception during fault.*stopped} {
puts stderr "Error: Unknown fault";
global reboot
set reboot 1
}
# can happen, for instance, on socat TCP-timeout
eof {
puts stderr "Error: Spawned process died unexpectedly";
global reboot