Commit graph

80735 commits

Author SHA1 Message Date
Treehugger Robot
a15e7ab8cf Merge "[gwp-asan] fix tests under clang coverage, and extend invariants" am: a4651021d7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2451045

Change-Id: I67c528d7b81cfb29bffc8183607ed9f05bb2d641
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-23 19:47:06 +00:00
Treehugger Robot
a4651021d7 Merge "[gwp-asan] fix tests under clang coverage, and extend invariants" 2023-02-23 18:31:37 +00:00
Jack Wu
e8d76aae3f Merge "BatteryMonitor: batteryStateOfHealth should be a property" am: bae352bddb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2441728

Change-Id: I7f3a15566a9da89d29b14f998b18c4ef911fb627
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-23 07:29:54 +00:00
Jack Wu
bae352bddb Merge "BatteryMonitor: batteryStateOfHealth should be a property" 2023-02-23 06:45:16 +00:00
Jiyong Park
df10d96f4a Merge "Fix failure on mounting system_ext partition" am: 8437b9a082
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2442800

Change-Id: I9b3b7c159f274cd90b6e27b2d5d67a88ef936e34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-23 04:52:42 +00:00
Daniel Zheng
004148c2b4 Merge "Added support for reboot task" am: 50eb9227e4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2412254

Change-Id: Ib1c81630a7ed812049e071ed15d6370257d6b440
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-23 04:52:11 +00:00
Jiyong Park
8437b9a082 Merge "Fix failure on mounting system_ext partition" 2023-02-23 03:56:40 +00:00
Daniel Zheng
50eb9227e4 Merge "Added support for reboot task" 2023-02-23 03:49:54 +00:00
AleX Pelosi
ff7089295a BatteryMonitor: batteryStateOfHealth should be a property
Bug: 251427118
Test: m
Change-Id: I21bcd160f51cf8818d0c3c8c54c615314808e586
Signed-off-by: AleX Pelosi <apelosi@google.com>
2023-02-23 01:22:34 +00:00
Daniel Zheng
71b3b43495 Added support for reboot task
Test: tested on raven device
Change-Id: I4935d720f567e70da95ea8da37f3404b80b313c8
Bug: 194686221

Changed reboot {target} to work off tasks. reboot-{target} commands are
also supported.

Test: tested reboot on raven device
Change-Id: I05aed269d121a5d651c1ab1180a1b4878ae213fd

Modified load_buf to be able to find images in $OUT directory

Test: tested flash {partition} and flash {partition} {img_name} on raven
device

Change-Id: I3879792d11ad15bc910670853d2a7fe200fcc66f
2023-02-23 00:15:08 +00:00
Mitch Phillips
70aa219034 [gwp-asan] fix tests under clang coverage, and extend invariants
1. Fixes this test under clang coverage, which is run under presubmit
   for TEST_MAPPING files. When we spawn under a minijail, and the
   process exited normally (which is the case for recoverable), clang
   coverage would use atexit handlers to dump some stuff using banned
   prctl's and other syscalls. Instead of allow-listing them all which
   sounds like a huge pain, call _exit() which skips those handlers.

2. Extends the invariant testing to make sure that recoverable GWP-ASan
   recovers both the first time, and a second time in a different slot.

Bug: N/A
Test: CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*" atest debuggerd_test
Change-Id: I6059e21db4c2898b1c9777a00d2a54497d80ef79
2023-02-22 12:27:37 -08:00
Treehugger Robot
1cf226887e Merge "Fix labels on /data/system/shutdown-checkpoints/" am: 25f451ab56
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2425794

Change-Id: Ic869f7fdf8e40857132e0f32f90d0966eb0332bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 11:44:51 +00:00
Treehugger Robot
25f451ab56 Merge "Fix labels on /data/system/shutdown-checkpoints/" 2023-02-22 10:21:25 +00:00
Woody Lin
0bcf0bf8f3 Fix labels on /data/system/shutdown-checkpoints/
Bug: 260366497
Bug: 264600011
Test: The correct label is assigned to dir after taking reboot
Test: Both system_server and dumpstate can access it
Change-Id: Icecbb59ddf936088aa3873bf1b143a08f035fefe
2023-02-22 15:57:17 +08:00
Bart Van Assche
860d84cf55 Merge changes I71b34181,Ibd05137a am: 8f09cb5ba6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2444305

Change-Id: I95eb0658b3563effd23722fdb8ba74b30cee8f99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 00:17:07 +00:00
Bart Van Assche
8f09cb5ba6 Merge changes I71b34181,Ibd05137a
* changes:
  init: Document the locking strategy used in class PropWaiterState
  init: Document the locking strategy in class ShutdownState
