Commit graph

81125 commits

Author SHA1 Message Date
Subrahmanya Manikanta Venkateswarlu Bhamidipati Kameswara Sri
32e1c70f27 Check AServiceManager_isDeclared before AServiceManager_getService
Call AServiceManager_isDeclared before calling AServiceManager_getService
to avoid the waiting time when aidl service is not available.

Bug: 286969060
Test: run VtsHalGatekeeperTarget
Change-Id: I7d652a546cb810a601338a68950f01d065aea7a5
2023-06-14 02:43:54 +00:00
Daniel Zheng
3c962eee3a Merge changes Ib72f6a1c,I46d798fa
* changes:
  Update add resizetasks to work in update
  Keeping naming consistent
2023-05-30 20:26:06 +00:00
Daniel Zheng
997ce15d5e Update add resizetasks to work in update
Old should_flash_in_userspace doesn't work if $ANDROID_PRODUCT_OUT is
not set. Also adding in a check to see if resizetasks were added
correctly

Test: fastboot update update.zip without $ANDROID_PRODUCT_OUT and
removing the flashsuperlayout code.
Bug: 283330320

Change-Id: Ib72f6a1cf07745daf70fffae3d1a6b8352e3f79c
2023-05-30 09:24:46 -07:00
Daniel Zheng
437fb0c606 Merge "Removing should_flash_in_userspace check" 2023-05-30 15:34:50 +00:00
William McVicker
0cea31e50b Merge "toolbox/modprobe: Fix fallback path when mod_dirs is empty" 2023-05-26 20:34:09 +00:00
Christopher Ferris
1442d47bd6 Merge "Check get_gwp_asan_callbacks before calling." 2023-05-26 19:03:01 +00:00
Will McVicker
d278f1d018 toolbox/modprobe: Fix fallback path when mod_dirs is empty
Due to GKI, the kernel UTS release string will not always (if ever)
match the vendor's UTS release string that is used to create the
initramfs file structure -- /lib/modules/<vendor uname>. This causes
module load failures when `-d DIR` is omitted. To fix this, we can
include all of the versions under /lib/modules that match the kernel's
major and minor version instead of directly using the value of uname().
In addition, we can also support modules being loaded directly from
/lib/modules.

Test: verify GKI kernel + initramfs with different UTS strings
Test: verify GKI kernel + initramfs with modules directly in /lib/modules
Fixes: 8320778425 ("toolbox/modprobe: Fallback to /lib/modules/<uname> ")
Bug: 282917063
Bug: 254835242
Change-Id: I5368f5cff139ba3165323a6a91066be38bfa0736
2023-05-26 11:01:00 -07:00
Treehugger Robot
76323f64be Merge "BatteryMonitor: support battery health INCONSISTENT from health status" 2023-05-26 02:33:22 +00:00
Daniel Zheng
30e648b346 Keeping naming consistent
Test: m fastboot
Change-Id: I46d798fa2ce78a255dc0ea414f5e25782f45c4d1
2023-05-25 15:56:29 -07:00
Daniel Zheng
2775df617e Removing should_flash_in_userspace check
This check isn't needed as super_flash_helper.cpp calls a different
should_flash_in_userspace that isn't reliant on $ANDROID_PRODUCT_OUT
being set. Current code will fail when calling fastboot update

Test: fastboot update update.zip without calling lunch
Bug: 283330320
Change-Id: Icefe6092befb747b7f419ea997e0834602808d69
2023-05-25 15:14:59 -07:00
Treehugger Robot
059954a6b2 Merge "Chang flash task to take in source" 2023-05-25 21:46:01 +00:00
Daniel Zheng
791a83bb45 Chang flash task to take in source
Old changes didn't actually take into account sources. fastboot update
{update.zip} should read fastboot-info from the update package. It was
instead flashing local images + reading local fastboot-info.txt

Test: m fastboot, fastboot update, fastboot flashall
Bug: 283330320

Change-Id: I9587a7735ddfbfb661153eb12ebc3caa7c32f141
2023-05-25 13:29:16 -07:00
Christopher Ferris
004a16739d Check get_gwp_asan_callbacks before calling.
When using the bootstrap linker, the get_gwp_asan_callbacks is
not set. Therefore, check it is not nullptr before calling it
during crash processing.

