bootstat: test reboot rescueparty

This test fails on most devices, gives us a report of devices that
do not propagate the boot reason via the bootloader.  This should
become a bootloader required test.

Test: boot_reason_test.sh optional_rescueparty
Change-Id: Ibdc7b23b025e5d89d659ff08083b2e071343923c
This commit is contained in:
Mark Salyzyn 2018-05-07 09:46:06 -07:00
parent 48cf760bea
commit cd7e122285
1 changed files with 17 additions and 2 deletions

View File

@ -312,6 +312,7 @@ init : processing action (boot) from (/system/etc/init/bootstat.rc
init : processing action (ro.boot.bootreason=*) from (/system/etc/init/bootstat.rc
init : processing action (sys.boot_completed=1 && sys.logbootcomplete=1) from (/system/etc/init/bootstat.rc
(/system/bin/bootstat --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l)'
(/system/bin/bootstat --set_system_boot_reason --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l)'
(/system/bin/bootstat -r post_decrypt_time_elapsed)'
init : Command 'exec - system log -- /system/bin/bootstat --record_boot_complete' action=sys.boot_completed=1 && sys.logbootcomplete=1 (/system/etc/init/bootstat.rc:
init : Command 'exec - system log -- /system/bin/bootstat --record_boot_reason' action=sys.boot_completed=1 && sys.logbootcomplete=1 (/system/etc/init/bootstat.rc:
@ -582,9 +583,9 @@ blind_reboot_test() {
duration_test
case ${TEST} in
bootloader | recovery | cold | hard | warm ) reason=${TEST} ;;
*) reason=reboot,${TEST} ;;
*) reason=reboot,${TEST#optional_} ;;
esac
adb reboot ${TEST}
adb reboot ${TEST#optional_}
wait_for_screen
bootloader_reason=`validate_property ro.boot.bootreason`
EXPECT_PROPERTY ro.boot.bootreason ${bootloader_reason}
@ -948,6 +949,20 @@ test_adb_reboot() {
report_bootstat_logs reboot,adb
}
[ "USAGE: test_rescueparty
rescueparty test
- adb reboot rescueparty
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- adb shell getprop ro.boot.bootreason
- NB: should report reboot,rescueparty" ]
test_optional_rescueparty() {
blind_reboot_test
echo "WARNING: legacy devices are allowed to fail following ro.boot.bootreason result" >&2
EXPECT_PROPERTY ro.boot.bootreason reboot,rescueparty
}
[ "USAGE: test_Its_Just_So_Hard_reboot
Its Just So Hard reboot test: