Commit graph

81664 commits

Author SHA1 Message Date
Daniel Zheng
722e6ca3e9 Merge "Fixing constructors to match header files" am: 5efd90644b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2600794

Change-Id: If9c544c383751ab86958eadc7fea690fa486b719
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-24 00:59:40 +00:00
Daniel Zheng
5efd90644b Merge "Fixing constructors to match header files" 2023-05-24 00:06:09 +00:00
Steven Moreland
e1bcb729ef Merge "init_kill_services_test: special case apexd" am: 89a4db46f5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2598914

Change-Id: I56ebb4f6a71181a6de1175e3f281c44a5260d464
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 19:00:06 +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
b23c32bf6a Merge "Remove libdiskconfig as it is no longer used" am: 280fd9f011
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2599566

Change-Id: Iab3d6506e16a5c964b88ee19367067ba5190e44b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 17:11:46 +00: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
999d5efabb Merge "debuggerd: simplify output handling" am: 34de747570
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2352088

Change-Id: I2a66e625ca8d63c52d5ac22e87a3dc9cf7014f80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 20:04:02 +00:00
Christopher Ferris
34de747570 Merge "debuggerd: simplify output handling" 2023-05-22 19:31:45 +00:00
David Anderson
d96f115cd1 Merge "libfiemap: Handle EAGAIN in fallocate()." am: bf11ce74ff
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2590526

Change-Id: Ide316841dedc97e727ee60dea1520f8e79cc9887
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 18:15:58 +00:00
David Anderson
95b26e1d0c libsnapshot: Remove OnlineKernelSnapshotWriter.
This was never used or tested. The idea was to unify update_engine's
write paths on ISnapshotWriter. But given that legacy VAB is "legacy",
it doesn't make sense to begin refactoring that code and potentially
introducing bugs. Let's just remove this instead.

Bug: 280529365
Test: builds
Change-Id: Ie2f531bd140e183dfde4b65a144f3b4acc28e78a
2023-05-22 11:00:11 -07:00
David Anderson
0ec7115779 libsnapshot: Reject bad cow versions.
Remove CowWriter::GetCowVersion. Instead, reject any update that asks
for VABC but has an unsupported version field. Do not fallback to legacy
VAB as the update was likely built improperly.

Bug: 280529365
Test: vts_libsnapshot_test
Change-Id: Ibc0f981801fd47bf39d7a19944134e4b3c66e5bf
2023-05-22 11:00:11 -07:00
David Anderson
85c65e98cd libsnapshot: Remove unused SupportsCopyOperation.
This function is never used. It was intended to allow update_engine to
unify all writes through ISnapshotWriter, but that never came to pass.

Bug: 280529365
Test: builds
Change-Id: I7e418ffee404cd63faa5a5659d8971988f8d0e03
2023-05-22 11:00:11 -07:00
David Anderson
d70a174e95 libsnapshot: Split CowReader into CowParserV2.
Remove format-specific logic from CowReader and split it out into a new
class called CowParserV2. To make reading the header easier, the
version and size bits are now in a separate CowHeaderPrefix struct.

Bug: 280529365
Test: apply OTA on CF
      inspect_cow
Change-Id: I29b5617ec094d4fb0c284485883d2e921a5bdbf8
2023-05-22 11:00:09 -07: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
fce7261d8b Merge "ueventd: Fix a race condition in handling device-mapper events." am: 2fb1c671d5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2592609

Change-Id: I926765f0bd9f1388d7bf27bb2af3584cbe62588b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 20:29:14 +00: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
09e14a6d31 Merge "debuggerd_client_test: less racy test setup" am: 6e80656bf7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2359686

Change-Id: Ibf550cfb90f48e6eb67f26c9db6d2d36814bd80c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 18:45:26 +00:00
Christopher Ferris
6e80656bf7 Merge "debuggerd_client_test: less racy test setup" 2023-05-19 18:01:29 +00:00
Maciej Żenczykowski
90bd718228 Merge "NetlinkEvent: use isKernel64Bit in KernelUtils.h" am: 97055b7ee9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2597156

Change-Id: I37b39e89c70b8cc2eab40749e84ac39afcabaaf8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 06:05:02 +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
07be4de23f Merge "init_kill_services_test: log state" am: 159bd29580
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2595989

Change-Id: Iddcab3d9c13c072b3609297343bf2f029151bd34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 17:53:39 +00:00
Steven Moreland
159bd29580 Merge "init_kill_services_test: log state" 2023-05-18 17:08:39 +00:00
David Drysdale
23868622c8 Merge "Set IMEI in provisioning helper" am: f009f927d0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2595207

Change-Id: I8a4f204c790284215d30a593afeaf1e632e53638
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 07:21:20 +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
Automerger Merge Worker
5bb2c9f865 Merge changes from topic "am-558ef604bf3c4c1c8ddefc69ffec2c23" am: 411a160ecb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2577014

Change-Id: Ibf3d627504010434956d8597f118748042c85d06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 20:20:14 +00:00
David Anderson
1498d5ac16 Merge "DO NOT MERGE: libsnapshot: Fix test failures on certain configurations." into android13-tests-dev am: 1264f39449 am: 0b65c3a385
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2577014

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

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

Change-Id: I3ca52419bf769ff2178e4e82b81b6af80eee749a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 20:20:12 +00: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
2b26aadce6 Merge "Return error from gatekeeperd" am: c51ed4c56e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2590525

Change-Id: I02cd3ae596fce5a4d4e0f31e4cdafd4701c142ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 23:57:50 +00:00
Pawan Wagh
c51ed4c56e Merge "Return error from gatekeeperd" 2023-05-16 23:17:47 +00:00
Mike McTernan
57aefd4ca8 Merge "confirmationui:fuzzer: update contact details" am: 3fbe2ca34e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2591205

Change-Id: I86bfb3a9b6c67098de361610eaaad42699787a90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 20:16:41 +00:00
Treehugger Robot
16ee1caa8c Merge "Support ZSTD in userspace COW" am: 9f6e88567b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2439692

Change-Id: Ib19838e0460da1e5971e361eedfb9516d607c4cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 20:15:16 +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