Commit graph

32486 commits

Author SHA1 Message Date
Karthik Ramakrishnan
f26e49bf49 VtsHalBluetoothV1_0: Turn off/on BT for all users am: 0dc66a2c69
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16810781

Change-Id: I96916e1b2de664c91ef3098bbf732577d4ffc8ab
2022-02-18 01:51:47 +00:00
Yuchen He
d20063ad90 Merge fix to AOSP: Report default location when location is not available in /dev/gnss0
Change-Id: I3ce672aa1a7a39c256dd1396658859c205b61399
Merged-In: I3ce672aa1a7a39c256dd1396658859c205b61399
Test: atest VtsHalGnssTargetTest
Bug: 197579774
2022-02-15 16:19:12 -08:00
Yuchen He
65569272ad Read GNSS measurement from device file when available
Test: atest CtsLocationGnssTestCases GtsLocationTestCases on CF
Bug: 190757198
Change-Id: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
Merged-In: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
2022-02-15 16:18:34 -08:00
Yuchen He
31493d1dc4 Add raw measurement parser
Test: manual test (data cross verified with GnssLogger app)
Bug: 190757198

Change-Id: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
Merged-In: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
2022-02-15 16:18:01 -08:00
George Burgess IV
3f467bd10f fix potential use-after-frees of stack memory
`devname_value` is a local variable; if `property_get` succeeds, we'll
return a pointer to it. Returning a `std::string` instead sidesteps this
problem.

Bug: 190757198
Test: TreeHugger
Change-Id: If9ca733dd21128706f2a9f62e8460b1286631aa5
Merged-In: If9ca733dd21128706f2a9f62e8460b1286631aa5
2022-02-15 16:17:22 -08:00
Yuchen He
cb8474d7b6 Refactor and reuse some read device file logic
Add skeleton on HAL for Gnss raw measurement injection

Bug: 190757198
Test: manual test
Merged-In: I9b58043d5ed321aa71ff4f23031df251ae89c407
Change-Id: I9b58043d5ed321aa71ff4f23031df251ae89c407
2022-02-15 16:16:47 -08:00
Karthik Ramakrishnan
0dc66a2c69 VtsHalBluetoothV1_0: Turn off/on BT for all users
Using the current user for the command to disable
BT before the test and enable after the test.
This ensures the proper command is used for
devices running in secondary user

Bug: 202873250
Test: run vts -m VtsHalBluetoothV1_0TargetTest
          -t PerInstance/BluetoothHidlTest#InitializeAndClose/0_default
Change-Id: Ica83f4959a87b8fb498b535572738e4e790c6ddb
2022-02-07 17:37:39 -08:00
Mikhail Naganov
8fc5a4fb88 VTSHalAudio: Increase test timeout for V6 and V7 am: 8a76d40f99
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16712045

Change-Id: Ie29539a4b5303ed60189dc7f677b3ba9683ae252
2022-01-25 19:32:22 +00:00
Mikhail Naganov
8a76d40f99 VTSHalAudio: Increase test timeout for V6 and V7
V6 and V7 use actual device audio configuration
when testing I/O streams functionality. On low-end
TV devices this can cause the test to run for
significant time due to lower CPU speed and the
amount of multichannel configurations.

From testing on real devices, the timeout value
of 5 minutes seems to be adequate.

Bug: 211945822
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: Ie233e014f9f3650f58319c4d5f5a836cfdea87ba
(cherry picked from commit 57633e5a78)
Merged-In: Ie233e014f9f3650f58319c4d5f5a836cfdea87ba
2022-01-25 01:43:38 +00:00
Shuzhen Wang
553abe8b29 Camera: VTS: Remove GRF MultiCamera for Android 12 am: 2b2846855f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16672946

Change-Id: I1c00a1a0b5f46cdeb3676fd446a3a0a2fe23f32b
2022-01-21 16:45:24 +00:00
Shuzhen Wang
d6e34f7aa1 Camera: VTS: Remove GRF MultiCamera for Android 12
Certain OEMs' new S launches with vendor freeze cannot implement
multi-camera API.

Bug: 189053514
Bug: 211709637
Change-Id: I71b46f1e8343a5848cbe3fa55bbcd427c87b05dd
(cherry picked from commit 30a198ded0)
(cherry picked from commit 2b2846855f)
2022-01-20 16:43:39 +00:00
Shuzhen Wang
2b2846855f Camera: VTS: Remove GRF MultiCamera for Android 12
Certain OEMs' new S launches with vendor freeze cannot implement
multi-camera API.

