Commit Graph

36129 Commits

Author SHA1 Message Date
Christopher Ferris 0523275893 Add support for boolean literals.
Bug: 67678053

Test: Passes new unit tests.
Change-Id: I9d0ede56aa5d7071e682f366870148320545406e
2017-10-11 15:23:45 -07:00
Treehugger Robot 81dd96c0da Merge "Add missing includes." 2017-10-11 22:17:38 +00:00
Mark Salyzyn 4f9ba3f0ba Merge "bootstat: test: inject ro.boot.bootreason values"
am: 3bc8d4529e

Change-Id: I6295d929d3042f9d89f17abdb80f4564710ebe0a
2017-10-11 21:06:39 +00:00
Mark Salyzyn 3bc8d4529e Merge "bootstat: test: inject ro.boot.bootreason values" 2017-10-11 20:52:46 +00:00
Mark Salyzyn 9a3870490a bootstat: test: inject ro.boot.bootreason values
Adding a set of automated engineering unit tests with a strict list of
prerequisites.  Not meant for "user" builds.  Must have a crafted
bootloader that does not set the boot reason.  Only works on platforms
where the bootloader either by accident or specifically does not set
the ro.boot.bootreason via kernel command line configuration
androidboot.bootreason=.  If the tests do not have the prerequisites,
the test will report success, but with protest.

These new tests should work on current Hikey and Hikey960 bootloaders
but could very well become obsolete if those platform bootloaders
start setting the boot reason.

We do not want a platform solution as it could allow a third party to
override the bootloader boot reason.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I1793184a8484b83e1d9077475bc65af9816dadf7
2017-10-11 13:48:33 -07:00
Mark Salyzyn 9d00f0079d Merge "bootstat: test: refine reported test durations"
am: bb52cbf35d

Change-Id: I91c3a4fd36126033e70688f5fbbd3fa20015ad3e
2017-10-11 20:46:25 +00:00
Mark Salyzyn bd7bbf853a Merge "bootstat: Add some reserved sys.boot.reason values to enumeration"
am: 444e3a9f74

Change-Id: I0e0bfcd1e351e58f272a51c6c97bcd7cc52e32a1
2017-10-11 20:45:04 +00:00
Mark Salyzyn bb52cbf35d Merge "bootstat: test: refine reported test durations" 2017-10-11 20:33:05 +00:00
Mark Salyzyn 444e3a9f74 Merge "bootstat: Add some reserved sys.boot.reason values to enumeration" 2017-10-11 20:32:00 +00:00
Dan Albert f0d3f6716a Add missing includes.
Test: mma
Bug: None
Merged-In: I8a3390d186aec73f55ae2be2c7b4b2deffed810f
Change-Id: I8a3390d186aec73f55ae2be2c7b4b2deffed810f
2017-10-11 13:31:43 -07:00
Dmitry Shmidt 5884f608d9 Merge "console: Add setenv HOSTNAME console"
am: d2c66b31a0

Change-Id: I85addec989872b9e66f0e68c4fea20b969a1eb25
2017-10-11 20:28:49 +00:00
Treehugger Robot d2c66b31a0 Merge "console: Add setenv HOSTNAME console" 2017-10-11 20:22:48 +00:00
Dan Albert c38057a603 Add missing includes.
Test: mma
Bug: None
Change-Id: I5ee2d09eeac2b4e2056719498916cbdfb79725d2
2017-10-11 13:19:09 -07:00
James Hawkins 79afacdd61 Merge "bootstat: Special case logging for empty boot reason."
am: b93357bdb2

Change-Id: I07374a59888eba48d1f9b8d112729e8d793adca6
2017-10-11 20:07:55 +00:00
James Hawkins b93357bdb2 Merge "bootstat: Special case logging for empty boot reason." 2017-10-11 19:48:49 +00:00
Dmitry Shmidt d0fb2510e2 console: Add setenv HOSTNAME console
Bug: 67678999
Test: Run serial console on Hikey

Change-Id: Ia5fa9c2af4771508d96545f6a8814a81d5ccee3c
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-10-11 11:20:02 -07:00
Mark Salyzyn 2450cb1a30 bootstat: test: refine reported test durations
Use actual test durations to refine future duration estimates.
Better estimates are cosmetic, but lend confidence to the test
results.

