Commit graph

53321 commits

Author SHA1 Message Date
Tri Vo
e0fb4d0ce5 KeyMint: Add Root-of-Trust test cases
This patch is a squash of following patches:
 - aosp/2514097
 - aosp/2535086
 - aosp/2576910

Bug: 255344624
Test: VtsKeyMintAidlTargetTest
Change-Id: I8b34a94c11d7cc174821483f624fd083ca1763ac
Merged-In: I8b34a94c11d7cc174821483f624fd083ca1763ac
2023-07-20 18:05:24 -04:00
Tri Vo
727b45bf4f KM 4: Add Root-of-Trust test cases
This patch is a squash of following patches:
 - aosp/2582033
 - aosp/2603248

Bug: 255344624
Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I46e62ab9031d3745f99bd214f9e579e80edc9128
Merged-In: I46e62ab9031d3745f99bd214f9e579e80edc9128
2023-07-20 18:05:18 -04:00
Eric Biggers
86b9048544 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
(cherry picked from commit 31380e7bc9)
Merged-In: Id2cce4240d68999471e7d1e8fc7a8449587eed97
2023-07-20 17:35:59 +00:00
Eric Biggers
42d76ae5df 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
(cherry picked from commit 961a138e47)
Merged-In: Ia6dca996103057bfdc9002bc9ab2c039e2333ed9
2023-07-20 17:35:55 +00:00
Eric Biggers
c9691dd624 Remove redundant HIDL Weaver VTS test
Now that there is a single Weaver VTS test that covers both the HIDL and
AIDL services (weaver/vts/), the HIDL-specific test can be deleted.

Bug: 291284381
Test: 'atest VtsHalWeaverTargetTest' on bramble
Change-Id: Ie942825c154e6792e6ffdbf0c59248de9de10d92
(cherry picked from commit e2e40d69a6)
Merged-In: Ie942825c154e6792e6ffdbf0c59248de9de10d92
2023-07-20 17:35:51 +00:00
Eric Biggers
a8fc1ea054 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
(cherry picked from commit f0d6907d20)
Merged-In: Icfa0ff3b22b036110df327674fda44820057aabd
2023-07-20 17:35:47 +00:00
Eric Biggers
1cd59722b6 Make VtsHalWeaverTargetTest test both HIDL and AIDL services
VtsHalWeaverTargetTest and VtsHalWeaverV1_0TargetTest are identical
except for whether they use AIDL or HIDL.  Unfortunately, the HIDL test
is needed for several more years.  For now, we have to make some
substantial fixes to both tests.  To make continued maintenance of this
test easier, update VtsHalWeaverTargetTest to handle both AIDL and HIDL.
The test cases are still written in terms of the AIDL API, so it should
still be straightforward to remove HIDL support when the time comes.

Bug: 291284381
Test: 'atest VtsHalWeaverTargetTest' on bramble
Change-Id: I6b760930146ad1b08f17ef810a86c0058601c3bf
(cherry picked from commit b59654f239)
Merged-In: I6b760930146ad1b08f17ef810a86c0058601c3bf
2023-07-20 17:35:43 +00:00
Eric Biggers
0ddd5410e3 Update OWNERS for Weaver
Weaver does not have a clear owner, but list the people who seem to be
most involved with it currently.

Bug: 291284381
Test: N/A
Change-Id: I69de46f8154bf91272a7197ce71c13c745a7208e
(cherry picked from commit f4483a2ce9)
Merged-In: I69de46f8154bf91272a7197ce71c13c745a7208e
2023-07-20 17:35:38 +00:00
Weilin Xu
cf892db1ef Fix null pointer crash in AIDL radio HAL VTS
Bug: 277531858
Test: atest VtsHalBroadcastradioAidlTargetTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:978de0a8a4968774e81e10e716a46bd9e1369479)
Merged-In: Icb67c27b9a747411a9bfbd48647e6e6046cf5e8d
Change-Id: Icb67c27b9a747411a9bfbd48647e6e6046cf5e8d
2023-07-19 19:46:04 +00:00
Treehugger Robot
d8f18469c3 Merge "Fix wrong timeout and mock method in radio VTS" into stage-aosp-udc-ts-dev 2023-07-18 19:50:07 +00:00
xiaoshun.xu
360c71ddab Fix vts sco test fail for usb interface
[Description]
If bt controller device is usb interface,
sco loopback single pkt and bandwidth test can not pass
because pkt size is limited accroding to core spec

