Commit graph

86666 commits

Author SHA1 Message Date
Raphael Herouart
3ae52c45ce tipc-test: Allow tipc tests to be run as benchmarks
Adding one command line parameter -B to allow tipc test to be run as benchmarks.

Bug: 314130383
Test: /data/nativetest64/vendor/tipc-test/tipc-test -t echo -r 1 -B 100
Change-Id: I5cdd643ce6e9e289033180cff433e45f77206729
2024-01-17 16:51:33 +00:00
Hsin-Yi Chen
c0c1c3d0c1 Merge "Enable header_abi_checker for libutils explicitly" into main 2024-01-11 02:00:45 +00:00
Treehugger Robot
bc645a1c47 Merge "Use libvendorsupport for vendor api level calculation" into main 2024-01-10 11:58:06 +00:00
Nikita Ioffe
44a7cadbf7 Merge "dm_test.cpp: DeleteDeviceWithTimeout asserts that unique path is deleted" into main 2024-01-10 08:32:19 +00:00
Justin Yun
6bc1bfe160 Use libvendorsupport for vendor api level calculation
Remove temporary 'vendor_api_level_of' function from init and replace
the function with the same in libvendorsupport.

Bug: 312403948
Test: getprop ro.vendor.api_level
Change-Id: I095353e602397220571e131431e7cbd1b8511fa6
Merged-In: I095353e602397220571e131431e7cbd1b8511fa6
2024-01-10 14:06:43 +09:00
Treehugger Robot
1eac97ca73 Merge "Mark block device as rw before encryptFstab" into main 2024-01-10 02:22:53 +00:00
Kelvin Zhang
d0139b45b8 Mark block device as rw before encryptFstab
Some testcases assume that /dev/block/by-name/userdata is writable, but
mount_with_alternatives() will mark block device as RO if mount flag
includes MS_RDONLY. Fix it by marking the block device as RW again.

Test: th
Bug: 319156415
Change-Id: Ic04acd4b6175d3f0aeea88675da44309e8df15e8
2024-01-09 17:14:07 -08:00
Treehugger Robot
951ffacc7b Merge "adb-remount-test: Only test mounts that are remounted by us" into main 2024-01-09 16:40:43 +00:00
Kangping Dong
75346e6c3f Merge "Revert "init.rc: create /data/misc/threadnetwork folder"" into main 2024-01-09 11:58:42 +00:00
Yi-Yo Chiang
fe52f39461 adb-remount-test: Only test mounts that are remounted by us
Right now we assume all RW mounts (minus /data & special FS) are
remounted by us and we apply the remount/overlayfs related checks
on them unconditionally. This would generate false positives when
a partition was RW but not remounted by us.
The test should instead check mounts that were remounted by us
(transitioned from RO to RW after adb-remount), and ignore
partitions that were already RW before running adb-remount.

Bug: 313609600
Test: adb-remount-test
Change-Id: I94e8a35775271f557790a458781657eb3b24a6f5
2024-01-09 18:15:38 +08:00
Akilesh Kailash
711a5e24fb Merge "Set taskprofile to snapshot merge thread" into main 2024-01-09 04:51:32 +00:00
Akilesh Kailash
e57ef38bb2 Set taskprofile to snapshot merge thread
Assign CPUSET_SP_BACKGROUND taskprofile to snapshot merge threads.
This will ensure that the threads will not run on big cores.

Additionally, reduce the flushing of data to 1MB after merging REPLACE ops.

No major regression observed on snashot merge time.

On Pixel 6 for incremental OTA of 500M, snapshot merge time increased
from 72 seconds to 76 seconds after this patch.