SideEffects: none
Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I49143b78a6dc6fb21838a3d6c70b7eb5a8b4cba5
2017-10-11 10:56:54 -07:00
Mark Salyzyn 243fa29804 bootstat: Add some reserved sys.boot.reason values to enumeration
Add cold,powerkey, warm,s3_wakeup and hard,hw_reset so that
sys.boot.reason values can also be enumerated.  Also add
some reserved speculative entries associated with forced
suspend to RAM and DISK; shutdown,suspend and shutdown,hibernate
respectively.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 67636061
Change-Id: Ic43523748e6006aaca882f8eec7c1f0c08431bd8
2017-10-11 10:56:42 -07:00
Xiaolei Yu c39caafbbb libsparse: fix building on linux host.
memset is declared in <string.h>

Test: builds and works on host

Change-Id: I224a01c78ee1d0c2f8d5e86eef10c84c8960cbc0
2017-10-11 15:37:52 +08:00
Bowgo Tsai a4b15d7e2c Merge "fs_mgr: removing __BEGIN_DECLS and __END_DECLS"
am: 85b80dc18d

Change-Id: I6c86972b32534f7962656531de072a2ccc654ed8
2017-10-11 01:53:35 +00:00
Treehugger Robot 85b80dc18d Merge "fs_mgr: removing __BEGIN_DECLS and __END_DECLS" 2017-10-11 01:43:11 +00:00
James Hawkins 25f7122512 bootstat: Special case logging for empty boot reason.
Empty boot reason is mostly unexpected but may take up the bulk of
unknown reported boot reason values.

Bug: none
Test: none
Change-Id: I9978658c2b052d5cf5d28299861b0d1125ba9fc0
2017-10-10 16:37:05 -07:00
Josh Gao 877747f1f6 Merge "libdebuggerd: fix tombstone tests."
am: 8eada2a90f

Change-Id: I08437a54100f4ade155a7a5db6af7ab92dec1167
2017-10-10 23:16:12 +00:00
Josh Gao 8eada2a90f Merge "libdebuggerd: fix tombstone tests." 2017-10-10 23:05:12 +00:00
Tom Cherry 31121cafec Move some properties users to __system_property_read_callback()
This is needed if they will ever handle ro. properties that have
values longer than 92 characters.

Bug: 23102347
Bug: 34954705
Test: read and write properties with value length > 92 characters
Change-Id: I44aa135c97ec010f12162c30f743387810ae2c5d
2017-10-10 15:03:33 -07:00
Josh Gao 1ce8e14568 libdebuggerd: fix tombstone tests.
Update the tests to match new output (and stop pluralizing '1 entries').