[Root Cause]
USB sco packet size is limited in spec

[Solution]
If is bt usb chip, continuous receive sco packets
  from controller until size is enough

[Test Report]
Test Pass

Bug: 286355871
(cherry picked from https://android-review.googlesource.com/q/commit:4e85c099593a7d337bb277afc178eda3f7e7a818)
Merged-In: Idb150d8a72149f7e1dfaccfd7bc82a91710da59c
Change-Id: Idb150d8a72149f7e1dfaccfd7bc82a91710da59c
2023-07-18 18:03:09 +00:00
Gabriel Biren
e410f8ccc0 Merge "Use a 64-bit instance of 0x1 when creating the event bitmask." into stage-aosp-udc-ts-dev 2023-07-14 20:06:21 +00:00
Yusuke Yoshimura
bc88f61afb Merge "Skip ATTEST_KEY using variant on waivered devices" into stage-aosp-udc-ts-dev 2023-07-14 06:25:50 +00:00
Weilin Xu
3729b0bd60 Fix wrong timeout and mock method in radio VTS
Fixed wrong time unit convension for timeout values used in broadcast
radio HAL VTS. Also replaced tuner callback mock method which caused
segmentation fault when unimplemented callback methods are called. In
addition, antenna connection state was checked at the end of the each
test instead of at the beginning.

Bug: 277531858
Test: atest VtsHalBroadcastradioAidlTargetTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4420c1dbbf28cc80ac47cdbafb9cc81034f8fc8f)
Merged-In: Ied70fcfd2742ae5d253aec984e2161afa6f65162
Change-Id: Ied70fcfd2742ae5d253aec984e2161afa6f65162
2023-07-14 00:09:26 +00:00
Gabriel Biren
4c3eeb417e Use a 64-bit instance of 0x1 when creating
the event bitmask.

Comments on ag/24025770 suggest that the bit
shift will lead to undefined behavior for
event codes greater than 31.

Bug: 290318208
Test: atest VtsHalWifiNanIfaceTargetTest
       # manually set some of the expected
       # events codes to > 31 to verify that
       # the bit shift works as expected
Change-Id: I09e11dac8acf90baf047e24cebe1d01970b1dc8a
2023-07-13 19:46:59 +00:00
David Drysdale
4a70416566 Allow extra ID attestation error codes am: 3f6ab601b9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2646973