Bug: 311233916
Test: Full and incremental OTA on Pixel 6 - Verify merge threads not on big cores
Change-Id: I455afdac0b77227869d846d0c4472ea9eb34c41c
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-01-09 03:24:10 +00:00
Treehugger Robot
7e2b6cc9fa Merge "healthd: Delete health@2.0-service." into main 2024-01-09 00:28:28 +00:00
Treehugger Robot
dbaab24de3 Merge "vts_fs_test: Only check /data and /metadata for rw partitions." into main 2024-01-08 23:59:05 +00:00
David Anderson
442345b734 vts_fs_test: Only check /data and /metadata for rw partitions.
Some rw /proc/mounts entries are FUSE.

Also, add some diagnostics for failures.

Bug: 318962836
Test: vts_fs_test on Pixel
Change-Id: I85dec8b37f1a061b1eca597aba3887b598b699f5
2024-01-08 22:50:04 +00:00
Kelvin Zhang
f48c4ad35d Merge "Mount /data as readonly before encrypt_inplace" into main 2024-01-08 21:09:02 +00:00
Edward Liaw
da6329bd6f Merge "TEST_MAPPING: don't run vts_libsnapshot_test in kernel-presubmit" into main 2024-01-08 18:00:04 +00:00
Nikita Ioffe
5ff9025ae1 dm_test.cpp: DeleteDeviceWithTimeout asserts that unique path is deleted
Before this patch, DeleteDeviceWithTimeout was checking that the dev
node (i.e. /dev/block/dm-XX) is deleted after the call to DeleteDevice
API. Since ueventd first deletes the symlinks that correspond to a
device and only then deletes this device node, this assertion introduced
a race condition (DeleteDevice API waits for the symlink to be deleted).

This patch changes the DeleteDeviceWithTimeout test to check that unique
path of the device has been deleted.

Bug: 318425605
Test: presubmit
Change-Id: I3fd9de507c75bcf6ac1350fa0b8adfdb5a2e89e8
2024-01-08 11:25:45 +00:00
Hsin-Yi Chen
e5b667bd38 Enable header_abi_checker for libutils explicitly
The ABI checking rules for VNDK will be deleted from the main branch.
To keep monitoring the ABI, the check must be enabled explicitly.

Test: m libutils.vendor
Bug: 314010764
Change-Id: I762dec1ed7de014db653663d2917a19df5076fc8
2024-01-08 18:52:13 +08:00
Treehugger Robot
2e6640c34d Merge "remount: remount partitions with noatime" into main 2024-01-08 03:34:27 +00:00
Treehugger Robot
4e33a18421 Merge "Provide a new LLNDK for the vendor api level handling" into main 2024-01-08 02:45:18 +00:00
Kelvin Zhang
a79a9e3cfe Merge "Support multi-threaded compression in COW v3" into main 2024-01-05 22:06:40 +00:00
Kelvin Zhang
5ede70f714 Mount /data as readonly before encrypt_inplace
According to aosp/1908136, the current flow is

1. factory reset formatted raw disk.
2. next boot tries to convert it to metadata encryption
2.a mount sda27
2.b umount sda27
2.c encrypt_inplace()
2.d fsck on dm-x
2.e mount dm-x

If there are some write file operations between 2.a and 2.b, encryption
might fail. To mitigate, change the mount in 2.a to readonly if we know
we are going to do encrypt_inplace.

Test: th
Bug: 313962438
Change-Id: I7f4bbd36e1e6c978dde84f5396ffb90bbbdcae87
2024-01-05 14:06:21 -08:00
Kelvin Zhang
6687cb65a6 Support multi-threaded compression in COW v3
Performance of COW v3 is now on par with v2 in both multi-threaded and
single threaded configurations. Note, v2 cow writer can cache up to 1024
blocks in memory if multi-threaded compression is enabled(even though
batch size is configured as 200). For a fair comparison, benchmarks are
ran with batch size of 256. For batch size of 256 or greater, v2 and v3
have similar multi-threaded performance.

