Commit graph

41739 commits

Author SHA1 Message Date
David Gross
79324920f7 Make VtsHalNeuralnetworks* tests more binder-friendly.
Certain mutation testing -- mutateOperandLifeTimeTest and
mutateOperandInputOutputTest -- can introduce potentially very large
CONSTANT_COPY operands, which can in turn create potentially very
large Models which must be passed across binder.  To avoid overflowing
the binder buffer, we estimate the size of the mutated Model, and skip
the test if that size is too high.  The old logic recognizes that our
tests only have a single active binder transaction at a time, and
assumes that there are no other clients using the same service at the
same time, and so we should have the binder buffer to ourselves; to be
conservative, we reject any Model whose estimated size exceeds half
the binder buffer size.  Unfortunately, sometimes the binder buffer
still overflows, because it unexpectedly contains an allocation from
some other transaction: It appears that binder buffer memory
management is not serialized with respect to transactions from our
tests, and therefore depending on scheduler behavior, there may be a
sizeable allocation still in the buffer when we attempt to pass the
large Model.  To fix this problem we become even more conservative,
and instead of limiting the Model to half the binder buffer size, we
limit it to half IBinder.MAX_IPC_SIZE (the recommended transaction
size limit).  To confirm that this change does not exclude too many
tests, I checked how may times the size filter function
exceedsBinderSizeLimit is called, how many times it rejects a model
under the new logic (modelsExceedHalfMaxIPCSize), and how many times
it rejects a model under the old logic (modelsExceedHalfMaxIPCSize).