Bug: 284098779

Test: Ran crasher64 using /system/bin/bootstrap/linker64 and verify
Test: debuggerd code does not crash.
Test: All unit tests pass.
Change-Id: Ifc710fe4bef24661700444a1b69432bfc29d580f
2023-05-25 12:42:41 -07:00
Treehugger Robot
2dc80e3805 Merge "Updated the policy file associated with riscv64" 2023-05-25 17:29:40 +00:00
liwentao
4d8f37edae Updated the policy file associated with riscv64
The generate.sh script can generate the file, but current policy file does not match it.
And the rules are not appropriate, like missing "sysinfo", causing the
debuggerd_test to fail in system model. So we match the policy to
what it should be.

Test: make debuggerd_test

Change-Id: I57ebd7713f2ab939d01bfefcc7935e234fdd3e13
Signed-off-by: liwentao <liwentao@eswincomputing.com>
2023-05-25 18:08:02 +08:00
Treehugger Robot
852e22d7c3 Merge "ueventd: Wait for runtime apex before running external firmware handler" 2023-05-25 01:40:10 +00:00
Christopher Ferris
ec56afc415 Merge "Limit the number of log messages in a tombstone." 2023-05-25 00:27:47 +00:00
Christopher Ferris
98d6242dc7 Limit the number of log messages in a tombstone.
Some testing environments can have a test that is sending many
thousands of messages to the log. When this type of process crashes
all of these log messages are captured and can cause OOM errors
while creating the tombstone.

Added a test to verify the log messages are truncated. Leaving this
test disabled for now since it is inherently flaky due to having to
assume that 500 messages are in the log.

Added a test for a newline in a log message since it's somewhat
related to this change.

NOTE: The total number of messages is capped at 500, but if a message
contains multiple newlines, the total messages will exceed 500.
Counting messages this way seems to be in the spirit of the cap,
that a process logging a large message with multiple newlines does
not completely fill the tombstone log data.

Bug: 269182937
Bug: 282661754

Test: All unit tests pass.
Test: The disabled max_log_messages test passes.
Change-Id: If18e62b29f899c2c4670101b402e37762bffbec6
2023-05-24 20:10:55 +00:00
Treehugger Robot
eb8079e656 Merge "Fix overflow issue when computing ideal size of scratch partition" 2023-05-24 05:35:50 +00:00
Jack Wu
8231c3fe2d BatteryMonitor: support battery health INCONSISTENT from health status
Report Battery health INCONSISTENT when there is a battery recalibration
pending.

Bug: 283182048
Test: m
Change-Id: I8b944ddac7cc919fc95b1b71b015101642a62f96
Signed-off-by: Jack Wu <wjack@google.com>
2023-05-24 03:25:59 +00:00
Daniel Zheng
5efd90644b Merge "Fixing constructors to match header files" 2023-05-24 00:06:09 +00:00
Steven Moreland
89a4db46f5 Merge "init_kill_services_test: special case apexd" 2023-05-23 18:18:02 +00:00
Steven Moreland
4350592133 init_kill_services_test: special case apexd
apexd restarts the device, so it causes flakes here,
especially in presubmit.

Bug: 280514080
Test: init_kill_services_test

Change-Id: I4455704795961f3ae94e29bdf098eca739130973
2023-05-23 18:17:57 +00:00
Daniel Zheng
5a9905a62b Fixing constructors to match header files
Constructor in cpp file doesn't match header file

Test: m fastboot, fastboot flashall -w
Change-Id: I2c720bb594efca5af1e5a374277543a522ced5ef
2023-05-23 10:51:01 -07:00
Treehugger Robot
280fd9f011 Merge "Remove libdiskconfig as it is no longer used" 2023-05-23 16:33:31 +00:00
Ray Chin
702a779edb Fix overflow issue when computing ideal size of scratch partition
The type of f_frsize is `unsigned long` which is 32 bit for some system so it will overflow after multiplied by f_bfree. This solution adds one more type casting to ensure the type is 64 bit unsigned integer during the computing.