2023-02-21 23:15:14 +00:00
Lianjun Huang
ccd094cd4e Fix failure on mounting system_ext partition
There can be more than one fstab entry of system partition.
For example, the filesystem of one entry is ext4 and another is erofs.

system /system ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
system /system erofs ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey

If both filesystems of system and system_ext paritions are erofs,
only the ext4 fstab entry will be returned by GetEntryForMountPoint,
and system_ext cann't be mounted.

So we need to return both of the fstab entries and try all of them.

Signed-off-by: Lianjun Huang <huanglianjun@xiaomi.com>
Change-Id: I407553d48b1749cd0554f057a6bfd38daa96fdcb
Signed-off-by: Lianjun Huang <huanglianjun@xiaomi.corp-partner.google.com>
2023-02-20 16:50:03 +08:00
Bart Van Assche
b6b7ccc24f init: Document the locking strategy used in class PropWaiterState
Let the compiler verify that lock_ is held when any of the data members
are accessed.

Bug: 266255006
Change-Id: I71b341815d84ab530627d934ad4d4681b652b9d8
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-17 13:55:11 -08:00
Bart Van Assche
68a59e1c72 init: Document the locking strategy in class ShutdownState
Let the compiler verify that shutdown_command_lock_ is held when
shutdown_command_ is accessed.

Bug: 266255006
Change-Id: Ibd05137ab65e20f247f35bbb2bb1865e05f51f41
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-17 13:55:11 -08:00
Treehugger Robot
275a1b0bff Merge "Add KM_SET_ATTESTATION_IDS_KM3 to enum list" am: 16ab2b67f7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2440392

Change-Id: I00d40318c75a8a58c34bbd8fe28eccbee95606af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-17 00:54:48 +00:00
Treehugger Robot
16ab2b67f7 Merge "Add KM_SET_ATTESTATION_IDS_KM3 to enum list" 2023-02-16 23:56:16 +00:00
Donnie Pollitz
dedd899baa Add KM_SET_ATTESTATION_IDS_KM3 to enum list
* This command is needed to support provisioning KeyMintv3 attestation IDs

Bug: 265381212
Test: Ran KM Vts
Change-Id: I9b9bf3753b90c58096fa85a4e7303b47eaafe31f
Signed-off-by: Donnie Pollitz <donpollitz@google.com>
2023-02-16 10:59:47 +01:00
Dmitrii Merkurev
09e817e97a Merge "fastboot: Use copy constructor to copy fastboot match callback" am: 45380e4ace
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2438273

Change-Id: I1241f1a3d1feb78c01b25079ff9f8ae1c791de54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-15 19:39:22 +00:00
Dmitrii Merkurev
eff5dbdf4e Merge "fastboot: Follow fastboot pattern to show network-connected device status" am: 96ea7b9ccf
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2438274

Change-Id: I6c09cd92f9b022f11e8df1cc888d8991df107241
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-15 19:39:00 +00:00
Bart Van Assche
7d85beda6e Merge changes Ib9a6b75b,Ifb71fa24,If329e912 am: 678516efa1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2435914

Change-Id: I0775faf62f3ec146f16ea3d76983cfa4d5b1b5eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-15 19:38:48 +00:00
Dmitrii Merkurev
45380e4ace Merge "fastboot: Use copy constructor to copy fastboot match callback" 2023-02-15 19:05:55 +00:00
Dmitrii Merkurev
96ea7b9ccf Merge "fastboot: Follow fastboot pattern to show network-connected device status" 2023-02-15 19:05:34 +00:00
Bart Van Assche
678516efa1 Merge changes Ib9a6b75b,Ifb71fa24,If329e912
* changes:
  init_test: Close all file descriptors before calling execv()
  init_test: Fix a race condition
  init_test: Simplify the gentle_kill test
2023-02-15 18:56:42 +00:00
David Anderson
6be3810b15 Merge "snapuserd: Use fixtures in snapuserd_test." am: 9bbe597b59
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2436355

Change-Id: I68940a117f503bf619daca6f7c1ce372ff36a445
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-15 18:47:54 +00:00
David Anderson
9bbe597b59 Merge "snapuserd: Use fixtures in snapuserd_test." 2023-02-15 17:51:48 +00:00
Bart Van Assche
468067a204 init_test: Close all file descriptors before calling execv()
This change improves test reliability.

Change-Id: Ib9a6b75bbd81968eb7e2fd90ea567155bc8355f7
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-15 09:27:32 -08:00
Bart Van Assche
878560dae0 init_test: Fix a race condition
Wait until strace has attached to the service instead of assuming that
it has attached after one second.

