Commit graph

81182 commits

Author SHA1 Message Date
David Anderson
78d8d5d9de snapuserd: Remove IByteSink usage from legacy snapuserd.
Bug: 278637212
Test: vabc_legacy_tests
      apply ota on CF w/ userspace snapshots disabled
Change-Id: Ia17bcc862ed9a7d7b78732139f457cac58fa79b9
2023-04-28 14:53:41 -07:00
David Anderson
ed4c853d14 libsnapshot: Disable another legacy merge path in tests.
Bug: 279009697
Test: presubmit
Change-Id: I1954b38f497bb8e4f7aa288e80541ac9ad5c075c
2023-04-28 14:53:41 -07:00
David Anderson
2e998a43e1 Merge "libsnapshot: Replace IByteSink usage in snapshot_reader." 2023-04-28 18:21:13 +00:00
Vincent Donnefort
954cc2ad2c Merge "ramdisk_node_list: Add urandom node" 2023-04-28 16:32:19 +00:00
Vincent Donnefort
b6e3d145aa ramdisk_node_list: Add urandom node
Bionic requires random numbers to init the shadow call stack. Those
numbers are obtained via the syscall getrandom (non-blocking) and will
fallback to /dev/urandom if the former fails.

When loading pKVM modules, we are so early in the boot process that the
only source of entropy for the linux RNG are the architecture random
number generators... which might be available on some platforms. Without
any source of entropy, the only way of generating a random number is to
try to generate some, which is what the bionic fallback expects via
urandom.

As a consequence, add the urandom node to the initramfs.

Bug: 274876849
Change-Id: I164b08f026a238dad9f27a345bdef96717f2aa74
2023-04-28 09:51:05 +01:00
Maciej Żenczykowski
e37468b295 remove inprocess tethering
Test: TreeHugger
Bug: 279942846
Change-Id: Ia3a5d289cceac96d310e04fbae3588789cc859ca
2023-04-27 19:27:57 +00:00
Pawan Wagh
242d5fb816 Merge "Update return values in main" 2023-04-27 18:21:38 +00:00
David Anderson
112dfd1754 libsnapshot: Replace IByteSink usage in snapshot_reader.
Bug: 278637212
Test: vts_libsnapshot_test
Change-Id: I2e684c91ed4a81c984d4bd6a3a9f1e0221aaee01
2023-04-27 08:03:41 -07:00
David Anderson
cd21e051bd Merge changes I69f41b23,Ib740de5e
* changes:
  libsnapshot: Replace IByteSink usage in inspect_cow.
  libsnapshot: Deprecate the IByteSink API.
2023-04-27 14:28:28 +00:00
Pawan Wagh
ca5c2f8f8a Update return values in main
Test: m gatekeeperd
Bug: N/A
Change-Id: I99fbdbcaf252e89ac38eda7fbc2b296158bd2af1
2023-04-26 20:52:49 +00:00
Daniel Zheng
71c918aa59 Merge "Added Mock function call tests" 2023-04-26 19:57:52 +00:00
Pawan Wagh
3b41a5b46c Merge changes from topic "fuzz_gatekeeperd"
* changes:
  Adding fuzzer for gatekeeperd
  Separating GateKeeperProxy declaration in header
2023-04-26 19:37:15 +00:00
Pawan Wagh
c4bd2afc42 Adding fuzzer for gatekeeperd
Fuzzing AIDL service gatekeeperd with fuzzService API.

Test: m gatekeeperd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/gatekeeperd_service_fuzzer/gatekeeperd_service_fuzzer
Bug: 232439428
Change-Id: I20a451f7981cab312e4c67b11c715198284d0051
2023-04-26 18:06:19 +00:00
Daniel Zheng
ab4723f85f Merge "Removing {userspace} from reboot task'" 2023-04-26 17:57:22 +00:00
Daniel Zheng
f022b2eb41 Merge "Updating Test Suite Names" 2023-04-26 17:56:56 +00:00
Automerger Merge Worker
0981ab4864 Merge changes from topic "am-e6c556c6cc5a445da6801819c9445106"
* changes:
  Merge "[automerger skipped] Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev am: 5141eaf353 -s ours" into android13-tests-dev am: 5658f34653
  [automerger skipped] Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev am: 5141eaf353 -s ours am: 51349daf08 -s ours
2023-04-26 17:50:04 +00:00
Automerger Merge Worker
6d487b24dc Merge "[automerger skipped] Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev am: 5141eaf353 -s ours" into android13-tests-dev am: 5658f34653
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2563951