Test: `debuggerd_test{32,64} --gtest_filter="TombstoneTest.*" on hikey960
Change-Id: I16b0335715303252fad3a35d6a053a50fefdac30
2017-10-10 13:55:44 -07:00
Mark Salyzyn cfed5e795a Merge "init+bootstat: reduce last reboot reason to canonical alias"
am: 613a5a97e0

Change-Id: I3217fe94b0b3637521ef3a9f455124155001dd0d
2017-10-10 19:26:14 +00:00
Mark Salyzyn 613a5a97e0 Merge "init+bootstat: reduce last reboot reason to canonical alias" 2017-10-10 19:18:19 +00:00
Mark Salyzyn 6290982ee3 init+bootstat: reduce last reboot reason to canonical alias
To make parsing easier for last reboot reason.  This also ensures that
last boot reason matches the content that is typically returned by the
bootloader or in turn landed in the canonical system boot reason.

Simplify parsing in bootstat.  Adjust and fix boot_reason_test.sh for
new reality.  Allow boot reason tests battery and kernel_panic to pass
if device does not support pstore (empty before and after the test).
If device somehow landed in fastboot mode while waiting for the
display, issue a fastboot reboot to move the test along.  Some cleanup
and standardization changes to the test script.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I97d5467c0b4a6d65df3525f1a2d0051db813d5ad
2017-10-10 09:37:59 -07:00
Bowgo Tsai d837f837ad fs_mgr: removing __BEGIN_DECLS and __END_DECLS
fs_mgr isn't usable by C now as we've migrated all fs_mgr clients in AOSP
to CPP. Removing the support for C clients.

Bug: 67024518
Bug: 67444051
Test: boot sailfish

Change-Id: Iac57f51eb6a524c6dcdc625c83af75602b4f9b3b
2017-10-10 18:17:29 +08:00
Nick Kralevich 7e772f8194 Merge "set O_CLOEXEC on /dev/ashmem"
am: be729702ae

Change-Id: Ib308d27bd05d9d824772ab76564b2ed1487e09d3
2017-10-09 22:59:32 +00:00
Treehugger Robot be729702ae Merge "set O_CLOEXEC on /dev/ashmem" 2017-10-09 22:39:47 +00:00
Nick Kralevich 30046acdb2 set O_CLOEXEC on /dev/ashmem
Ensure FDs don't leak across exec() boundaries.

Test: builds and boots. No obvious issues.
Change-Id: I00347b489ddb146b9d33442626f0e89a6cf26551
2017-10-09 13:19:36 -07:00
Jeffrey Vander Stoep ceb5dea905 Merge "Allow redeclaring typeattributes"
am: f8bc6cee3f

Change-Id: I119e687a3aaf397ac38365728f6bf9e7c24c1067
2017-10-08 04:08:45 +00:00
Jeffrey Vander Stoep f8bc6cee3f Merge "Allow redeclaring typeattributes" 2017-10-08 04:02:55 +00:00
Jeff Vander Stoep 5e9ba3c50b Allow redeclaring typeattributes
Allows partners to add a new attribute definition to their public
policy without causing a compatibility failure with the AOSP system
image.

Bug: 67092827
Bug: 37915794
Test: build and boot aosp_sailfish with a new type declared in public
    policy.

Change-Id: I3899065affb6806ae9080e1a7dfa5a6f368370f0
2017-10-06 17:04:28 -07:00
James Hawkins add19af4f7 Merge "libmetricslogger: Fix the out-of-sync proto IDs for boot reason."
am: 732003429e

Change-Id: Id6db3ff466099d18698c49d8452df44dec3d27b5
2017-10-06 21:41:54 +00:00
James Hawkins 732003429e Merge "libmetricslogger: Fix the out-of-sync proto IDs for boot reason." 2017-10-06 21:33:58 +00:00
James Hawkins f01dbc30ef libmetricslogger: Fix the out-of-sync proto IDs for boot reason.
Long-term fix is to generate from proto directly. b/65625014

Bug: 67508816
Test: None
Change-Id: Ifa671fa5d3816807836fd18cd66a12a7caebb5a1
2017-10-06 14:30:08 -07:00
Tom Cherry 2f5b8bb3f0 Merge "init: use ro.init.subcontexts_enabled to enable subcontexts"
am: 99016bce92

Change-Id: If410f650dd67577957d653ecd0b1a1e5a45dd14a
2017-10-06 20:27:05 +00:00
Tom Cherry 99016bce92 Merge "init: use ro.init.subcontexts_enabled to enable subcontexts" 2017-10-06 20:12:53 +00:00
Mark Salyzyn fc3f7ec5c3 Merge "bootstat: system_boot_reason does not handle reboot_<reason> case"
am: 0f058759b0

Change-Id: I455b85ffe3af699d5206a577931f87a2777a5779
2017-10-06 18:13:11 +00:00
Mark Salyzyn 0f058759b0 Merge "bootstat: system_boot_reason does not handle reboot_<reason> case" 2017-10-06 18:07:55 +00:00
Tom Cherry 79193a42e7 init: use ro.init.subcontexts_enabled to enable subcontexts
As SEPolicy is developed, use this property to enable/disable
subcontexts.

Bug: 62875318
Test: boot device with/without subcontexts
Change-Id: Ieb879836a71c72d4de1bb16514d083d52480bf9a
2017-10-06 10:37:09 -07:00
Christopher Ferris 791af78e96 Merge "Use Unwinder object for unwind tool."
am: 283ca30651

Change-Id: I33b8576799671c8ccc3923eaebfa95cbf6286df4
2017-10-06 17:17:01 +00:00
Christopher Ferris 283ca30651 Merge "Use Unwinder object for unwind tool." 2017-10-06 17:08:30 +00:00
Christopher Ferris ae3b136506 Use Unwinder object for unwind tool.
Test: Ran unwind on arm and arm64 processes.
Change-Id: I8a2a3ed31482044fe51d7e0d8c7f5588d5aad81c
2017-10-05 16:05:44 -07:00
Mark Salyzyn 0af71a5327 bootstat: system_boot_reason does not handle reboot_<reason> case
Heuristic would translate reboot_<reason> to reboot._<reason>. Add
checking/squashing for leading comma (,) _or_ underscore (_).

Test: compile
Bug: 63736262
Change-Id: I7ef4930ec8c064a8151183ac08d292931a8584c8
2017-10-05 14:42:08 -07:00
Christopher Ferris 18d4e59725 Merge "Update the Unwinder object and add tests."
am: 9e6c11da18

Change-Id: I5f4ee3b7e87421d3c329b211d939ab054c72e3e1
2017-10-05 20:55:01 +00:00
Christopher Ferris 9e6c11da18 Merge "Update the Unwinder object and add tests." 2017-10-05 20:46:01 +00:00