Commit graph

32218 commits

Author SHA1 Message Date
Devin Moore
37c395758d Keep track of DeathMonitor cookies
This change keeps track of the objects that the cookies points to so the
serviceDied callback knows when it can use the cookie.

Test: atest neuralnetworks_utils_hal_aidl_test
Tets: atest NeuralNetworksTest_static
Bug: 319210610
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:def7a3cf59fa17ba7faa9af14a24f4161bc276bd)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d6f965fab9739d35f69fd042a95e783dc1859f32)
Merged-In: I418cbc6baa19aa702d9fd2e7d8096fe1a02b7794
Change-Id: I418cbc6baa19aa702d9fd2e7d8096fe1a02b7794
2024-05-01 17:17:08 +00:00
Michael Butler
4668f30dcf Add additional bounds checks to NNAPI FMQ deserialize utility functions
This CL adds the following additional bounds checks:
* Adds additional checks of the index of the std::vector before
  accessing the element at the index
* Changes the array index operator [] to the checked std::vector::at
  method

Bug: 256589724
Test: mma
Merged-In: I6bfb02a5cd76258284cc4d797a4508b21e672c4b
Change-Id: I6bfb02a5cd76258284cc4d797a4508b21e672c4b
2022-12-05 20:24:09 +00:00
jiabin
f16c6d3a57 Fix array out of bound in audioTransportToHal.
The number of audio profile and extra audio descriptor must not be
greater than the maximum value.

Bug: 237288416
Bug: 237717857
Test: repo step in bug
Test: atest android.hardware.audio.common@7.0-util_tests
Change-Id: I1fcfa29d7841a1cb73bafb1ea92f3b1630992ae9
Merged-In: I1fcfa29d7841a1cb73bafb1ea92f3b1630992ae9
(cherry picked from commit 0ee75ca925)
2022-07-07 23:24:30 +00:00
Shuo Qian
c8bf2210fa Skip slot 2 for other radio modules in single sim mode am: c6a7143b1d
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15953283

Change-Id: Ia04dea0e93424c28477e6ee65c75f9d2692a53e4
2021-10-01 17:43:09 +00:00
Shuo Qian
c6a7143b1d Skip slot 2 for other radio modules in single sim mode
Bug: 199986032
Test: atest
Change-Id: Idc115954c8ccb26a6127a80d466f22559be641d2
2021-10-01 00:22:55 +00:00
Aaron Tsai
f8bb1e244e Sending SMS via 1.6 APIs in VTS 1.6 am: 121ff3c5ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15827214

Change-Id: Ia0052b964a2e8dbdea69511cab1c242617d1d80f
2021-09-23 18:12:14 +00:00
Aaron Tsai
121ff3c5ef Sending SMS via 1.6 APIs in VTS 1.6
Bug: 195097899
Test: atest VtsHalRadioV1_6TargetTest -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=*send*/0_slot1"

Ignore-AOSP-First: cherry-pick from AOSP
Change-Id: I19ead8a4e1ab2f1e4ddb3f55edacd4b51990f9cd
Merged-In: I19ead8a4e1ab2f1e4ddb3f55edacd4b51990f9cd
2021-09-23 04:12:54 +00:00
TreeHugger Robot
7a0dff7492 Merge "Camera: VTS: Set proper dataSpace for reprocessing test" into stage-aosp-sc-ts-dev am: 6b94d29f51
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15874436

Change-Id: I20591ed7548a008ba0ac7154d65ec982074bb68d
2021-09-21 20:21:28 +00:00
TreeHugger Robot
6b94d29f51 Merge "Camera: VTS: Set proper dataSpace for reprocessing test" into stage-aosp-sc-ts-dev 2021-09-21 20:04:20 +00:00
Sooraj Sasindran
b485e83f0c Allow not supported for setNrDualConenctivity am: 9a7de0696a
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15871563

Change-Id: I8fa86fef0eff6ac31d2cf3ed3a6b17f27d8bdb50
2021-09-21 06:07:56 +00:00
Shuzhen Wang
208ed2af02 Camera: VTS: Set proper dataSpace for reprocessing test
Set proper dataSpace for reprocessing output stream.

Bug: 199483381
Test: Camera VTS test on Pixel 4 and Cuttlefish
Change-Id: I6ac96fc65abf4332f3f248b9aed0e3a7ea88d57c
2021-09-20 23:53:58 +00:00
Shuo Qian
928d92738a Merge "Skip Slot 2 in Radio VTS 1.0 in single sim mode" into stage-aosp-sc-ts-dev am: 33af950235
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15857343

Change-Id: I904ef561c7b3507d315a0fb8bcfa7b263758ab4f
2021-09-20 18:10:37 +00:00
Sooraj Sasindran
9a7de0696a Allow not supported for setNrDualConenctivity
Allow not supported for setNrDualConenctivity