Bug: 189053514
Bug: 211709637
Change-Id: I71b46f1e8343a5848cbe3fa55bbcd427c87b05dd
(cherry picked from commit 30a198ded0)
2022-01-19 19:28:45 +00:00
Kalesh Singh
4847855f2b Allow atrace hal tracefs access
Add atrace hal to the readtracefs group

Bug: 214591300
Test: adb shell perfetto (Use config with atrace_categories)
Change-Id: Id9e06f88539b59480d5cf57a4ba67cef4676c1d5
Merged-In: Id9e06f88539b59480d5cf57a4ba67cef4676c1d5
2022-01-14 23:43:08 +00:00
Kui1 Wu
df417d2808 fix VtsHalGraphicsComposerV2_2TargetTest timeout failed
run VtsHalGraphicsComposerV2_2TargetTest will timeout failed
when there is dual displays. use `std::unordered_set` Display type,
`std::vector<Display>(mDisplays.begin(), mDisplays.end())` as
getDisplays return value, mDisplays elements order may not be
same as the order of hotplug events during boot matters.
We should store `mDisplays` as `std::vector`, since the order of
hotplug events during boot matters in determining the primary display.

Bug: 209409863
Test: run vts -m VtsHalGraphicsComposerV2_2TargetTest

Signed-off-by: Kui1 Wu <wukui1@xiaomi.com>
Change-Id: I628ad593640f28fb8a916822a91ac2c578cc299d
2022-01-05 21:18:51 +00:00
Seongho Kim
41a7f94f87 Cherry pick "Gate gsm/cdma radio feature only for emergency dial" sc-v2-dev
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1908681

Bug: 207920538
Change-Id: I4eb369495d27e697679ecb3d4381f0b3e0cef758
Merged-In: I388bc51e58b5680b5b5c806d88a338822af0c8a7
2021-12-15 22:41:41 +00:00
TreeHugger Robot
e1ed5c6309 Merge "audio VTS: Consider only attached devices for stream tests" into sc-v2-dev 2021-12-03 08:41:03 +00:00
David Drysdale
46d62b92fb Merge "KeyMint VTS: don't combine ATTEST_KEY with SIGN" into sc-v2-dev 2021-11-30 09:30:01 +00:00
David Drysdale
92ffdd5b27 Merge changes from topic "merge-unique-id-tests" into sc-v2-dev
* changes:
  KeyMint VTS: extra unique ID test
  KeyMint VTS: check INCLUDE_UNIQUE_ID works
2021-11-30 09:29:22 +00:00
David Drysdale
0ac2a4e5c3 KeyMint VTS: don't combine ATTEST_KEY with SIGN
Update the VTS tests so that attestation keys are not created with
another purpose.

Bug: 197096139
Test: VtsAidlKeyMintTargetTest
Merged-In: Ib6e4ad98cbe5c3015138854679b11fa0e683ade9
Change-Id: Ib6e4ad98cbe5c3015138854679b11fa0e683ade9
Ignore-AOSP-First: cross-merge from aosp/master
2021-11-29 14:13:56 +00:00
Mikhail Naganov
6442deefc3 audio VTS: Consider only attached devices for stream tests
V6 and V7 use the audio policy configuration file for generating
the set of test profiles. The generator must only take into
account profiles of mix ports that are routed to device ports of
attached devices. Otherwise the HAL can rightfully refuse
to create a stream for the profile when the device isn't attached.

Bug: 205808571
Test: atest HalAudioV6_0GeneratorTest
Test: atest HalAudioV7_0GeneratorTest
Test: atest VtsHalAudioV6_0TargetTest
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: I798f978c1c0bc32831c20e4b08338b462d8eea16
Merged-In: I798f978c1c0bc32831c20e4b08338b462d8eea16
2021-11-24 19:08:03 +00:00
Mikhail Naganov
79ab13a1a6 audio: Fix handling of dynamic profiles in VtsHalAudioV7_0TargetTest
The profiles generator wasn't loading correctly from the Audio
Policy Manager config file profiles with unpopulated attributes,
which is typical for dynamic profiles.