Change-Id: Ifb71fa2419563e1334d8500ea867ec92121395e0
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-15 09:27:32 -08:00
Bart Van Assche
947d75f0b8 init_test: Simplify the gentle_kill test
Remove the ConvertToArgv() function. Do not cast the std::string::find()
result. Make the strace path absolute.

Change-Id: If329e91275c834ba375863e40901f6be07a5f347
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-02-15 09:27:32 -08:00
Dmitrii Merkurev
c48cd9f6c0 fastboot: Follow fastboot pattern to show network-connected device status
Bug: 269348113
Test: checked output
Change-Id: Ie6c48d36bd67fcb060ad3f4a35185fd9cc59ff81
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2023-02-15 15:34:58 +00:00
Dmitrii Merkurev
b5b8276db1 fastboot: Use copy constructor to copy fastboot match callback
Test: fastboot -s 15171FDF6000CV getvar all on OSX
Bug: 269348113
Change-Id: I968626c95ee19ea348bac48cac308e3c817e0d55
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2023-02-15 15:21:22 +00:00
Treehugger Robot
941a2caa4b Merge "Fastboot: Add new TEXT message to protocol to handle long lines." am: 368a908334
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2372748

Change-Id: I24528bb617631ed1af2d6b025c9f8dd8a6aff672
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-15 13:11:27 +00:00
Treehugger Robot
368a908334 Merge "Fastboot: Add new TEXT message to protocol to handle long lines." 2023-02-15 11:49:24 +00:00
Jeffrey Huang
712bc86ae0 Merge "Create new directory for statsd restricted configs" am: 5c1d43f732
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2435916

Change-Id: I8dff675b7dae6e3934852f9315469716e66c4fa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-15 01:36:14 +00:00
David Anderson
5169ec88c6 snapuserd: Use fixtures in snapuserd_test.
This refactors snapuserd_test to use SnapuserdTest as a fixture, to
avoid needing a separate harness instance.

Bug: 269361087
Test: snapuserd_test
Change-Id: Iffdc7b621dbe0aff72eff790e7af3f6bb33036ee
2023-02-14 16:59:31 -08:00
Jeffrey Huang
5c1d43f732 Merge "Create new directory for statsd restricted configs" 2023-02-15 00:26:17 +00:00
Raphael Herouart
99097cc020 Fastboot: Add new TEXT message to protocol to handle long lines.
Trusty Benchmarks need to be evaluated in ABL which is much more
controlled than linux. However fastboot prints evry atomic message from
trusty/abl on its own line starting with "(bootloader)"

Bug: 263454481
Test: - "fastboot oem trusty runtest trusty.hwrng.bench"
Change-Id: I99847a8cc54457c8ec809e219736325dce0ac891
2023-02-14 19:58:42 +00:00
Jeffrey Huang
01a73d74d8 Create new directory for statsd restricted configs
Bug: 264407489
Test: m -j
Change-Id: I10e7d6a4a6d011eb9a7453191ab90771b82aa9b3
2023-02-14 11:25:45 -08:00
Treehugger Robot
5c2030d470 Merge "Convert Gatekeeper from HIDL to AIDL" am: d14a7551d5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2419421

Change-Id: I2a27fbd3c9e9efd03b042c3657e8e475b3f98be3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 18:56:35 +00:00
David Anderson
15b9050a40 Merge "storaged: use correct accumulate variable for publishing disk stats" am: 14c7361f9c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2433362

Change-Id: Ib9b375126768f5686c75979b230fbb24318287e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 18:53:42 +00:00
Treehugger Robot
d14a7551d5 Merge "Convert Gatekeeper from HIDL to AIDL" 2023-02-14 17:48:17 +00:00
David Anderson
14c7361f9c Merge "storaged: use correct accumulate variable for publishing disk stats" 2023-02-14 17:34:50 +00:00
David Anderson
602b94be6d Merge "fastboot: Add a mock transport and some driver tests." am: 2d6c30da7f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2434252

Change-Id: I3dda0b99dd4a9b5b333ded4fadc8f9ab9ad5eff4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 17:00:07 +00:00
David Anderson
2d6c30da7f Merge "fastboot: Add a mock transport and some driver tests." 2023-02-14 16:05:44 +00:00
David Anderson
e6d8dd3e15 fastboot: Add a mock transport and some driver tests.
Bug: N/A
Test: fastboot_test
Change-Id: I08d8dfedcc7e9dad9ce418e0f3aaf5ac69a3a2a2
2023-02-13 18:59:48 -08:00
David Anderson
2e78bc1e55 Merge "fastboot: Add a test for super_flash_helper." am: 6c5b6a8705
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2428713

Change-Id: I15004772381d11d027724a4ba27ff46d1e640bef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 02:50:54 +00:00