Bug: 193101785
Test: verified on 4G only device
Merged-In: I7c7e926819d305d210da988503716eb5d3c2e333
Change-Id: I7c7e926819d305d210da988503716eb5d3c2e333
2021-09-20 17:58:14 +00:00
Shuo Qian
33af950235 Merge "Skip Slot 2 in Radio VTS 1.0 in single sim mode" into stage-aosp-sc-ts-dev 2021-09-20 17:50:12 +00:00
TreeHugger Robot
d6aff4eb6c Merge "Revert "Expand Gatekeeper test"" into stage-aosp-sc-ts-dev am: 6377593930
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15852932

Change-Id: I2866f829029c1beb180564dc45227b92bf07b2ab
2021-09-18 18:48:40 +00:00
TreeHugger Robot
6377593930 Merge "Revert "Expand Gatekeeper test"" into stage-aosp-sc-ts-dev 2021-09-18 18:33:39 +00:00
Shuo Qian
6a56b7fa87 Skip Slot 2 in Radio VTS 1.0 in single sim mode
Test: atest VtsHalRadioV1_0TargetTest
Bug: 199986032
Change-Id: If296df349aa7f87932f5bb24896f0a3fdd347f5d
2021-09-17 23:53:21 +00:00
TreeHugger Robot
dc8303b4ae Merge "Fix VtsHalWifiSupplicantV1_3TargetTest fail" into stage-aosp-sc-ts-dev am: 3dedd1a0fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15847170

Change-Id: I6526bf1d2730c92716c14369037ee80df6d25b4f
2021-09-17 23:18:01 +00:00
Roshan Pius
356437d474 vts(wifi): Stop wifi fully instead of stopping framework am: 874239047a
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15847168

Change-Id: I029bfab8ef9a78aa4212eeed38aea5aae007dfe2
2021-09-17 23:18:00 +00:00
TreeHugger Robot
3dedd1a0fe Merge "Fix VtsHalWifiSupplicantV1_3TargetTest fail" into stage-aosp-sc-ts-dev 2021-09-17 23:05:25 +00:00
Janis Danisevskis
8686354b3d Revert "Expand Gatekeeper test"
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1828635

Bug: 198991853
Bug: 187673037
Change-Id: I3eb3da36560f0b6aeb08331dec01c44c6d87466d
Merged-In: I7dbcebe0be03280bc72a34542da0c479ea600ee4
(cherry picked from commit 417c595019)
2021-09-17 10:05:11 +00:00
henry-th.yeh
12ab21813b Fix VtsHalWifiSupplicantV1_3TargetTest fail
Remove disable_framework option to pass the
stopWifiFramework procedure.

Bug: 173081502
Bug: 199444489
Test: Build VTS
Test: run vts -m VtsHalWifiSupplicantV1_3TargetTest
-t PerInstance/SupplicantStaIfaceHidlTest#RegisterC
allback_1_3/default_default_0 --abi armeabi-v7a

Change-Id: I6813905b6c804c1c93ea59db9d8c255c2f7c45d9
2021-09-16 21:15:16 +00:00
Roshan Pius
874239047a vts(wifi): Stop wifi fully instead of stopping framework
Stopping entire framework can cause other essential services to be
stopped. When wifi is stopped, it does not interact with any of the
wifi HAL's.

Bug: 168278011
Bug: 199444489
Test: atest --iterations 10
VtsHalWifiSupplicantP2pV1_0TargetTest
VtsHalWifiSupplicantP2pV1_1TargetTest
VtsHalWifiSupplicantP2pV1_2TargetTest
VtsHalWifiSupplicantP2pV1_3TargetTest
Change-Id: Ia93e78cf4c147e42dd3d68e24a582c0c1af15899
2021-09-16 21:15:01 +00:00
Pierre Couillaud
13a2db008e Fix closure of record thread am: f8a4e2ae3a
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15698544

Change-Id: I7fdead86b9bed58e0f9756929d74c9d41e27687c
2021-09-15 22:48:32 +00:00
Pierre Couillaud
f8a4e2ae3a Fix closure of record thread
Bug: 197763854
Fix: 197763854
Change-Id: I8c3e843ddac6ad77aecaca7c91f0884204145ee6
2021-09-15 17:49:00 +00:00
TreeHugger Robot
04b2f49508 Merge "Vts: thermal: Test notification with an unregistered local callback" into stage-aosp-sc-ts-dev am: c11fad6ab4
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15811944