Bug: 204314749
Test: atest HalAudioV7_0GeneratorTest
Change-Id: I514a4e03da165cacb5dbaaa16470130895681484
Merged-In: I514a4e03da165cacb5dbaaa16470130895681484
2021-11-12 02:29:25 +00:00
Jayachandran C
4b18fff621 Add some delay for SIM power up and down delay for setSimCardPower_1_6 API
Bug: 203031664
Test: VTS
Change-Id: I68e7352ed95a8487dee291de493c78cf1491d569
Merged-In: I68e7352ed95a8487dee291de493c78cf1491d569
2021-11-10 19:46:51 +00:00
David Drysdale
e26fab78ed KeyMint VTS: extra unique ID test
Test that specifying RESET_SINCE_ID_ROTATION results in a different
unique ID value.

Test: VtsAidlKeyMintTargetTest
Bug: 202487002
Change-Id: I2aed96514bf9e4802f0ef756f880cac79fa09554
2021-11-10 15:02:59 +00:00
David Drysdale
2f361c1571 KeyMint VTS: check INCLUDE_UNIQUE_ID works
Bug: 202487002
Test: atest VtsAidlKeyMintTargetTest (on CF, O6)
Merged-In: I8bc674b47549aa1133f816c510289774db752e04
Change-Id: I8bc674b47549aa1133f816c510289774db752e04
Ignore-AOSP-First: already in aosp/master
2021-11-10 15:02:03 +00:00
Shuzhen Wang
5ee43a6d24 Camera: VTS for test_pattern tag requirement for physical camera
Ensure that if TEST_PATTERN_MODE is listed in physical request keys, the
corresponding physical camera must support the privacy related test
pattern modes.

Test: Run Camera VTS with Cuttlefish emulator
Bug: 204108650
Change-Id: I8f378ab642c7c010a2ba73a8e89e65c91ba780eb
2021-11-03 22:56:16 +00:00
TreeHugger Robot
3c2ebae81c Merge "VtsHalCameraProviderV2_4TargetTest: Override rotate&crop" into sc-v2-dev 2021-11-02 19:06:21 +00:00
Shuzhen Wang
dc6da704ed Camera: Adjust VTS test to relax multi-camera requirement
The multi-camera Grf requirement is now only applicable to rear facing
camera.

Test: Run test on Pixel devices
Bug: 204252005
Change-Id: Idb7735eebdc104f6ee6a5946b50c11aea809eb85
2021-10-29 11:24:03 -07:00
Emilian Peev
06ec563f55 VtsHalCameraProviderV2_4TargetTest: Override rotate&crop
As per documentation the default auto rotate&crop mode must
be overriden before passing the capture request back to the
camera provider.

Bug: 204407427
Test:
atest
VtsHalCameraProviderV2_4TargetTest:PerInstance/CameraHidlTest#processCaptureRequestPreview/0_internal_0
atest
VtsHalCameraProviderV2_4TargetTest:PerInstance/CameraHidlTest#processMultiCaptureRequestPreview/0_internal_0
atest
VtsHalCameraProviderV2_4TargetTest:PerInstance/CameraHidlTest#processCaptureRequestBurstISO/0_internal_0
atest
VtsHalCameraProviderV2_4TargetTest:PerInstance/CameraHidlTest#flushPreviewRequest/0_internal_0

Change-Id: I1e1d387a04add8be9a281fcc3f78a867990248b3
2021-10-28 17:49:19 -07:00
Jayachandran Chinnakkannu
3958c69775 Merge "Do not assert CardState::PRESENT on sim power down" into sc-v2-dev 2021-10-28 00:54:41 +00:00
TreeHugger Robot
fe342525b2 Merge "Using a manifest fragment" into sc-v2-dev 2021-10-27 04:04:59 +00:00
Yomna Nasser
cc96134697 Merge "VTS fix for getAllowedNetworkTypesBitmap and setAllowedNetworkTypesBitmap" into sc-v2-dev 2021-10-26 17:07:42 +00:00
TreeHugger Robot
f8183c2914 Merge "Parse user flags as flags instead of enum." into sc-v2-dev 2021-10-25 20:33:59 +00:00
Yu Shan
5c0ec3f1de Parse user flags as flags instead of enum.
The flags field in UserInfo is a int32_t that contains multiple
UserFlags 'or'ed together. We should not parse it as enum.