Bug: 281599020
Test: adb root; adb shell disable-verity
Change-Id: I377ed722d5e245c235c3ae12ff66ac7e91d1d6e8
2023-05-23 09:49:19 +00:00
Devin Moore
5729d860cd Remove libdiskconfig as it is no longer used
Test: m
Bug: 280829178
Change-Id: I1da275ef13dea92b8c1021aa3d658569c4cf782e
2023-05-23 00:24:04 +00:00
Christopher Ferris
34de747570 Merge "debuggerd: simplify output handling" 2023-05-22 19:31:45 +00:00
David Anderson
bf11ce74ff Merge "libfiemap: Handle EAGAIN in fallocate()." 2023-05-22 17:39:07 +00:00
Frederick Mayle
56abaa0959 debuggerd: simplify output handling
Just noticed some opportunities while skimming.

Test: adb shell debuggerd $(adb shell pidof com.android.systemui)
Test: All unit tests pass (both 32 bit and 64 bit).
Test: Ran unit tests in a loop hundreds of times.
Change-Id: I428d0cf599ed603a21944b084b95594db893cbd5
2023-05-19 15:19:06 -07:00
David Anderson
2fb1c671d5 Merge "ueventd: Fix a race condition in handling device-mapper events." 2023-05-19 19:43:21 +00:00
Christopher Ferris
6e80656bf7 Merge "debuggerd_client_test: less racy test setup" 2023-05-19 18:01:29 +00:00
Maciej Żenczykowski
97055b7ee9 Merge "NetlinkEvent: use isKernel64Bit in KernelUtils.h" 2023-05-19 05:24:22 +00:00
Patrick Rohr
eb13daf905 NetlinkEvent: use isKernel64Bit in KernelUtils.h
Now that the code has moved, delete the local implementation in favor of
the common one.

Test: builds
Change-Id: Ic29d7c9bcd3d623204f3e4de3a3434483021cbac
2023-05-18 14:36:57 -07:00
Steven Moreland
159bd29580 Merge "init_kill_services_test: log state" 2023-05-18 17:08:39 +00:00
David Drysdale
f009f927d0 Merge "Set IMEI in provisioning helper" 2023-05-18 06:24:32 +00:00
Steven Moreland
16e08075ba init_kill_services_test: log state
It can be difficult to figure out where this test
is while it's executing, so I've added logs.

Bug: 280514080
Test: init_kill_services_test (w/o tradefed to avoid reboot), then:
:) adb logcat -d | grep init_kill_services_test
... I init_kill_services_test: hello lmkd!
... I init_kill_services_test: okay, now goodbye lmkd
... I init_kill_services_test: I said goodbye lmkd!
... I init_kill_services_test: are you still there lmkd?
... I init_kill_services_test: I'm done with lmkd
... I init_kill_services_test: hello ueventd!
... I init_kill_services_test: okay, now goodbye ueventd
... I init_kill_services_test: I said goodbye ueventd!
... I init_kill_services_test: are you still there ueventd?
... I init_kill_services_test: I'm done with ueventd
... I init_kill_services_test: hello hwservicemanager!
... I init_kill_services_test: okay, now goodbye hwservicemanager
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: I said goodbye hwservicemanager!
... I init_kill_services_test: are you still there hwservicemanager?
... I init_kill_services_test: I'm done with hwservicemanager
... I init_kill_services_test: hello servicemanager!
... I init_kill_services_test: okay, now goodbye servicemanager
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: I said goodbye servicemanager!
... I init_kill_services_test: are you still there servicemanager?
... I init_kill_services_test: I'm done with servicemanager

Change-Id: I2466f574fc06cdf1b01db82f89649f39b0f34345
2023-05-17 23:20:53 +00:00
David Anderson
0fa371076a libfiemap: Handle EAGAIN in fallocate().
When we changed our ENOSPC tests, it exposed a path in F2FS were
fallocate can return EAGAIN. This is expected if F2FS attempts GC to
acquire more chunks, and it can leave the file in a partially allocated
state.

As a fix, keep attempting fallocate() as long as (1) it returns EAGAIN,
and (2) the allocated size keeps growing. If (2) fails we return ENOSPC.

Bug: N/A
Test: treehugger
Change-Id: I5f867b5a200b9260e486985f203f9872a949b3f9
2023-05-17 15:52:33 -07:00
David Anderson
59abbfe647 ueventd: Fix a race condition in handling device-mapper events.
We've had flake in libdm_test for a long time, with no clear cause.
Lately however it has become particularly reproducible when running
the UeventAfterLoadTable test in isolation, and thus we've identified
the root cause.

