Commit graph

6 commits

Author SHA1 Message Date
Aditya Choudhary
ad2ba1b851 [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
go/new-android-ownership-model

Bug: 304529413
Test: N/A
Change-Id: Ic8c4bd6ac246e7efa98bbdaf822d12ae8e1230a5
2024-02-05 15:45:22 +00:00
Eric Biggers
e1d4bc5591 Assert that at least one Weaver slot is used
Uncomment an assertion that had been temporarily commented out because
AOSP was out-of-date.  This addresses a TODO in the code.

Test: atest VtsHalWeaverTargetTest
Change-Id: Ie572bb5fa05fcae3845aa46478cde0ac49206137
2024-01-26 02:59:34 +00:00
Eric Biggers
47b145a0d8 Allow uninstantiated WeaverTest
Add back GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST, which I had
accidentally removed while merging the AIDL and HIDL tests.  I think
this is still needed on devices that don't support Weaver at all.

Bug: 291284381
Test: atest VtsHalWeaverTargetTest
Change-Id: Iac1b4476620e51c645e3ad57444ee386cb879029
2023-07-24 17:28:37 +00:00
Eric Biggers
31380e7bc9 Don't overwrite in-use Weaver slots during VTS
VtsHalWeaverTargetTest always overwrote the first and last Weaver slots.
Before Android 14, apparently this didn't cause problems because Android
didn't use Weaver for users that never had an LSKF set.  However, now
users get a Weaver slot right away.  That typically means that the first
Weaver slot will be used by user 0.

Fix the test to read /metadata/password_slots/slot_map to determine
which slots are in use by the system, and only write to unused slots.

Bug: 291284381
Test: 'atest -v VtsHalWeaverTargetTest'.  Checked for INFO messages
      showing that slots 1 and 63 were used by the test.  Then rebooted
      and verified that the device can still be unlocked.
Change-Id: Id2cce4240d68999471e7d1e8fc7a8449587eed97
2023-07-19 15:59:10 +00:00
Eric Biggers
961a138e47 Simplify Weaver VTS test
- Get the config in SetUp() so that it's easily available to test cases.
- Rename "weaver" class member to "weaver_" to match coding style.
- Eliminate unnecessary variables when checking WeaverReadResponse.
- Fix a typo.

Bug: 291284381
Test: 'atest VtsHalWeaverTargetTest' on bramble
Change-Id: Ia6dca996103057bfdc9002bc9ab2c039e2333ed9
2023-07-19 04:09:01 +00:00
Eric Biggers
f0d6907d20 Move VtsHalWeaverTargetTest to common directory
Since VtsHalWeaverTargetTest now handles both AIDL and HIDL, move it
from weaver/aidl/vts/ to weaver/vts/.

Bug: 291284381
Test: 'atest VtsHalWeaverTargetTest' on bramble
Change-Id: Icfa0ff3b22b036110df327674fda44820057aabd
2023-07-19 04:09:01 +00:00