Change-Id: I50cb0d0bcbc65034315fef54ef5b772fb6d3d38b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-13 07:15:02 +00:00
Treehugger Robot
e6da8fb752 Merge "BluetoothAudio: Statically link HAL dependencies" into stage-aosp-udc-ts-dev 2023-07-12 22:57:11 +00:00
Treehugger Robot
fcabe78a65 Merge "Strongbox may not support 1024 bit key size for RSA." into stage-aosp-udc-ts-dev 2023-07-12 20:40:47 +00:00
Myles Watson
5aadf9ad17 BluetoothAudio: Statically link HAL dependencies
Bug: 290666670
Bug: 289857524
Bug: 284091286
Bug: 289489060
Test: mma -j32
(cherry picked from https://android-review.googlesource.com/q/commit:44628f38d2f60a8e9c283315485d2d62605f677d)
Merged-In: I2b3c32b133e208ec2cfb1b244ccb24ad249f22df
Change-Id: I2b3c32b133e208ec2cfb1b244ccb24ad249f22df
The 32-bit libraries may not be present on the device.  This makes the test more self-contained.
2023-07-12 17:07:14 +00:00
David Drysdale
3f6ab601b9 Allow extra ID attestation error codes
When deliberately testing invalid ID attestation, use the helper
function (which checks the error return code is correct) in one more
place.

Test: VtsAidlKeyMintTargetTest
Bug: 286733800
Change-Id: I6ea5bd7ee19b3b172330117bfde1b16745debba7
(cherry-picked from commit c68dc93788)
Merged-In: I6ea5bd7ee19b3b172330117bfde1b16745debba7
2023-07-12 13:58:41 +00:00
David Drysdale
85105d09b7 Merge changes from topic "cherrypicker-L84900000961803500:N52200001385298444" into stage-aosp-udc-ts-dev
* changes:
  Fix attestation error checks
  Allow extra error code in device ID attestation
2023-07-12 09:31:43 +00:00
liuxiangjun
1d611fec5f Return INVALID_ ARGUMENTS is the expected result am: 7ddd478150
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2648141

Change-Id: I3811ee46d22121f0809885efd2ef4cc0818fba76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-12 03:02:37 +00:00
Gabriel Biren
3f7bfd2dc5 Represent NAN callback events as a bitmap
to better handle overlapping events.

Reimplementation of aosp/2473685 for
the AIDL VTS tests.

Bug: 290318208
Test: atest VtsHalWifiNanIfaceTargetTest
Change-Id: I1a0e6ab8dd529c10fcec8f26424a7181e7d91568
2023-07-11 22:23:34 +00:00
David Drysdale
35621098de Fix attestation error checks
Avoid the ADD_FAILURE at the end if attestion ID failure uses an allowed
return code.

Test: VtsAidlKeyMintTargetTest
Bug: 286733800
(cherry picked from https://android-review.googlesource.com/q/commit:810fbcffed8e86a3b53e8212ce4fdb64971d812f)
Change-Id: I0dcac312ac4516a078b2742721e3a19074da52b1
Merged-In: I0dcac312ac4516a078b2742721e3a19074da52b1
2023-07-06 13:02:48 +01:00
David Drysdale
94042a987c Allow extra error code in device ID attestation
Generalize the existing helper function to allow more variants.

Remove a couple of pointless invocations of the existing helper.

Bug: 286733800
Test: VtsAidlKeyMintTargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:f42238c99ffe0df2e51cec84a96ed859a878b2b0)
Merged-In: Ic01c53cbe79f55c2d403a66acbfd04029395c287
Change-Id: Ic01c53cbe79f55c2d403a66acbfd04029395c287
2023-07-06 13:01:24 +01:00
liuxiangjun
7ddd478150 Return INVALID_ ARGUMENTS is the expected result
For devices not in LTE service, the vts test returns INVALID_ ARGUMENTS is an expected result

Bug:289756066

Test:
VtsHalRadioV1_5TargetTest  PerInstance/RadioHidlTest_v1_5#startNetworkScan/0_slot1
VtsHalRadioV1_5TargetTest  PerInstance/RadioHidlTest_v1_5#startNetworkScan/1_slot2

Change-Id: I873d51e089b27aa0cc0dc9f5f25fd8ffaa4d8f40
Signed-off-by: liuxiangjun <liuxiangjun3@xiaomi.com>
Merged-In: I873d51e089b27aa0cc0dc9f5f25fd8ffaa4d8f40
2023-07-06 05:16:22 +00:00
Treehugger Robot
5e896c9899 [automerger skipped] Merge "[RESTRICT AUTOMERGE] Allow extra error code in device ID attestation" into android13-tests-dev am: b68968f638 -s ours
am skip reason: subject contains skip directive

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2646738

Change-Id: I655c11a738929da6ff26aa08f08c7ab139fa46b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-06 00:58:41 +00:00
David Drysdale
bbfbf2f9d6 [automerger skipped] [RESTRICT AUTOMERGE] Allow extra error code in device ID attestation am: b18c757eda -s ours
am skip reason: subject contains skip directive

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2646738

Change-Id: I81333034f40e59341d1d826a25a14c10eccd1b5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-06 00:58:37 +00:00
Gabriel Biren
38beddf384 [automerger skipped] Merge "Add a new utility class wifi_hidl_test_utils_1_6 for the Wifi VTS tests." into android13-tests-dev am: 73e10b765f -s ours
am skip reason: Merged-In I2571876149fc14c8de02e1cec9934dd052cada5c with SHA-1 cd6da07327 is already in history

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2618209

Change-Id: Ifa837a3735726c13a389c6bd1e2df4b7dcdfb333
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-06 00:57:19 +00:00
Gabriel Biren
f6adcdb126 [automerger skipped] Add a new utility class wifi_hidl_test_utils_1_6 am: eadd5160d8 -s ours
am skip reason: Merged-In I2571876149fc14c8de02e1cec9934dd052cada5c with SHA-1 cd6da07327 is already in history

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2618209

Change-Id: If8c5aa9e882d7771587f47b68d34959bddb9ee98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-06 00:57:15 +00:00
Treehugger Robot
b68968f638 Merge "[RESTRICT AUTOMERGE] Allow extra error code in device ID attestation" into android13-tests-dev 2023-07-06 00:16:46 +00:00
Gabriel Biren
73e10b765f Merge "Add a new utility class wifi_hidl_test_utils_1_6 for the Wifi VTS tests." into android13-tests-dev 2023-07-06 00:16:22 +00:00
David Drysdale
b18c757eda [RESTRICT AUTOMERGE] Allow extra error code in device ID attestation
Generalize the existing helper function to allow more variants.

Manual cherry-pick of aosp/2627969 combined with aosp/2648423 to avoid
merge conflicts

Bug: 286733800
Test: VtsAidlKeyMintTargetTest
Merged-In: Ic01c53cbe79f55c2d403a66acbfd04029395c287
Merged-In: I0dcac312ac4516a078b2742721e3a19074da52b1

Change-Id: I328f7b3195d4b4dd1ed1da17377696261094ea76
2023-07-05 13:41:54 +01:00
David Drysdale
997efaa191 Skip ATTEST_KEY using variant on waivered devices
Bug: 281452355
Bug: 289451966
Test: VtsAidlKeyMintTargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:c3de1caf4327dc367a95f7416cba19827428bd1b)
Merged-In: Id448edae88569518deb2db4ab7bf50d16f33709a
Change-Id: Id448edae88569518deb2db4ab7bf50d16f33709a
2023-07-04 14:17:58 +00:00
Subrahmanyaman
558dbedf51 Strongbox may not support 1024 bit key size for RSA.
Strongbox may not support 1024 bit key size for RSA.
So in NoUserConfirmation test updated the key size to
2048 so that the test works for both TEE and Strongbox.