Test: VtsHalNeuralnetworksV1_0TargetTest --gtest_filter=TestGenerated/ValidationTest.Test/*-*dsp*
Test: # models =  3592, modelsExceedHalfMaxIPCSize = 212, modelsExceedHalfBufferSize = 18
Test: VtsHalNeuralnetworksV1_1TargetTest --gtest_filter=TestGenerated/ValidationTest.Test/*-*dsp*
Test: # models =  7228, modelsExceedHalfMaxIPCSize = 330, modelsExceedHalfBufferSize = 28
Test: VtsHalNeuralnetworksV1_2TargetTest --gtest_filter=TestGenerated/ValidationTest.Test/*-*dsp*
Test: # models = 52072, modelsExceedHalfMaxIPCSize = 506, modelsExceedHalfBufferSize = 28
Test: VtsHalNeuralnetworksV1_3TargetTest --gtest_filter=TestGenerated/ValidationTest.Test/*-*dsp*
Test: # models = 73342, modelsExceedHalfMaxIPCSize = 568, modelsExceedHalfBufferSize = 28
Test: VtsHalNeuralnetworksTargetTest

Bug: 227719657
Bug: 227719752
Bug: 231928847
Bug: 238777741
Bug: 242271308

Change-Id: I3f81d71ca3c0ad4c639096b1dc034a8909bc8971
2022-08-25 23:11:41 +00:00
JihCheng Chiu
10750526a6 fix segmentation fault of GraphicsComposerAidlCommandTest
When we run the VTS of GraphicsComposerAidlCommandTest, we always meet
segmentation fault issue in some test items. VTS test items crashed
when it deleted the layer or display from resource manager and try to
go next loop.
The problem is the test item try to delete the layer iterator or
display iterator in the loop, so the iterator become an invalid
iterator. Then it try to use the invalid iterator for going to next
iterator. This behavior caused segmentation fault. We use different
way to fix deleting layer and deleting display.
Delete layer: Test item always delete all layer for each display, so
              we always delete layer via get the first iterator until
              the resource manager is empty.
Delete display: Test item only delete virtual display, so we move the
                physical display to a temporary map. After delete all
                virtual display, we swap the temporary map and
                original map.

Bug: 243781450
Test: 1. test GraphicsComposerAidlCommandTest.SetLayerColorTransform
         for deleting layer
      2. test GraphicsComposerAidlCommandTest.SetOutputBuffer
         for deleting disply

Change-Id: Id467df658e78ed29fdfc039cabc119f8bf62d69d
2022-08-25 12:21:47 +00:00
Changyeon Jo
9b60ecd229 Remove color format constraints am: e6bb228dc6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2188343

Change-Id: I4b4f0fa412a88763e506acb9d5f2ed83463ba1d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 00:19:38 +00:00
Xin Li
be8ea4d3a8 Merge android12L-tests-dev@8941410
Change-Id: I39565ad6a87b2fdd6172675441e012943f5376b1
2022-08-17 22:38:00 -07:00
Changyeon Jo
e6bb228dc6 Remove color format constraints
VtsHalEvsV1_1TargetTest does not verify any behavior depending on
a frame buffer's color format.

Bug: 240685726
Test: atest VtsHalEvsV1_1TargetTest
Change-Id: I592a0a8de5fffd98178d624ee5aac4c28245d056
2022-08-17 01:03:20 +00:00
Changyeon Jo
217a6ff310 Corrects color format requirements am: bfbbba6300
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2182380

Change-Id: I8f3a94e1872975c82432a7484aeb45db5557a0c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 10:53:54 +00:00
TreeHugger Robot
f9daf08b7b Merge "Camera: Import gralloc buffers before metadata queries" into stage-aosp-tm-ts-dev 2022-08-11 18:28:15 +00:00
Changyeon Jo
bfbbba6300 Corrects color format requirements
EVS HAL implementations are expected to support any of following color
formats:
- RGBA 8888
- BGRA 8888
- NV21
- YV12
- Or, YUY2

Bug: 240685726
Test: atest VtsHalEvsV1_1TargetTest
Change-Id: I9fbbf1d29e52b24d8a53854faa58ac578094b305
2022-08-10 22:56:45 +00:00
Arthur Ishiguro
ad325a0150 Adds AndroidTest.xml for AIDL sensors VTS test
Bug: 241174366
Test: run VtsAidlHalSensorsTargetTest, and verify Android app
can receive sensor data after test runs

Change-Id: Ie372f74f3a52decce592181c7d65624f8ec03ed1
(cherry picked from commit 8492dab99d)
2022-08-04 19:59:05 +00:00
TreeHugger Robot
744c329227 Merge changes I26fd4fd2,Iaadf6e9b,I7d42f8a7,I0482376e into stage-aosp-tm-ts-dev
* changes:
  audio VTS: Update CompressedOffloadOutputStream implementation
  audio VTS: CompressedOffloadOutputStream to check the vendor API level
  audio VTS: add CompressedOffloadOutputStream test
  audio VTS: Refactor test parameter generation for I/O streams
2022-08-02 22:54:44 +00:00
Emilian Peev
dda1eb771c Camera: Import gralloc buffers before metadata queries
Raw buffer handles do not support metadata queries and need
to be imported first.
Additionally map the result buffer ids to the inflight
buffers and queue the maximum amount of inflight buffers
as advertised by Hal. Since we will be streaming a set
of buffers, use an appropriate preview size.

Bug: 237576060
Test: adb shell
/data/nativetest64/VtsAidlHalCameraProvider_TargetTest/VtsAidlHalCameraProvider_TargetTest
--gtest_filter=PerInstance/CameraAidlTest.process10BitDynamicRangeRequest/0_android_hardware_camera_provider_ICameraProvider_internal_0

Change-Id: Id854c2a8d1588a151240d1b32197dbace7e1a057
2022-07-28 16:40:35 -07:00
Arun Johnson
1e8510120f Allowing OMX.google* codecs for Devices launching with S
S AOSP did not remove the OMX.google* codecs, so this cannot be
enforced for devices launching with S

bug: 230582620
Change-Id: I25e8f827645db8e83c8c3142f5e76a912fdf7b22
(cherry picked from commit 6973e79b91)
2022-07-20 20:45:01 +00:00
Mikhail Naganov
3b167a63b2 audio VTS: Update CompressedOffloadOutputStream implementation
Do not rely on blocking behavior of 'IStreamOut.write',
instead use stream callbacks. Measure the time between
write start and drain complete. This makes the test
working reliably across different chipsets.

Bug: 219767875
Test: atest VtsHalAudioV7_0TargetTest:CompressedOffloadOutputStream/CompressedOffloadOutputStreamTest
Test: atest VtsHalAudioV7_1TargetTest:CompressedOffloadOutputStream/CompressedOffloadOutputStreamTest
Change-Id: I26fd4fd26914ed2a0b3273f4ae5512a87f9cca2c
Merged-In: I26fd4fd26914ed2a0b3273f4ae5512a87f9cca2c
(cherry picked from commit a0a5d4a9f6)
2022-07-19 19:59:02 +00:00
Mikhail Naganov
3f2e330990 audio VTS: CompressedOffloadOutputStream to check the vendor API level
Update CompressedOffloadOutputStream to fail the test if
compressed offload mix port does not support gapless offload
for a new device launching on T+.

Bug: 219767875
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Iaadf6e9b9bb7340ccaf5bc26c45fda9654190510
Merged-In: Iaadf6e9b9bb7340ccaf5bc26c45fda9654190510
(cherry picked from commit 1bc0dc4ceb)
2022-07-19 19:58:06 +00:00
Mikhail Naganov
56f1666feb audio VTS: add CompressedOffloadOutputStream test
CompressedOffloadOutputStreamTest#Mp3FormatGaplessOffload verifies
that gapless offload is supported by compressed offload
mix ports.

Bug: 219767875
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: I7d42f8a714da2923b8775445ba301938ca90b885
Merged-In: I7d42f8a714da2923b8775445ba301938ca90b885
(cherry picked from commit 158a2ddb2f)
2022-07-19 19:56:59 +00:00
Mikhail Naganov
1e703f182e audio VTS: Refactor test parameter generation for I/O streams
Two changes that are necessary to test offloaded output:

1. Pass all mix port flags specified in the config to HAL when
   opening an output stream. Previously the generator was
   omitting the 'NON_BLOCKING' flag, however it is necessary
   for offloaded output to work. This also now passes
   the 'GAPLESS_OFFLOAD' flag to the stream opening call site.

2. Provide the DeviceAddress of the attached source/sink
   device to tests that use mix ports. Some tests were looking
   up the device address anyway. Also, HAL implementations
   seem to prefer to have the actual output device instead
   of 'DEFAULT' when opening offload streams.

Bug: 219767875
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Test: atest HalAudioV7_0GeneratorTest
Change-Id: I0482376ecc7d6964f45f508a80716ffab18044b4
Merged-In: I0482376ecc7d6964f45f508a80716ffab18044b4
(cherry picked from commit 713d2c5590)
2022-07-19 19:55:37 +00:00
Les Lee
73e015a761 Merge "wifi: create interface before running hostapd vts" into stage-aosp-tm-ts-dev 2022-07-12 03:04:29 +00:00
Gabriel Biren
dd789ad9dc Update supplicant AIDL VTS tests to use the new
version of stopWifiFramework().

Bug: 234853504
Test: atest VtsHalWifiSupplicantStaIfaceTargetTest \
            VtsHalWifiSupplicantStaNetworkTargetTest \
	    VtsHalWifiSupplicantP2pIfaceTargetTest # AIDL service
Change-Id: I9e06f025a5b6b44d6a6caf8362c64bd5a546e1ac
(cherry picked from commit 99bb148510)
Merged-In: I9e06f025a5b6b44d6a6caf8362c64bd5a546e1ac
2022-07-07 18:28:55 +00:00
Les Lee
912469a468 wifi: create interface before running hostapd vts
Adding to support creating interface in hostapd vts.

cp from aosp/2116501

Bug: 230008250
Test: 1. setprop ro.vendor.wifi.sap.interface swlan0
2. vts-tradefed run commandAndExit vts
--skip-all-system-status-check --primary-abi-only
--skip-preconditions --module VtsHalWifiHostapdV1_2Target
-l INFO

Change-Id: I483671cb01b68bc6f5ac4840c61b10f4c31f10e4
Merged-In: I483671cb01b68bc6f5ac4840c61b10f4c31f10e4
2022-07-07 15:52:59 +00:00
Gregory Montoir
9fc37c0d3c Merge "Fix VTS PlaybackDataFlowWithTsVideoFilterTest sometimes failed." into android12-tests-dev am: 14ecb1c6a1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2141155

Change-Id: I1e3a07087b606a28c98bd4f61f84d74d99d40931
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-04 07:45:50 +00:00
Gregory Montoir
14ecb1c6a1 Merge "Fix VTS PlaybackDataFlowWithTsVideoFilterTest sometimes failed." into android12-tests-dev 2022-07-04 07:30:16 +00:00
Les Lee
a7ce9003ed resolve merge conflicts of 155f20a6cd to android12-tests-dev am: 559df942c8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2141153

Change-Id: Id18ad120af3812f613b9b14888b96e4e90b50cfc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 04:48:29 +00:00
mike liao
a230f3af3d Fix VTS PlaybackDataFlowWithTsVideoFilterTest sometimes failed.
[Description]
If filter is started after playback thread, sometimes
filter cannot get data correctly because of timing issue.

Start playback thread after filter is started
so that filter will always get data correctly.

Bug: 235185563
Test:
1. Testcase pass

Change-Id: I97c38dab1ff81c31b4bb48c8015b626b3a6325ed
2022-06-30 16:17:04 +08:00
Les Lee
559df942c8 resolve merge conflicts of 155f20a6cd to android12-tests-dev
Test: I solemnly swear I tested this conflict resolution.
Bug: 237593038
Change-Id: I6cce0869b6cce7b5e41b71c67991061e226bb305
2022-06-30 05:37:15 +00:00
Treehugger Robot
155f20a6cd Merge "wifi: create interface before running hostapd vts" into android11-tests-dev 2022-06-30 00:18:59 +00:00
Gabriel Biren
c33f1282d8 In supplicant VTS test setup, make sure that the
wifi hal is stopped before starting wifi.

Bug: 234853504
Test: atest VtsHalWifiSupplicantV1_0TargetTest # HIDL service
Change-Id: I413c3803a6607a72cc3aa8a5fa208551be1b1032
(cherry picked from commit bfe60cda4d)
Merged-In: I413c3803a6607a72cc3aa8a5fa208551be1b1032
2022-06-29 16:41:51 +00:00
Treehugger Robot
8656a87385 Merge "In supplicant VTS test setup, make sure that the wifi hal is stopped before starting wifi." into android12-tests-dev am: e6c80028af
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2128497

Change-Id: I9e39d4ed48c0dc653a9ee312021e6e80e351fe00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 03:08:47 +00:00
Treehugger Robot
e6c80028af Merge "In supplicant VTS test setup, make sure that the wifi hal is stopped before starting wifi." into android12-tests-dev 2022-06-29 02:56:21 +00:00
Treehugger Robot
b22f548965 [automerger skipped] [conflict] Merge "vts: fix some tunerhal vts fail without frontend device" into android11-tests-dev am: 6807799ad9 am: 88b7c10cd8 -s ours
am skip reason: skipped by user hgchen

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

Change-Id: I27bdf1d5450ba0599e235fa292ef18ad4bcb0ed5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 03:00:47 +00:00
Treehugger Robot
88b7c10cd8 [conflict] Merge "vts: fix some tunerhal vts fail without frontend device" into android11-tests-dev am: 6807799ad9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2003730

Change-Id: I5993b88b7d0831c9b95adfc50ebe501215f40498
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 00:03:16 +00:00
TreeHugger Robot
a71fffd754 Merge "Fix VTS PlaybackDataFlowWithTsVideoFilterTest sometimes failed." into tm-dev 2022-06-21 22:55:09 +00:00
David Drysdale
df427391cd Merge "KeyMint VTS: cope with ATTEST_KEY +/- SIGN" into tm-dev 2022-06-20 06:29:11 +00:00
Silver Chen
fbbb209b63 Fix VTS PlaybackDataFlowWithTsVideoFilterTest sometimes failed.
[Description]
If filter is started after playback thread, sometimes
filter cannot get data correctly because of timing issue.

Start playback thread after filter is started
so that filter will always get data correctly.

Bug: 235185563
Test:
1. Testcase pass

Change-Id: I97c38dab1ff81c31b4bb48c8015b626b3a6325ed
(cherry picked from commit 8ab7fd8b21)
2022-06-20 01:13:57 +00:00
Treehugger Robot
6807799ad9 Merge "vts: fix some tunerhal vts fail without frontend device" into android11-tests-dev 2022-06-18 01:05:53 +00:00
Shawn Willden
e5364d7617 Read VSR level from correct property.
Bug: 235424890
Test: VtsHalKeymasterV4_0TargetTest & VtsAidlKeyMintTargetTest
Ignore-AOSP-First: Cherry-pick of aosp/2128833
Change-Id: I39109c097d129124097a303c3f108d015cb367e3
Merged-In: I39109c097d129124097a303c3f108d015cb367e3
2022-06-17 10:49:46 +09:00
Gabriel Biren
9ea484ffc0 In supplicant VTS test setup, make sure that the
wifi hal is stopped before starting wifi.

Bug: 234853504
Test: atest VtsHalWifiSupplicantV1_0TargetTest # HIDL service
Change-Id: I413c3803a6607a72cc3aa8a5fa208551be1b1032
(cherry picked from commit bfe60cda4d)
2022-06-16 18:01:15 +00:00
David Drysdale
3803a10f9b [conflict] Merge "KeyMint VTS: cope with ATTEST_KEY +/- SIGN" into android12-tests-dev am: bbecb4563f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2117528

Change-Id: I7d5a6e121c3dc1a73382713ef4af9d6ae08ae887
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 10:07:17 +00:00
David Drysdale
bbecb4563f Merge "KeyMint VTS: cope with ATTEST_KEY +/- SIGN" into android12-tests-dev 2022-06-16 09:46:37 +00:00
Roshan Pius
987a7e3f30 Merge "uwb(vts): Close HAL at end of each test" into tm-dev 2022-06-13 17:28:18 +00:00
Arthur Ishiguro
6b48d121d9 Adds missing AIDL HAL SensorStatus conversion logic
Bug: 235629868
Test: Compile
Change-Id: Ice2df3935f2bcab9e9612ebd3fdacc57ea6f8dbc
2022-06-13 16:06:34 +00:00
David Drysdale
cdfb961585 KeyMint VTS: cope with ATTEST_KEY +/- SIGN
This change syncs aosp/master with the change in http://aosp/2117528,
allowing devices that launched with the (incorrect) version of
ATTEST_KEY VTS tests in Android S to continue to pass the test.

Bug: 197096139
Bug: 230074335
Test: VtsAidlKeyMintTargetTest
Change-Id: If88642e238e64ca9ec80303a4a72f7171c63464f
Merged-In: If88642e238e64ca9ec80303a4a72f7171c63464f
2022-06-13 12:06:41 +01:00
Roshan Pius
3ba0e635e1 uwb(vts): Close HAL at end of each test
Bug: 235558748
Test: atest VtsHalUwbTargetTest
Change-Id: I5361baab1f9204052e0f625b3c17242fbfe66190
2022-06-10 20:03:18 +00:00
TreeHugger Robot
f828bd264c Merge "Support AIDL IAllocator for direct channel tests" into tm-dev 2022-06-10 15:22:37 +00:00
TreeHugger Robot
8c1586bc4f Merge "Add a README for Remote Key Provisioning." into tm-dev 2022-06-10 13:29:11 +00:00
Max Bires
c08e808a78 Add a README for Remote Key Provisioning.
This document goes a little more in depth on the motivating factors and
background mechanisms that occur with RKP, that are not appropriate for
direct inclusion in the HAL docs in the .aidl files.

Bug: 234159998
Test: Readable
Change-Id: I141fb098c536a5468b1113af64dcf6185ea7ae9f
2022-06-10 04:52:27 -07:00
Brian Duddie
c325337352 Support AIDL IAllocator for direct channel tests
Bug: 234673324
Test: atest VtsHalSensorsV2_1TargetTest -> DirectChannelGralloc pass on
      device using AIDL IAllocator
Change-Id: I169d3bc863f7e588f42e408f151064066b9960cc
2022-06-10 02:09:11 +00:00
TreeHugger Robot
079b3790ac Merge "Minor fixes on VTS tests" into tm-dev 2022-06-10 01:15:37 +00:00
Yu-Han Yang
dcf3c519fc Minor fixes on VTS tests
- call startSvStatus()/startNmea() before calling start(). This will
  avoid missing the first SvStatus
- in TestGnssSvInfoFieldsTest, avoid calling list::back() if the list is
  empty.

Bug: 235062809
Test: atest VtsHalGnssTargetTest
Change-Id: I612d42e23085dbb0b32da328869bfd443ee66362
2022-06-09 23:01:28 +00:00
Treehugger Robot
94755b9007 Merge changes from topic "226452499" into android12-tests-dev am: 970cccb939
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2099117

Change-Id: I00253cc0bcd6158dc24de0f183ca07f711b1db00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 20:31:52 +00:00
Karthik Ramakrishnan
5adad834a9 [automerger skipped] VtsHalBluetoothV1_0: Turn off/on BT for all users am: 94a3a178aa -s ours
am skip reason: Merged-In Ica83f4959a87b8fb498b535572738e4e790c6ddb with SHA-1 0dc66a2c69 is already in history

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

Change-Id: I1d91810834810314b06dfb14db753af520dac0f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 20:31:50 +00:00