Change-Id: I7fc94c1219ba23c5cf2d8a9661111579d883a8d5
2021-09-15 03:25:18 +00:00
TreeHugger Robot
c11fad6ab4 Merge "Vts: thermal: Test notification with an unregistered local callback" into stage-aosp-sc-ts-dev 2021-09-15 03:17:33 +00:00
David Drysdale
59e69d2563 [automerger skipped] KeyMint VTS: add missing purpose/algo am: d1d45c441e -s ours
am skip reason: Merged-In I07f706fec81d91e8eee9c0561428142559c54f12 with SHA-1 ca76a75096 is already in history

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

Change-Id: I71a118edd96a1a143d74355b84083b8cb2cbf079
2021-09-14 00:33:01 +00:00
David Drysdale
d1d45c441e KeyMint VTS: add missing purpose/algo
Test was producing an invalid set of parameters in a different way than
intended.

Bug: 197222749
Test: VtsAidlKeyMintTargetTest
Merged-In: I07f706fec81d91e8eee9c0561428142559c54f12
Change-Id: I07f706fec81d91e8eee9c0561428142559c54f12
Ignore-AOSP-First: this is a manual cross-merge
2021-09-13 08:56:05 -07:00
Wei Wang
ff6b20c221 Vts: thermal: Test notification with an unregistered local callback
Bug: 197935704
Test: /data/nativetest64/VtsHalThermalV2_0TargetTest/VtsHalThermalV2_0TargetTest
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ida76565389d021b9433bfac8153408454f2bdee9
2021-09-13 03:06:55 +00:00
Max Bires
e8e818924e [automerger skipped] Merge "AesInvalidKeySize skip 192 on SB devices" into stage-aosp-sc-ts-dev am: 89ec9c60e8 -s ours
am skip reason: Merged-In Ic0ff19d2d19d6e18dfbc0fad4b8182264f36b2f6 with SHA-1 5b7f78d43b is already in history

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

Change-Id: I237d4a5b78dcfac9700dc4665425104ca0429730
2021-09-10 17:47:32 +00:00
Max Bires
89ec9c60e8 Merge "AesInvalidKeySize skip 192 on SB devices" into stage-aosp-sc-ts-dev 2021-09-10 17:38:04 +00:00
Max Bires
3c2da9d21b AesInvalidKeySize skip 192 on SB devices
This change alters the AesInvalidKeySize test to only enforce
against StrongBox instances on devices that launch on S or later,
not previously launched devices.

Ignore-AOSP-First: Cherrypick from AOSP
Bug: 191736606
Test: Test passes on a StrongBox enabled device
Change-Id: Ic0ff19d2d19d6e18dfbc0fad4b8182264f36b2f6
Merged-In: Ic0ff19d2d19d6e18dfbc0fad4b8182264f36b2f6
2021-09-09 10:44:31 -07:00
David Drysdale
42909d9d6e Disable KeyMint -> IRemotelyProvisionedComponent test am: 11860f2984
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15787697

Change-Id: I4ccd90ddad225c6a0b3db4c39f0eca08c985dcb0
2021-09-08 23:23:30 +00:00
David Drysdale
11860f2984 Disable KeyMint -> IRemotelyProvisionedComponent test
Not required yet.

Test: VtsAidlKeyMintTargetTest
Bug: 186586864
Change-Id: Ie8fecc4ea4795d7fa4fd6bcf0e6d8013c15f50e5
Merged-In: Ie8fecc4ea4795d7fa4fd6bcf0e6d8013c15f50e5
2021-09-08 11:13:56 -07:00
TreeHugger Robot
f95af27db6 Merge "Allow getPsdsExtension to return nullptr" into stage-aosp-sc-ts-dev am: a5a3c1ece1
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15695413

Change-Id: I1dc354c33a20881b9cd732f0ac69c2b7a7414603
2021-09-03 17:33:54 +00:00
TreeHugger Robot
a5a3c1ece1 Merge "Allow getPsdsExtension to return nullptr" into stage-aosp-sc-ts-dev 2021-09-03 17:14:20 +00:00
Xusong Wang
6713a4f73f Fix use-after-free crash in VtsHalNeuralnetworksTargetTest. am: dee204e13f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15694529

Change-Id: I569c04dde3fd34564dcfc5b34d50ecad69f6d614
2021-08-28 00:23:02 +00:00
Yu-Han Yang
bca36e52fd Allow getPsdsExtension to return nullptr
Bug: 197962243
Test: Cuttlefish
Change-Id: Id80fc453c3bf89f06f8078ba0e1aca67ec8fb488
2021-08-27 16:29:41 -07:00
Xusong Wang
dee204e13f Fix use-after-free crash in VtsHalNeuralnetworksTargetTest.
Prior to this CL, the AHardwareBuffer in TestBlobAHWB is released in the
destructor, but later used (unlock) during the destruction of the
mMapping member. This CL fixed this issue by managing the lifetime of
AHardwareBuffer with SharedMemory.