Bug: 280117495
Test: run VtsAidlKeyMintTarget
(cherry picked from https://android-review.googlesource.com/q/commit:ce2bebdd79cf7536b06c2d67cdee8867475a3b10)
Merged-In: I32bb28001aca9b69eedb1bd3d0bcff43052d06e4
Change-Id: I32bb28001aca9b69eedb1bd3d0bcff43052d06e4
2023-07-03 17:45:42 +00:00
Yuyang Huang
32d8479f86 Merge "Add TV devices that have MdnsOffloadManagerService to APF exempt list" into stage-aosp-udc-ts-dev 2023-06-30 06:25:52 +00:00
mike liao
f0a28188be Add fix vts fail when configureMonitorEvent am: b79cbf50f1 am: d8baeb3916 am: 1b000d1343
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2640754

Change-Id: I9950528cab789b86f1f53e19d3d840e063551b12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 00:54:37 +00:00
mike liao
1b000d1343 Add fix vts fail when configureMonitorEvent am: b79cbf50f1 am: d8baeb3916
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2640754

Change-Id: I97914a24ec13a8c8278877907bd6f68012a0deb2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 00:05:48 +00:00
mike liao
d8baeb3916 Add fix vts fail when configureMonitorEvent am: b79cbf50f1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2640754

Change-Id: I48d3c2ecee071096c1b94c94293bb9b1cc39f839
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 23:22:37 +00:00
Austin Borger
263e362091 Camera VTS: Properly initialize Stream in various places
useCase and colorSpace are not explicitly initialized. colorSpace must
be explicitly initialized to UNSPECIFIED, as its default value is not
zero. Without initialization, the HAL will receive incorrect Stream
data.

Bug: 287305593
Test: Ran full VTS test on Cuttlefish / OEM testing.
Change-Id: I6a29600b5dc06ebdc61b38e0585204fe52d590c2
2023-06-29 00:49:17 +00:00
Yuyang Huang
54bbf07e06 Add TV devices that have MdnsOffloadManagerService to APF exempt list
For Panel TV devices, the vendor can implemented TV specific mDNS
offload instead of APF in U. If TV specific mDNS offload is implemented.
MdnsOffloadManagerService will exist in the system ext partition. The
APF vts will be skipped if MdnsOffloadManagerService exist.

Bug: 283038712
Test: atest VtsHalWifiStaIfaceTargetTest
Change-Id: If55ec42507460b9a2c6eee683d85b8109f2af236
2023-06-28 02:24:35 +00:00
mike liao
b79cbf50f1 Add fix vts fail when configureMonitorEvent
[Description]
VTS StartFilterInDemux failed when configureMonitorEvent is called

[Root Cause]
Scrambling status event is not notified when configureMonitorEvent is called
  so test case failed.

[Solution]
Scrambling status event is not notified because of no input data.
Add input setting and check event notified or not after data is input.

Test: Manual
bug: 288193021

Change-Id: If5875d064fd67b72f8299205a5e35b1a2bd61934
2023-06-27 11:25:43 -07:00
mike liao
8b39328dcc Add fix vts fail when configureMonitorEvent
[Description]
VTS StartFilterInDemux failed when configureMonitorEvent is called

[Root Cause]
Scrambling status event is not notified when configureMonitorEvent is called
  so test case failed.

[Solution]
Scrambling status event is not notified because of no input data.
Add input setting and check event notified or not after data is input.

Test: Manual
bug: 288193021

Change-Id: If5875d064fd67b72f8299205a5e35b1a2bd61934
(cherry picked from commit def4652792)
2023-06-27 16:42:23 +00:00
Haotien Hsu
f3a68a04fc Test: Don't check results when no type-c ports
For those devices without type-c ports, the queryPortStatus test is
always failed.Because there are no PortStatus for the callbacks.
Adding an additional condition branch to skip the results checking when
there are no PortStatus.

Bug: 281643316
(https://partnerissuetracker.corp.google.com/issues/281643316)
Signed-off-by: Haotien Hsu <haotienh@nvidia.com>
(cherry picked from https://android-review.googlesource.com/q/commit:392d530a649b709187fe8bf53512ef234051662f)
Merged-In: Ibf599038b542d5d81a2af9ab2097f2f868be0447
Change-Id: Ibf599038b542d5d81a2af9ab2097f2f868be0447
2023-06-22 20:15:45 +00:00
Bharatt Kukreja
b082ae031f Merge "Camera: Add links to mandatory stream combination tables" into udc-dev 2023-06-19 19:36:54 +00:00
Gabriel Biren
0f1628e1ac Merge "Set the value of using_dynamic_iface_combination_ in the WifiChip constructor." into udc-dev 2023-06-16 20:58:26 +00:00
Rocky Fang
25d4025065 Merge "Ignore NanSessionStateChange test for old HAL" into udc-dev 2023-06-16 16:44:48 +00:00
Changyeon Jo
e79e89d070 Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c am: c070b5a14b am: 55baee93d6 am: e0868c4484 am: 62ad051d97 am: e814934db9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: I1cb89f2bb6a2f3ce1cea2ac8c91204cfeac00303
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 03:09:33 +00:00
Changyeon Jo
e814934db9 Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c am: c070b5a14b am: 55baee93d6 am: e0868c4484 am: 62ad051d97
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: Ief10fc725f67bb05fbcd1b3073ae06562c36349d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 02:27:52 +00:00
Changyeon Jo
9e8d44aba4 Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c am: c070b5a14b am: 55baee93d6 am: e0868c4484 am: ca64f5b140
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: If414ff886a8c2e6c336289e89f73719d740ac73c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 02:24:19 +00:00