Test: atest android.hardware.automotive.vehicle@2.0-utils-unit-tests
Bug: 202520478
Change-Id: Ie7e81a8a5f39f6070e35f2e77bce88a211fd526b
2021-10-25 12:36:27 -07:00
TreeHugger Robot
7630dd9f4f Merge "Update VtsHalEvsV1_1TargetTest" into sc-v2-dev 2021-10-24 15:11:09 +00:00
Jordan Liu
f7069c658c Do not assert CardState::PRESENT on sim power down
Bug: 203031664
Test: manual
Change-Id: I6c9cbad7cd4fd19eb0b77c55ff37298b97f32050
2021-10-21 20:27:39 +00:00
Changyeon Jo
9b3c9adb71 Using a manifest fragment
Fix: 203414344
Test: m -j and start CAN services
Change-Id: I423ab883d959f234a52adf680fae91bf264bea8b
2021-10-21 09:12:47 -07:00
Yomna Nasser
849d924d6d VTS fix for getAllowedNetworkTypesBitmap and setAllowedNetworkTypesBitmap
Fix VTS for getAllowedNetworkTypesBitmap and
setAllowedNetworkTypesBitmap, which should not rely on
getRadioHalCapabilities.

Bug: b/199809900
Test: atest VtsHalRadioV1_6TargetTest
Change-Id: I0b50e7e6c0d406a62f7a1e2ea8ac9bc3a71d8aeb
Merged-In: I0b50e7e6c0d406a62f7a1e2ea8ac9bc3a71d8aeb
2021-10-21 15:05:11 +00:00
Marin Shalamanov
3ccc2de9c4 Revert "VTS: Test that configs in a group differ only by vsync period"
This reverts commit 6f36dd6e31.

Differing only by vsync period was not a requirement on Android R, and
it shouldn't be added after-the-fact to an existing HAL version.

There are devices on the market that switch seamlessly between configs
that differ in resolution/dpi, and therefore have those configs in a
common group.

Bug: 200184776
Merged-In: Id0bfc67e55d5139fddb2b359cabafd9281c33734
Change-Id: Ib6e6a8c5f45c9829ea30d031e1cfa9a4fb775535
2021-10-20 18:58:45 +00:00
Les Lee
b3fba1d7c3 Merge "wifi(vts): Precondition AP tests on existence of hostapd HAL" into sc-v2-dev 2021-10-20 02:04:49 +00:00
Sunil Ravi
b828beb046 Update the p2p device interface name am: 6adbab13ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16087108

Change-Id: I29de6a4bf01101cb32d2aafd8a4dce8fa5f398c0
2021-10-20 01:34:48 +00:00
Sunil Ravi
6adbab13ee Update the p2p device interface name
In some implementations P2P device interface is created under
primary interface(wlan0 by default). In those implementations
p2p device name is predefined in system property wifi.direct.interface.
And the interface is created by supplicant with primary interface as
the parent interface. The naming of p2p device interface is
p2p-dev-<parent interface> ("p2p-dev-wlan0").

With STA+STA feature, wlan0 interface gets deleted in certain scenarios
and wlan1 becomes the active interface. In such scenarios P2P fails to
create the interface as parent interface wlan0 is deleted.

To fix the issue update the p2p device interface from system property
based on the current active wlan interface. ie First get the p2p parent
interface name from p2p device interface name set in property.
Check if the parent interface derived from p2p device interface name is
the current active interface. If not, get the current active interface
and update the name as p2p-dev-<ifname> ("p2p-dev-wlan1").
This helps HIDL/supplicant to get an active wlan interface from p2p
device interface name and succeed in creating the p2p interface under the
active interface.

Bug: 203434193

Test: Manual - Tested STA+STA which ended up deleting wlan0 interface.
      Then ran p2p tests and confirmed that p2p scan and connection
      works.
Change-Id: I522cec02a662c057e21d434f3ed98c7e7a4ca8f0
Merged-In: I522cec02a662c057e21d434f3ed98c7e7a4ca8f0
(cherry picked from commit 7f2822aff7)
2021-10-19 18:14:26 +00:00
TreeHugger Robot
c69d81e5f3 Merge "wifi: extending framework restart waiting time" into sc-v2-dev 2021-10-19 17:06:10 +00:00
Changyeon Jo
02499d65fc Update VtsHalEvsV1_1TargetTest
This CL makes following changes to fix VTS failures reported on Seahawk
reference platform.