Test: th
Bug: 313962438
Change-Id: I377c8291689a7a038bb00b09d7371a155e6972e9
2024-01-05 14:06:21 -08:00
Justin Yun
a68aa85624 Provide a new LLNDK for the vendor api level handling
The library provides mapping functions between SDK versions and
vendor api levels.

Bug: 315056516
Test: atest libvendorsupport-tests
Change-Id: I4a4eae0456ebf756badcc80f09a2946f741843c5
2024-01-05 22:56:09 +09:00
Yi-Yo Chiang
b86df7687b remount: remount partitions with noatime
Related change: r.android.com/1110379

noatime reduces the wear and tear on the flash device.

Bug: 313609600
Test: abtd adb-remount-test
Change-Id: Ia42a064f297c25d3463a4ed9094a66236a6c5708
2024-01-05 16:47:14 +08:00
Daniel Zheng
004187aced Merge "libsnapshot: add check for updating next_data_pos_" into main 2024-01-04 19:04:35 +00:00
Daniel Zheng
6fe95136b5 Merge "libsnapshot: get options from protobuf fields" into main 2024-01-04 19:04:25 +00:00
Daniel Zheng
4e729db09c Merge "libsnapshot: add CowSizeInfo struct" into main 2024-01-04 19:03:58 +00:00
Eric Biggers
9e30bf5e14 Merge "init: remove session keyring workaround for old kernels" into main 2024-01-04 18:21:23 +00:00
Spandan Das
e010614a4a Merge "Make apex availability of libpropertyinfoparser and libpropertyinfoparser explicit" into main 2024-01-04 17:46:17 +00:00
Treehugger Robot
8880209aae Merge "Make apex availability of libdebuggerd explicit" into main 2024-01-04 02:49:43 +00:00
Spandan Das
2e5cfbc1a4 Make apex availability of libpropertyinfoparser and libpropertyinfoparser explicit
The availability to runtime apex was done implicitly using a baseline map in
build/soong/apex/apex.go. Make this explicit in Android.bp

Bug: 281077552
Test: m nothing
Change-Id: Iba1f30ef57c0707189ec79813ef501029135eeba
2024-01-04 01:34:40 +00:00
Daniel Zheng
070848b9ef libsnapshot: add check for updating next_data_pos_
Adding a check here to ensure that next_data_pos_ isn't modified since
initialization. After sizing the sequence buffer, this value should be
the initialized value + the size of sequence buffer.

Test: cow_api_test
Change-Id: I9c79041b72544500989860a13ca6c25830d28750
2024-01-03 15:19:46 -08:00
Christopher Ferris
6b24144781 Merge "Avoid sleep in test." into main 2024-01-03 21:05:14 +00:00
Daniel Zheng
3f3162c217 libsnapshot: get options from protobuf fields
Update snapshot.cpp to grab estimate_op_buffer_size &
estimate_sequence_buffer_size from update_engine. Update v3 writer to
use these options to size the buffers appropriately.

we probably don't need the fields for merge metrics yet but will leave
it here for now

Test: th
Bug: 313962438
Change-Id: I08252ff66174de9bafaf8dbe9115d9d049084c4c
2024-01-03 11:09:37 -08:00
Daniel Zheng
d0c3a04cb0 libsnapshot: add CowSizeInfo struct
Adding a cow size info struct as writer will now need to know the op buffer
size at the time of initialization. The sequence of events is as follows
(same as estimate_cow_size but putting down here for clarity)

1. ota_from_target_files does dry run to determine cow size + ops buffer
   size
2. data is passed through delta archive manifest
3. snapshot.cpp parses these fields and confgiures cowoptions struct to
   pass to writer initialization
4. cow is initialized with correct sizing. Data is incrementally added
   at the ends of the cow ops buffer (which is why we need to know the
   sizing ahead of time)