Change-Id: Idd8743a9ea02c9e630f43b059fd5e991030bdea6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 17:49:59 +00:00
Automerger Merge Worker
0485283a9a [automerger skipped] Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev am: 5141eaf353 -s ours am: 51349daf08 -s ours
am skip reason: skipped by user dvander

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2563951

Change-Id: I2f4bc7b720934addb7c893547405e80775b956f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 17:49:56 +00:00
Automerger Merge Worker
5658f34653 Merge "[automerger skipped] Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev am: 5141eaf353 -s ours" into android13-tests-dev 2023-04-26 17:05:37 +00:00
Automerger Merge Worker
51349daf08 [automerger skipped] Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev am: 5141eaf353 -s ours
am skip reason: skipped by user dvander

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2563951

Change-Id: I1fdf41caf785e5149dbdea83a0e74f18db63886a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 17:04:31 +00:00
Daniel Zheng
62a73c395c Merge "Adding correct task formed test" 2023-04-26 16:39:37 +00:00
Treehugger Robot
482feeecf7 Merge "libprocessgroup: Remove unused uid_path from RemoveProcessGroup" 2023-04-26 13:38:58 +00:00
Automerger Merge Worker
5141eaf353 Merge "Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664" into android12L-tests-dev 2023-04-26 02:45:46 +00:00
Treehugger Robot
2316bf2eaf Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev am: b880578664
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2563951

Change-Id: Iefd00dd6629a0850cffb7a4a170d8c831a7c2007
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 02:45:43 +00:00
Treehugger Robot
b880578664 Merge "libsnapshot: Fix test failures on certain configurations." into android12-tests-dev 2023-04-26 02:13:15 +00:00
David Anderson
e280e2bea9 libsnapshot: Replace IByteSink usage in inspect_cow.
Bug: 278637212
Test: inspect_cow
Change-Id: I69f41b23a5bf66bcbaed10a64aba171ad4bbc987
2023-04-25 17:07:43 -07:00
David Anderson
1ea351b699 libsnapshot: Deprecate the IByteSink API.
This introduces a replacement for the IByteSink API, which was never
really used in any advantageous way, and is not expected to be useful.
The new API attempts to fill an entire buffer rather than request
individual slices of a buffer.

This patch simply introduces the API and refactors tests. Subsequent
patches will replace IByteSink callers and remove the API.

Bug: 278637212
Test: cow_api_test
Change-Id: Ib740de5e65fee8d61f603b106752338cc8e95967
2023-04-25 17:07:43 -07:00
David Anderson
6727d5840b libsnapshot: Fix test failures on certain configurations.
Due to how CF is built and tested, VABC is enabled even when not
supported by the kernel. To work around this add some logic in
libsnapshot and the test harness to recognize this situation and
silently flip off the VABC flag.

This also fixes the -force_mode option to vts_libsnapshot_test, so that
it will skip tests that aren't supported by the device.

Bug: 264279496
Test: vts_libsnapshot_test on android12-gsi with 11-5.4 kernel
Change-Id: I9279d8d400cac5cd504a7ae91f254aae57fa856d
2023-04-25 23:50:48 +00:00
T.J. Mercier
b83e6e4b32 libprocessgroup: Remove unused uid_path from RemoveProcessGroup
This variable is no longer used.

Fixes: d0464b0c01 ("libprocessgroup: Do not remove uid cgroups directory")
Change-Id: I2b606d953722cf38cc865d91ea00a3b08236675b
2023-04-25 23:37:16 +00:00
Pawan Wagh
c5c0c3024c Separating GateKeeperProxy declaration in header
Adding gatekeeperd.h and moving declarations for GateKeeperProxy into
header. Adding separate main.cpp for entry point.
Adding cc_default to be used by binary and fuzzer.
This is needed in order to fuzz gatekeeperd AIDL service

Test: m gatekeeperd
Bug: N/A
Change-Id: Ifb2082f68bb200e4ed83608a6def8e45032753de
2023-04-25 23:27:00 +00:00
Pawan Wagh
057cbf6379 Merge "Adding fuzzers for StoragedService and StoragedPrivateService" 2023-04-25 22:23:41 +00:00
Christopher Ferris
3c5fe11034 Merge "Re-add code to skip gettings logs on logd crashes." 2023-04-25 18:07:30 +00:00
David Anderson
15031103ae Merge "libsnapshot: Disable legacy merge tests." 2023-04-25 16:43:55 +00:00
Treehugger Robot
edb90f203e Merge "BatteryMonitor: support battery health NOT_AVAILABLE from health status" 2023-04-25 03:05:07 +00:00
Christopher Ferris
bda1064160 Re-add code to skip gettings logs on logd crashes.
Also add new unit tests to verify this behavior.