* Correct the definition of RawStreamConfig and its size constant.
* Update all test cases to use a stream configuration reported by the
  target camera device.
* Update CameraStreamExternalBuffering test cases to take internally
  allocated buffers into account.

Bug: 192460757
Bug: 199626993
Test: atest VtsHalEvsV1_1TargetTest
Change-Id: Ia03775ae543617ba5057e91bbbb5aed9221d1a30
2021-10-18 21:24:24 -07:00
Jimmy Chen
01c2259e19 wifi: extending framework restart waiting time
10s is not enough for low-end devices, extending waiting time to
avoid false alarm for low-end devices.

Bug: 201184673
Test: atest VtsHalWifiSupplicantP2pV1_4TargetTest
Change-Id: I9baa53a462b97738e6dc471cf06c2b9230b92c1c
(cherry picked from commit ef3f77f831)
2021-10-18 03:08:50 +00:00
Roshan Pius
9c4930dfd9 wifi: remove disable_framework option to pass the stopWifiFramework procedure
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: 201266536
Bug: 201184673
Test: atest --iterations 10 \
    VtsHalWifiSupplicantV1_0TargetTest \
    VtsHalWifiSupplicantV1_1TargetTest \
    VtsHalWifiSupplicantV1_2TargetTest \
    VtsHalWifiSupplicantV1_3TargetTest \
    VtsHalWifiSupplicantV1_4TargetTest \
    VtsHalWifiSupplicantP2pV1_0TargetTest \
    VtsHalWifiSupplicantP2pV1_2TargetTest \
    VtsHalWifiSupplicantP2pV1_4TargetTest
Change-Id: Ia4a38c2e942681f323cf76941713c429e14870cc
(cherry picked from commit 3a5858a711)
2021-10-18 03:08:32 +00:00
Roshan Pius
82b41e6af9 wifi(vts): Precondition AP tests on existence of hostapd HAL
cp: aosp/1428863 to sc-v2-dev branch as b/202788915 mentioned

This used to be present on the old host side VTS tests, port the feature to
target side since host side VTS tests are deprecated.

Also,
i) Added a separate test: VtsHalWifiV1_4TargetTest to test the wifi
chip methods. Putting them in VtsHalWifiApV1_4TargetTest will prevent
these from running on devices without AP feature.
ii) Ensured all the non-NAN, non-RTT tests disable framework for
testing. NAN/RTT tests uses framework to check if the corresponding
package manager feature exists.

Bug: 166529516
Bug: 202788915
Test: atest \
VtsHalWifiApV1_0TargetTest \
VtsHalWifiApV1_4TargetTest \
VtsHalWifiV1_0TargetTest \
VtsHalWifiV1_4TargetTest

Change-Id: I05aab6992277601633a0f926a8262c4c27402e93
Merged-In: I05aab6992277601633a0f926a8262c4c27402e93
2021-10-15 15:22:49 +08:00
Keith Mok
0e6752c900 Fix fuzzer error for FormatConvertFuzzer
The stride was not correct for the fuzzer.
And the FormatConvert have some restructions
on the width and height.

- YUYV
  width and height must be even nmber
- YU12
  width mush be divisible by 16
  height must be even number

Bug: 202641239
Test: FormatConvertFuzzer_copyYV12toBGR32
Change-Id: I45ebea3e22854bdad037abb742fbdbe364b19ec5
2021-10-13 16:09:50 +00:00
Jack Nudelman
e0f7bd7197 Accept NONE as a response for setDataThrottling during VTS.
Bug: 199809900
Test: b/199809900
Change-Id: I3b71401c28eb2f06c020f549a28ef5970282c855
2021-10-11 14:05:48 -07:00
TreeHugger Robot
e951b8cf0b Merge "WIFI: Add log to debug onSubsystemRestart" into sc-qpr1-dev am: 8169c932e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15988967

Change-Id: I8798d3ad725e8fe294ce835a3a185351117f701c
2021-10-09 23:21:41 +00:00
TreeHugger Robot
8169c932e6 Merge "WIFI: Add log to debug onSubsystemRestart" into sc-qpr1-dev 2021-10-09 23:08:21 +00:00