Add userspace_reboot_test_prop
This property type represents properties used in CTS tests of userspace
reboot. For example, test.userspace_reboot.requested property which is
used to check that userspace reboot was successful and didn't result in
full reboot, e.g.:
* before test setprop test.userspace_reboot.requested 1
* adb reboot userspace
* wait for boot to complete
* verify that value of test.userspace_reboot.requested is still 1
Test: adb shell setprop test.userspace_reboot.requested 1
Bug: 150901232
Change-Id: I45d187f386149cec08318ea8545ab864b5810ca8
Merged-In: I45d187f386149cec08318ea8545ab864b5810ca8
(cherry picked from commit 3bd53a9cee
)
This commit is contained in:
parent
43bf7eaa48
commit
91c3795b2c
5 changed files with 16 additions and 0 deletions
|
@ -105,6 +105,7 @@
|
|||
userspace_reboot_config_prop
|
||||
userspace_reboot_exported_prop
|
||||
userspace_reboot_log_prop
|
||||
userspace_reboot_test_prop
|
||||
vehicle_hal_prop
|
||||
tv_tuner_resource_mgr_service
|
||||
vendor_apex_file
|
||||
|
|
|
@ -101,6 +101,7 @@ compatible_property_only(`
|
|||
get_prop({coredomain appdomain shell}, userspace_reboot_config_prop)
|
||||
get_prop({coredomain shell}, userspace_reboot_exported_prop)
|
||||
get_prop({coredomain shell}, userspace_reboot_log_prop)
|
||||
get_prop({coredomain shell}, userspace_reboot_test_prop)
|
||||
get_prop({domain -coredomain -appdomain}, vendor_default_prop)
|
||||
')
|
||||
|
||||
|
|
|
@ -91,6 +91,7 @@ sys.boot.reason u:object_r:system_boot_reason_prop:s0
|
|||
sys.boot.reason.last u:object_r:last_boot_reason_prop:s0
|
||||
pm. u:object_r:pm_prop:s0
|
||||
test.sys.boot.reason u:object_r:test_boot_reason_prop:s0
|
||||
test.userspace_reboot.requested u:object_r:userspace_reboot_test_prop:s0
|
||||
sys.lmk. u:object_r:system_lmk_prop:s0
|
||||
sys.trace. u:object_r:system_trace_prop:s0
|
||||
|
||||
|
|
|
@ -73,6 +73,10 @@ allow shell rs_exec:file rx_file_perms;
|
|||
set_prop(shell, lpdumpd_prop);
|
||||
binder_call(shell, lpdumpd)
|
||||
|
||||
# Allow shell to set and read value of properties used for CTS tests of
|
||||
# userspace reboot
|
||||
set_prop(shell, userspace_reboot_test_prop)
|
||||
|
||||
# Allow shell to get encryption policy of /data/local/tmp/, for CTS
|
||||
allowxperm shell shell_data_file:dir ioctl {
|
||||
FS_IOC_GET_ENCRYPTION_POLICY
|
||||
|
|
|
@ -21,6 +21,7 @@ system_internal_prop(last_boot_reason_prop)
|
|||
system_internal_prop(netd_stable_secret_prop)
|
||||
system_internal_prop(pm_prop)
|
||||
system_internal_prop(userspace_reboot_log_prop)
|
||||
system_internal_prop(userspace_reboot_test_prop)
|
||||
system_internal_prop(system_adbd_prop)
|
||||
system_internal_prop(adbd_prop)
|
||||
system_internal_prop(traced_perf_enabled_prop)
|
||||
|
@ -587,3 +588,11 @@ neverallow {
|
|||
} {
|
||||
adbd_prop
|
||||
}:property_service set;
|
||||
|
||||
neverallow {
|
||||
# Only allow init and shell to set userspace_reboot_test_prop
|
||||
-init
|
||||
-shell
|
||||
} {
|
||||
userspace_reboot_test_prop
|
||||
}:property_service set;
|
||||
|
|
Loading…
Reference in a new issue