summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2018-03-19 17:16:29 -0500
committerMark Salyzyn2018-04-18 16:02:16 -0500
commitafd66f2fd3a3a14dfec989c4b2c98a5be4046947 (patch)
tree5ac3fce5c884c24328745a586a4e2634e06e8223 /bootstat
parentd035dbbecf44191af398261b722d72026678eea8 (diff)
downloadplatform-system-core-afd66f2fd3a3a14dfec989c4b2c98a5be4046947.tar.gz
platform-system-core-afd66f2fd3a3a14dfec989c4b2c98a5be4046947.tar.xz
platform-system-core-afd66f2fd3a3a14dfec989c4b2c98a5be4046947.zip
llkd: bootstat: propagate detailed livelock canonical boot reason
Report kernel_panic,sysrq,livelock,<state> reboot reason via last dmesg (pstore console). Add ro.llk.killtest property, which will allow reliable ABA platforms to drop kill test and go directly to kernel panic. This should also allow some manual unit testing of the canonical boot reason report. New canonical boot reasons from llkd are: - kernel_panic,sysrq,livelock,alarm llkd itself locked up (Hail Mary) - kernel_panic,sysrq,livelock,driver uninterrruptible D state - kernel_panic,sysrq,livelock,zombie uninterrruptible Z state Manual test assumptions: - llkd is built by the platform and landed on system partition - unit test is built and landed in /data/nativetest (could land in /data/nativetest64, adjust test correspondingly) - llkd not enabled, ro.llk.enable and ro.llk.killtest are not set by platform allowing test to adjust all the configuration properties and start llkd. - or, llkd is enabled, ro.llk.enable is true, and killtest is disabled, ro.llk.killtest is false, setup by the platform. This breaks the go/apct generic operations of the unit test for llk.zombie and llk.driver as kernel panic results requiring manual intervention otherwise. If test moves to go/apct, then we will be forced to bypass these tests under this condition (but allow them to run if ro.llk.killtest is "off" so specific testing above/below can be run). for i in driver zombie; do adb shell su root setprop ro.llk.killtest off adb shell /data/nativetest/llkd_unit_test/llkd_unit_test --gtest_filter=llkd.${i} adb wait-for-device adb shell su root setprop ro.llk.killtest off sleep 60 adb shell getprop sys.boot.reason adb shell /data/nativetest/llkd_unit_test/llkd_unit_test --gtest_filter=llkd.${i} done Test: llkd_unit_test (see test assumptions) Bug: 33808187 Bug: 72838192 Change-Id: I2b24875376ddfdbc282ba3da5c5b3567de85dbc0
Diffstat (limited to 'bootstat')
-rw-r--r--bootstat/bootstat.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/bootstat/bootstat.cpp b/bootstat/bootstat.cpp
index c2688e92a..8ce9dfcc3 100644
--- a/bootstat/bootstat.cpp
+++ b/bootstat/bootstat.cpp
@@ -303,6 +303,9 @@ const std::map<std::string, int32_t> kBootReasonMap = {
303 {"kernel_panic,init", 158}, 303 {"kernel_panic,init", 158},
304 {"kernel_panic,oom", 159}, 304 {"kernel_panic,oom", 159},
305 {"kernel_panic,stack", 160}, 305 {"kernel_panic,stack", 160},
306 {"kernel_panic,sysrq,livelock,alarm", 161}, // llkd
307 {"kernel_panic,sysrq,livelock,driver", 162}, // llkd
308 {"kernel_panic,sysrq,livelock,zombie", 163}, // llkd
306}; 309};
307 310
308// Converts a string value representing the reason the system booted to an 311// Converts a string value representing the reason the system booted to an