Commit graph

77672 commits

Author SHA1 Message Date
David Anderson
ad0b3413a7 [automerger skipped] libsnapshot: Remove flaky image creation test. am: 1136e2fc30 -s ours
am skip reason: Merged-In I6235d11033d2f30efe530077b877863ba2574810 with SHA-1 5b9c9ba1e0 is already in history

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

Change-Id: I60f0a27e7df8a4a119fd7e28b74e22dbf67fbddf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-03 00:19:25 +00:00
Treehugger Robot
11caad9d6c Merge "libsnapshot: Use SnapshotManager to delete devices." into android12L-tests-dev 2023-06-02 23:51:12 +00:00
Treehugger Robot
cf62ede082 Merge "libsnapshot: Remove flaky image creation test." into android12L-tests-dev 2023-06-02 23:51:10 +00:00
David Anderson
1136e2fc30 libsnapshot: Remove flaky image creation test.
This test has always been flaky, and is not testing something super
valuable: we know that image creation succeeds throughout the rest of
the suite, so it's not very interesting to know that it can succeed in a
low-space scenario.

The inverse test is much more valuable, since we want the correct status
code when creation fails due to low space.

Bug: 240391002
Test: vts_libsnapshot_test
Merged-In: I6235d11033d2f30efe530077b877863ba2574810
Change-Id: I6235d11033d2f30efe530077b877863ba2574810
(cherry picked from commit 97e8a2f0e9)
2023-06-01 15:49:51 +00:00
David Anderson
c786b6d332 libsnapshot: Use SnapshotManager to delete devices.
Diagnosing DM_DEV_REMOVE failures in the test harness is quite
difficult, and it's not clear if failures are spurious or not. Instead
use SnapshotManager's helper function, which can retry on failure, and
will self-diagnose issues on legitimate failures.

Bug: N/A
Test: vts_libsnapshot_test
Change-Id: Ibcaa8406e8b1e8758b99a8e9b58c58d68ed57685
Merged-In: Ibcaa8406e8b1e8758b99a8e9b58c58d68ed57685
(cherry picked from commit e02ef9e9ce)
2023-06-01 14:20:03 +00:00
David Anderson
86c54b73fc 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: I34a32d6b1a534a26b3e9f355b55df72e21a04d6c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 19:00:29 +00:00
David Anderson
c287a094af DO NOT MERGE: libsnapshot: Fix test failures on certain configurations. am: 3f96053b38
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2577014