Test: ota
Change-Id: I950e5ef82c9bd7e9bd9603b0599c930767ee3f0d
2024-01-03 11:08:41 -08:00
Edward Liaw
9376b7d8d0 TEST_MAPPING: don't run vts_libsnapshot_test in kernel-presubmit
libsnapshot test is run in an independent configuration from
kernel-presubmit.  When run in kernel-presubmit, it fails because it
creates another daemon on top of the daemon that is already running from
first stage init.

Bug: 316040872
Test: N/A
Change-Id: Ie3381d6db35bb85fbb47326fa49938416d49f2b8
Signed-off-by: Edward Liaw <edliaw@google.com>
2024-01-03 18:41:41 +00:00
Kangping Dong
680c4a332f Revert "init.rc: create /data/misc/threadnetwork folder"
This reverts commit 40e1666fb9.

Reason for revert: this directory is for the Thread stack which is
in the Tethering mainline module. Per mainline guideline, the data
should be saved in a APEX specific directory (i.e.
/data/misc/apexdata/com.android.tethering). It's safe to remove this
directory directly given this is a new feature targeting Android V

Bug: 309932508
Test: manually verified that Thread settings file can be written to
      /data/misc/apexdata/com.android.tethering/threadnetwork
Change-Id: I3a7e24b4cdc1c99ca36a22414507538279dd31cd
2024-01-03 23:02:58 +08:00
Christopher Ferris
20f50ec9ab Avoid sleep in test.
For the tombstoned.proto test, remove arbitrary sleep and add loop
checking for the file being present.

Bug: 317286869

Test: Ran the tests on device and all pass.
Test: Modify the test and force the timeout to verify the timeout logic.
Change-Id: I9b246c8fee83909459d5c42debdb546794070845
2024-01-03 04:32:35 +00:00
David Anderson
75d3663d6d Merge "vts_fs_test: Drop restrictions on ext4 userdata." into main 2024-01-03 00:37:29 +00:00
Steven Moreland
cc7d7f13dc Merge "raise debuggerd_test timeout" into main 2024-01-02 23:24:28 +00:00
Chun-Wei Wang
7e32f6f908 Merge "Add help text for fastboot gsi status" into main 2024-01-02 22:59:39 +00:00
Spandan Das
e6bc0264a9 Make apex availability of libdebuggerd explicit
The availability to runtime apex was done implicitly using a baseline map in
build/soong/apex/apex.go. Make this explicit in Android.bp

Bug: 281077552
Test: m nothing
Change-Id: I365270bc90380211c40294dff145ebc01eb8c14f
2024-01-02 22:40:46 +00:00
David Anderson
4793330ad1 vts_fs_test: Drop restrictions on ext4 userdata.
Bug: 313335353
Test: vts_fs_test
Change-Id: I40be9589f18288ebe2a8569dfaceb9cd2150db85
2024-01-02 13:52:12 -08:00
Steven Moreland
2be4bedea1 raise debuggerd_test timeout
Possible solution for b/317286869.

Test: N/A
Change-Id: I93743d596d5b8d7c867253d1aafc709453995fed
2024-01-02 21:37:38 +00:00
Treehugger Robot
7ff0bb3091 Merge "Hang up narayan's janitor overalls." into main 2024-01-02 20:52:08 +00:00
Chun-Wei Wang
9c48951d91 Add help text for fastboot gsi status
Bug: 298533290
Test: fastboot -h
Change-Id: Icf91a980059aaa8e74e41af4036778fbbfbf1bd2
2024-01-02 15:29:21 +08:00
Seungjae Yoo
94d60a73f4 Merge "Revert^2 "Small fix: Use const value on IsHashreeDisabled"" into main 2023-12-23 12:21:35 +00:00
Greg Kaiser
4c4742f678 Revert^2 "Small fix: Use const value on IsHashreeDisabled"
This reverts commit ec3ef81fd9.

Reason for revert: b/317470107 is an infrastructure error

Change-Id: If5a022cbfd016d9c55261c67a1a73d81cb336343
2023-12-22 20:03:05 +00:00