Bug: 276934420

Test: New unit tests pass.
Test: Ran new unit tests without pthread_setname_np call and verified
Test: the tests fail.
Test: Force crash logd and verify log messages are not gathered.
Test: Force crash a logd thread and verify log messages are not gathered.
Change-Id: If8effef68f629432923cdc89e57d28ef5b8b4ce2
2023-04-24 18:31:29 -07:00
Pawan Wagh
f044f7f3dd Adding fuzzers for StoragedService and StoragedPrivateService
- StoragedService and StoragedPrivateService are defined in global
namespace. Moving them to android namespace
- Adding AIDL service fuzzers for both services

Bug: 232439428
Test: adb shell /data/nativetest64/storaged-unit-tests/storaged-unit-tests
Test: m storaged_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/storaged_service_fuzzer/storaged_service_fuzzer
Test: m storaged_private_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/storaged_private_service_fuzzer/storaged_private_service_fuzzer
Change-Id: Ieb6ff8117f548dd1ef376aab8e6d3dfec9fb06d3
2023-04-24 23:16:32 +00:00
David Anderson
405e74f9ce libsnapshot: Disable legacy merge tests.
These are failing on 6.1 kernels. Disabling them since legacy merges +
6.1 is not a supported combination.

Bug: 279009697
Test: vabc_legacy_tests on 6.1 CF
Change-Id: Iddc86f858e1a0101a7823b79fd0e81e221797f33
2023-04-24 15:40:29 -07:00
David Anderson
5c4a265514 snapuserd: Remove dead code from legacy snapuserd.
This code is now dead post xor removal.

Bug: N/A
Test: builds
Change-Id: I16e8357b9ee5c731441c57d7a345a4186d5269c2
2023-04-24 19:26:34 +00:00
Steven Moreland
5ca6c9888e Merge "init: log when 'user' is unspecified" 2023-04-24 17:28:09 +00:00
Jack Wu
cf996f3d8d BatteryMonitor: support battery health NOT_AVAILABLE from health status
Battery health is supported but there is not enough information to
determine an accurate value  This is a temporary state.

Bug: 276400004
Test: m
Change-Id: I0d422db20c51ef7e9dc4fa904729beda625c9fea
Signed-off-by: Jack Wu <wjack@google.com>
2023-04-24 11:37:40 +00:00
Daniel Zheng
cf1ca03836 Merge "Added test for parsing bad input" 2023-04-20 23:08:20 +00:00
Daniel Zheng
0d2d631d27 Added Mock function call tests
Checking flash partition is called correct number of times

Test: tested fastboot_test
Change-Id: I8a04fb0e30e794641f3e2fbe2ab666274be18b85
2023-04-20 14:31:16 -07:00
Daniel Zheng
77af6affd8 Removing {userspace} from reboot task'
Removing as we're no longer support reboot userspace in
fastboot-info.txt. Use reboot fastboot instead

Test: fastboot reboot fastboot
Change-Id: Ibd8bf597615dacde23ad446bde4f23837686710b
2023-04-20 14:30:28 -07:00
Daniel Zheng
207c0a3577 Updating Test Suite Names
updating task_test naming convention

Test: m fastboot_test
Change-Id: I56f93f47b3c15e2bc7bb6584b5b3dc12816eb681
2023-04-20 14:20:30 -07:00
Daniel Zheng
32dc6dd5de Adding correct task formed test
Test: test passes
Change-Id: I07b591a2c72d207d794dd3eb044a5fdfc048eb70
2023-04-20 14:18:22 -07:00
Daniel Zheng
935ee1f971 Added test for parsing bad input
Test: fastboot_test
Change-Id: I04fc24741987bc88a490b2084189dfd8f3714582
2023-04-20 14:11:06 -07:00
Daniel Zheng
13af2f46a8 Merge "Added test for version check" 2023-04-20 17:47:46 +00:00
Treehugger Robot
229d3d27d8 Merge "task_profiles_test: Skip this test if cgroups is read-only" 2023-04-19 23:57:15 +00:00
Daniel Zheng
0e25838886 Merge "Adding Test for Parsing Flash Task" 2023-04-19 21:13:42 +00:00
Daniel Zheng
233a5a162d Merge "Added forward declaration for compilation" 2023-04-19 21:13:35 +00:00