uevents for device-mapper are fired when the sysfs node is added, but at
that time, the "dm" subnode has not yet been added. The root node and dm
node are added very close together, so usually it works, but sometimes
ueventd is too fast.

Instead of relying on sysfs, query the uuid/name node directly from
device-mapper.

Bug: 270183812
Test: libdm_test
Change-Id: I258de5de05d813c3cb7f129e82e56dbfe8bf3117
2023-05-17 15:52:16 -07:00
Frederick Mayle
52205b8206 debuggerd_client_test: less racy test setup
Make sure that all the threads have started up, otherwise the main part
of the test might not be testing as stressful a situation as expected.
Note that the "race" moniker is still valid because of the debuggerd
timeout.

The test is now faster (405ms) when run under good conditions.

Test: atest 'debuggerd_test:debuggerd_client#race'
Test: Ran debuggerd_client.race 1000 times on its own.
Test: Ran the whole suite of debuggerd unit tests 1000 times.
Change-Id: I487e7654a71df9f1799f09c6f385c929ddf2f234
2023-05-17 12:50:51 -07:00
Automerger Merge Worker
411a160ecb Merge changes from topic "am-558ef604bf3c4c1c8ddefc69ffec2c23"
* changes:
  Merge "DO NOT MERGE: libsnapshot: Fix test failures on certain configurations." into android13-tests-dev am: 1264f39449
  [automerger skipped] DO NOT MERGE: libsnapshot: Fix test failures on certain configurations. am: 3f96053b38 -s ours
2023-05-17 19:34:26 +00:00
David Anderson
0b65c3a385 Merge "DO NOT MERGE: libsnapshot: Fix test failures on certain configurations." into android13-tests-dev am: 1264f39449
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2577014

Change-Id: Iddb21b0f93724cbf4a02526d65fd724f78790ef0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 19:34:21 +00:00
David Anderson
55b5aa1730 [automerger skipped] DO NOT MERGE: libsnapshot: Fix test failures on certain configurations. am: 3f96053b38 -s ours
am skip reason: skipped by user dvander

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

Change-Id: Ie3c4bf3d52ddcf6ca7e13cf108f523b2b5f45fc7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 19:34:20 +00:00
David Anderson
1264f39449 Merge "DO NOT MERGE: libsnapshot: Fix test failures on certain configurations." into android13-tests-dev 2023-05-17 18:22:26 +00:00
David Drysdale
e556021b52 Set IMEI in provisioning helper
Borrow the code from AttestKeyTest.cpp (in KeyMint VTS) for determining
the devices IMEI value(s), and use that as default value.

Also update to use the newer provisioning message if the second IMEI is
set.

Test: provision a test device
Change-Id: Ie8e183dc50ac9107c2c2c2966c591e8b6022fd20
2023-05-17 18:12:00 +01:00
Pawan Wagh
c51ed4c56e Merge "Return error from gatekeeperd" 2023-05-16 23:17:47 +00:00
Mike McTernan
3fbe2ca34e Merge "confirmationui:fuzzer: update contact details" 2023-05-16 20:10:47 +00:00
Treehugger Robot
9f6e88567b Merge "Support ZSTD in userspace COW" 2023-05-16 19:02:57 +00:00
Kelvin Zhang
32dcac7851 Support ZSTD in userspace COW
Perf:
Lz4:
Update took 429 seconds
merge time 35.4s
cow size: 3.18GB

ZSTD:
Update took 676 seconds
merge time 49.4s
cow size: 2.62GB

Gz:
Update took 1057 seconds
merge time: 50.0s
cow size: 2.55GB

In summary, ZSTD is a middle point between LZ4 and GZ.

Speed: LZ4 > ZSTD > GZ
Space: LZ4 > ZSTD > GZ

Bug: 274129758

Change-Id: I203bf088b7c2a9ce429f75478799da0e7126febf
2023-05-16 10:13:52 -07:00
Mike McTernan
4066926374 confirmationui:fuzzer: update contact details
Bug: None
Test: make trusty_confirmationui_tipc_fuzzer
Change-Id: Ie81bf916c41498abc226389f63b22b57da55d446
2023-05-16 09:05:29 +01:00