Change-Id: Ib5a3310a0d0903240140455acc321db67c0258be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 19:00:27 +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 Anderson
3f96053b38 DO NOT MERGE: 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 android13-gsi with 11-5.4 kernel
Change-Id: I9279d8d400cac5cd504a7ae91f254aae57fa856d
2023-05-03 19:07:50 +00:00
Automerger Merge Worker
5f2eb20c94 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: Ib9046976f60bdcf354530c146fcdb8dff9e8a90f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 17:45:27 +00:00
Automerger Merge Worker
ab913fe979 [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: I7575285c98982b37280010fdad4e3cad63aca518
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-26 17:45:20 +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
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
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
David Anderson
689290a182 Merge "libsnapshot: Disable 32-bit VTS tests on 64-bit systems." into android13-tests-dev am: cb6ea9edb4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2427052

Change-Id: Ieacfa1efbef66b0d73da0947dda3f1d5bc6a1c0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-09 21:36:10 +00:00
David Anderson
cb6ea9edb4 Merge "libsnapshot: Disable 32-bit VTS tests on 64-bit systems." into android13-tests-dev 2023-02-09 20:10:05 +00:00
David Anderson
33e044574a libsnapshot: Disable 32-bit VTS tests on 64-bit systems.
These tests don't work because 32-bit dependencies are not normally
packaged on a 64-bit system.

Bug: 263062262
Test: builds
Change-Id: I68859a9e9c029a528ee12c02569a3693261c7251
(cherry picked from commit 32fa3e96f4)
2023-02-08 18:59:43 +00:00
Alessandra Loro
d5e026e1af Resolve ro.debuggable at build time
Ignore-AOSP-First: cherry-pick for tm-qpr-dev
Test: n/a
Bug: 193912100
Bug: 243645021

Merged-In: I83b0021b91536335c63d19f8a65933bad1b26b4e
Change-Id: I42c4b1e81383d83c73a565c5e74ac22f17389faf
2023-01-25 21:46:32 +00:00
Samip Garg
fc0ee916bc Snap tm-dev to android13-tests-dev
Bug:259849956

Merge ab/9299233

Merged-In: I1795c931b28fd5fe28aa0f23717d4238fb352d37
Change-Id: I1fbab8fc336954dddd623a4a5724fa0e724b4f62
2022-12-08 18:09:40 +00:00
Treehugger Robot
9be0c7bbbc Merge "Some device that platform base on android12 doesn't support A/B update, it looks virtual A/B is also not mandatory. so this test case should check ro.vendor.api_level first." into android13-tests-dev 2022-09-21 00:07:44 +00:00
biandonglei
bfd3e38284 Some device that platform base on android12 doesn't support A/B update, it looks virtual A/B is also not mandatory. so this test case should check ro.vendor.api_level first.
test:
 run vts -m vts_ota_config_test -t VAB#Enabled

issue:
 245441425

Change-Id: I1795c931b28fd5fe28aa0f23717d4238fb352d37
2022-09-17 06:44:46 +00:00
David Anderson
220d4aba05 Merge "libsnapshot: Remove flaky image creation test." into android13-tests-dev 2022-08-29 23:50:26 +00:00
David Anderson
5b9c9ba1e0 libsnapshot: Remove flaky image creation test.
This test has always been flaky, and is not testing something super
valuable: we know that image creation succeeds throughout the rest of
the suite, so it's not very interesting to know that it can succeed in a
low-space scenario.

The inverse test is much more valuable, since we want the correct status
code when creation fails due to low space.

Bug: 240391002
Test: vts_libsnapshot_test
Change-Id: I6235d11033d2f30efe530077b877863ba2574810
(cherry picked from commit 97e8a2f0e9)
2022-08-18 20:09:11 +00:00
David Anderson
0375a89f9a vts_fs_test: Only require EROFS in T+ kernels. am: aee8ddbc46
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/19293151

Change-Id: I39fdaf697f69dcb1dabe6c7f8c4f8793d4e3854a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 23:57:53 +00:00
David Anderson
8504d681de Revert "Do not enforce EROFS for android-T and below." am: 3282850933
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/19293150

Change-Id: I9f1bb4005459345e536f04cef5f26aa2277963d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 23:57:36 +00:00
David Anderson
aee8ddbc46 vts_fs_test: Only require EROFS in T+ kernels.
Bug: 237765186
Test: vts_fs_test
Ignore-AOSP-First: cherry-pick
Change-Id: I294535953bfbe0f246347487b746d3adf2fca1aa
Merged-In: I294535953bfbe0f246347487b746d3adf2fca1aa
2022-07-14 17:47:51 +00:00
David Anderson
3282850933 Revert "Do not enforce EROFS for android-T and below."
This reverts commit a571d4a9bc.

Reason for revert: Incorrect fix

Bug: 237765186
Ignore-AOSP-First: cherry-pick
Change-Id: I6586c8e53cc89418d1802807a1a2e108f7e825d3
Merged-In: I6586c8e53cc89418d1802807a1a2e108f7e825d3
2022-07-14 17:47:47 +00:00
P.Adarsh Reddy
ea705b6886 Do not enforce EROFS for android-T and below. am: b2182ee8e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/19263117

Change-Id: Iea94240e30254428bc3c1c6ddcc79784b3f3c7b2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 17:25:42 +00:00
Benergy Meenan Ravuri
6a7cb89655 Check userspace snapshots only for API level >= T am: 9591090a17
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/19263116

Change-Id: I750b36be179054818ba7f5f724e01f17fa7e41a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 17:25:41 +00:00
Akilesh Kailash
4327290387 libsnapshot: Fix vts_libsnapshot_test.SnapshotUpdateTest#FullUpdateFlow am: 299717115e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/19263115

Change-Id: I487a3706561233cb3834593b570c80a9abfa6b3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 17:25:40 +00:00
P.Adarsh Reddy
b2182ee8e0 Do not enforce EROFS for android-T and below.
EROFS is not mandatory for android T and below,
so skip the test for those.

Bug: 237765186
Test: vts_fs_test fs#ErofsSupported
Change-Id: Iceea46f8f2d443636de504962b718a2461605591
Ignore-AOSP-First: already present in aosp/master
2022-07-12 17:58:24 +00:00
Benergy Meenan Ravuri
9591090a17 Check userspace snapshots only for API level >= T
Skip checking for userspace snapshots enabled property
for API level < T as this feature is not applicable for
GRF targets.

Bug: 236450435
Test: vts_ota_config_test
Change-Id: Ib5083f6237cdf4962aae06f166811d67cf6c385e
Ignore-AOSP-First: already present in aosp/master
2022-07-12 17:57:59 +00:00
Akilesh Kailash
299717115e libsnapshot: Fix vts_libsnapshot_test.SnapshotUpdateTest#FullUpdateFlow
Check if compression feature is enabled.

Bug: 238143011
Test: OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I77663799a5371f1de8b4e29d7c777a24249d1b7b
Ignore-AOSP-First: already present in aosp/master
2022-07-12 17:57:25 +00:00
Ray Ye
621c74c063 Updating async trace for track trace symbols from T/U to G/H
Bug: 230399626
Test: atest TraceDevTest
Ignore-AOSP-First: Change from aosp/2078467 without ABI change
Change-Id: Ia927c19f544536f78c20ccef5830bd1be0cebf9b
Merged-In: Ia1b39f55c96011a9672f4d5c8763044f849d0bb2
2022-06-22 19:09:06 +00:00
Akilesh Kailash
ae04e7ede1 libsnapshot: Fix vts_libsnapshot_test for GRF with Vendor on S
If the vendor partition is on S and system partition is on T,
certain tests in vts_libsnapshot_test used to fail. This is primarily
because of inconsistent check between daemon and vts test.

vts test checks the userspace.snapshots.enabled property which is true on T
but never checks if the underlying vendor partition is on S. Hence,
vts test will enable userspace snapshots. However, daemon checks
the vendor partition and disables userspace snapshots thereby
leading to inconsistency.

This is only a problem on vts tests. The underlying OTA on devices
works fine as we have the vendor partition check.

Bug: 236311008
Test: vts_libsnapshot_test on S vendor and T system
      vts_libsnapshot_test on T vendor and T system
Ignore-AOSP-First: cherry-pick from aosp
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Iad4f299bd2e07c9c01f5fbee6a20e2f01bf1778a
2022-06-16 22:56:14 +00:00
Shawn Willden
18cf62712c Implement GetRootOfTrust
Bug: 219076736
Test: VtsAidlKeyMintTargetTest
Change-Id: I8485360f253ca20f008c5df5090e79c1781fbb4f
Merged-In: I8485360f253ca20f008c5df5090e79c1781fbb4f
Ignore-AOSP-First: already present in aosp/master
2022-06-14 10:22:43 +01:00
Akilesh Kailash
ae2837d80c Merge "init: Set oom_score_adj to snapuserd process" into tm-dev 2022-06-02 23:18:52 +00:00
Akilesh Kailash
1a2f870cb3 init: Set oom_score_adj to snapuserd process
When a process is started as a native service,
oom_score_adj is set to -1000 so that processes
are unkillable by lmkd.

During boot, snapuserd process is not started as a service;
hence, we need to set the oom_score_adj explicitly else in
the event of low memory situation, lmkd can kill the
process thereby device can never boot.

Bug: 234691483
Test: th and OTA on Pixel
Ignore-AOSP-First: cherry-pick from AOSP
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ic2c85aa470522b4bc847a16b4f5cebfc528ed3cf
2022-06-02 21:19:46 +00:00
Stephen Crane
71100bbc44 [trusty] Bump number of ACVP arguments to match boringssl
Cherry-pick note: Needed for the BoringSSL change in the same topic.  No functional change to Android devices, this change affects ACVP testing only.

Boringssl added a new argument to the ACVP modulewrapper, so we need to
sync this change to the Trusty modulewrapper.

Test: m trusty_acvp_modulewrapper
Bug: 233873228
Change-Id: Ia79705d9fe32a07afc09cf8e0231db300073b504
(cherry picked from commit 08d8557718)
Merged-In: Ia79705d9fe32a07afc09cf8e0231db300073b504
2022-05-31 19:04:19 +00:00
TreeHugger Robot
190e2bc6e1 Merge "storaged: Avoid divide-by-zero in performance measurement" into tm-dev 2022-05-31 16:47:14 +00:00
David Anderson
5b227f3451 vts_fs_test: Require EROFS sysfs nodes.
These were backported to android13-5.10 and should be present in
T-launch kernels.

Bug: 233926292
Test: vts_fs_test
Change-Id: Ifb5ff6a200b081fe8696d5803d4a128740eb8e21
Merged-In: Ifb5ff6a200b081fe8696d5803d4a128740eb8e21
Ignore-AOSP-First: cherry-pick
2022-05-27 19:01:59 +00:00
David Anderson
0d3b8d557f Merge "Relax filesystem requirements in vts_fs_test." into tm-dev 2022-05-27 04:55:28 +00:00
Hsin-Yi Chen
3f2a2bf298 Merge "RESTRICT AUTOMERGE Ignore weak symbol difference in libutils ABI check" into tm-dev 2022-05-27 02:59:01 +00:00
Matthew Duggan
84b7ca8d81 storaged: Avoid divide-by-zero in performance measurement
The code previously assumed that write() took a non-zero number of clock
ticks.  This is mostly true, but can't be guaranteed.  Add a check to
avoid crashing if it's 0.

Bug: 233008287
Test: Compile
Change-Id: Idec0052f534dc4abb81a414ca76f6c11f4a4dded
(cherry picked from commit 5a02a9bab9)
Merged-In: Idec0052f534dc4abb81a414ca76f6c11f4a4dded
2022-05-27 01:51:34 +00:00
David Anderson
0895d63952 Relax filesystem requirements in vts_fs_test.
Bug: 233926292
Test: vts_fs_test
Change-Id: I9665acebd6ebfde14e0cd76e8044e7ced9ffbeb3
Ignore-AOSP-First: cherry-pick from AOSP
2022-05-27 00:21:30 +00:00
Hsin-Yi Chen
c7d9320ca4 RESTRICT AUTOMERGE Ignore weak symbol difference in libutils ABI check
The diff_flags make the ABI checker ignore the weak symbol difference
caused by PGO.

Ignore-AOSP-First: This patch relaxes the ABI check for T only.
                   b/232982219 tracks the long-term solution.
Test: make libutils.vendor
Bug: 230076879
Change-Id: I8ec2c0f5a540263b4e8a0a4f9cf26f9c297593b5
2022-05-26 15:20:06 +08:00
Rubin Xu
2cf162748f Add AID_SECURITY_LOG_WRITER
A suppplementary group to mark which app can write to the security log
buffer. Granted via android.permission.WRITE_SECURITY_LOG and checked by
logd.

Bug: 232283779
Test: manual
Change-Id: I3ad66031ab1c9eef26db0f3e8968659dfa2855cb
(cherry picked from commit 7e14d138ae)
Merged-In: I3ad66031ab1c9eef26db0f3e8968659dfa2855cb
2022-05-25 20:54:35 +00:00