Bug: 197199690
Test: VtsHalNeuralnetworksTargetTest
Change-Id: I00748aaaa1a3a3d9b3b62bedb77a655ddb6e210f
Merged-In: I00748aaaa1a3a3d9b3b62bedb77a655ddb6e210f
(cherry picked from commit d2ecde5c54)
2021-08-27 11:51:24 -07:00
Michael Butler
269219cb69 [automerger skipped] Quickly exit VtsHalNeuralnetworks*TargetTest on failure am: 8472d91b57 -s ours
am skip reason: Merged-In I0b9a14345475e432b93f92c23010a8b39712443a with SHA-1 535f8c8098 is already in history

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

Change-Id: I4bdd18318a91ece554a0d806b005b72bcf87e470
2021-08-25 22:48:14 +00:00
Michael Butler
1fba40184d Merge "Quickly exit VtsHalNeuralnetworks*TargetTest on failure" into sc-dev 2021-08-25 21:33:56 +00:00
Michael Butler
35c0eee315 Merge "Quick-fail NNAPI VTS test case if driver is dead" into sc-dev 2021-08-25 18:15:40 +00:00
Michael Butler
535f8c8098 Quickly exit VtsHalNeuralnetworks*TargetTest on failure
This change adds the AndroidTest.xml flag --gtest_break_on_failure to
cause the gtest to terminate after an error has been reached. This early
termination is important in the case where an NN HAL service crashes
mid-test, and all remaining tests would otherwise continue to run.

Bug: 197035200
Test: m vts -j
Test: vts-tradefed
Change-Id: I0b9a14345475e432b93f92c23010a8b39712443a
Merged-In: I0b9a14345475e432b93f92c23010a8b39712443a
(cherry picked from commit ac45a5d77e)
2021-08-25 18:07:45 +00:00
Michael Butler
8472d91b57 Quickly exit VtsHalNeuralnetworks*TargetTest on failure
This change adds the AndroidTest.xml flag --gtest_break_on_failure to
cause the gtest to terminate after an error has been reached. This early
termination is important in the case where an NN HAL service crashes
mid-test, and all remaining tests would otherwise continue to run.

Bug: 197035200
Test: m vts -j
Test: vts-tradefed
Change-Id: I0b9a14345475e432b93f92c23010a8b39712443a
Merged-In: I0b9a14345475e432b93f92c23010a8b39712443a
(cherry picked from commit ac45a5d77e)
2021-08-25 18:07:20 +00:00
Michael Butler
828b7259f5 Quick-fail NNAPI VTS test case if driver is dead am: 77c1b62362
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15668776

Change-Id: I5e32fe0f824961db8d50e26ff32ff91a6407106b
2021-08-24 22:31:43 +00:00
Michael Butler
77c1b62362 Quick-fail NNAPI VTS test case if driver is dead
This CL adds a check during SetUp that an NNAPI driver service is still
alive by pinging the driver service. If it is not alive, the test will
fail during SetUp. Without this quick-fail, the test case would continue
as if the driver were still active, which would result in multiple
EXPECT_* and ASSERT_* statements failing instead of a single, clear
failure message.

Bug: 197035200
Test: mma
Test: presubmit: VtsHalNeuralnetworks*TargetTest
Change-Id: Ib1b75ed20f764055699590581d5ad4e5aff4baae
Merged-In: Ib1b75ed20f764055699590581d5ad4e5aff4baae
(cherry picked from commit 9c3c8642fb)
2021-08-24 18:53:08 +00:00
Michael Butler
669dbab452 Quick-fail NNAPI VTS test case if driver is dead
This CL adds a check during SetUp that an NNAPI driver service is still
alive by pinging the driver service. If it is not alive, the test will
fail during SetUp. Without this quick-fail, the test case would continue
as if the driver were still active, which would result in multiple
EXPECT_* and ASSERT_* statements failing instead of a single, clear
failure message.

Bug: 197035200
Test: mma
Test: presubmit: VtsHalNeuralnetworks*TargetTest
Change-Id: Ib1b75ed20f764055699590581d5ad4e5aff4baae
Merged-In: Ib1b75ed20f764055699590581d5ad4e5aff4baae
(cherry picked from commit 9c3c8642fb)
2021-08-24 18:51:15 +00:00
Max Bires
f0394173a4 Merge "AesInvalidKeySize skip 192 on SB devices" into sc-dev 2021-08-20 16:15:29 +00:00
David Drysdale
ca76a75096 KeyMint VTS: add missing purpose/algo
Test was producing an invalid set of parameters in a different way than
intended.

Bug: 197222749
Test: VtsAidlKeyMintTargetTest
Merged-In: I07f706fec81d91e8eee9c0561428142559c54f12
Change-Id: I07f706fec81d91e8eee9c0561428142559c54f12
Ignore-AOSP-First: this is a manual cross-merge
2021-08-19 17:14:18 +01:00