From 4a9941d7a688bd35d936f10860f1024f4c82b9f9 Mon Sep 17 00:00:00 2001 From: junchao yuan Date: Tue, 1 Mar 2022 16:08:37 +0800 Subject: [PATCH 01/34] vts: fix some tunerhal vts fail without frontend device PD#OTT-27646 bug:222020221 Problem: some tunerhal vts fail without frontend device Solution: fix some logic errors without frontend device verify: ohm Change-Id: I611a81400eb21bb52d59281f2266f3a95e015de9 Signed-off-by: junchao yuan --- tv/tuner/1.0/vts/functional/FrontendTests.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tv/tuner/1.0/vts/functional/FrontendTests.cpp b/tv/tuner/1.0/vts/functional/FrontendTests.cpp index 5265f2d790..22a4bf97a3 100644 --- a/tv/tuner/1.0/vts/functional/FrontendTests.cpp +++ b/tv/tuner/1.0/vts/functional/FrontendTests.cpp @@ -418,16 +418,18 @@ AssertionResult FrontendTests::closeFrontend() { void FrontendTests::getFrontendIdByType(FrontendType feType, uint32_t& feId) { ASSERT_TRUE(getFrontendIds()); - ASSERT_TRUE(mFeIds.size() > 0); - for (size_t i = 0; i < mFeIds.size(); i++) { - ASSERT_TRUE(getFrontendInfo(mFeIds[i])); - if (mFrontendInfo.type != feType) { - continue; + if (mFeIds.size() > 0) { + for (size_t i = 0; i < mFeIds.size(); i++) { + ASSERT_TRUE(getFrontendInfo(mFeIds[i])); + if (mFrontendInfo.type != feType) { + continue; + } + feId = mFeIds[i]; + return; } - feId = mFeIds[i]; - return; + } else { + feId = INVALID_ID; } - feId = INVALID_ID; } void FrontendTests::tuneTest(FrontendConfig frontendConf) { From 3664aad2ac7c97bfa2f888b8ac6a443d2df740b3 Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Thu, 21 Apr 2022 18:52:32 +0000 Subject: [PATCH 02/34] VTSHalAudio: Increase test timeout for V6, V7.x to 10 minutes TV devices can list a lot of configurations and have low performing CPUs which causes the test to run for a significant amount of time. From b/229824670 it seems that 10 minutes should be enough. Bug: 229824670 Test: atest VtsHalAudioV6_0TargetTest Test: atest VtsHalAudioV7_0TargetTest Change-Id: Id7fa8eaa98bf2437fd1f676b9e5a7290df260fbd (cherry picked from commit 0b9b03eb710e7bcf4b2b2cf4489777e3c321b95f) --- .../all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml | 2 +- .../all-versions/vts/functional/VtsHalAudioV7_0TargetTest.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/core/all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml b/audio/core/all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml index ae571258dc..1e73f8a01a 100644 --- a/audio/core/all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml +++ b/audio/core/all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml @@ -34,6 +34,6 @@ diff --git a/audio/core/all-versions/vts/functional/VtsHalAudioV7_0TargetTest.xml b/audio/core/all-versions/vts/functional/VtsHalAudioV7_0TargetTest.xml index 55dbaf1e78..f0e26958b9 100644 --- a/audio/core/all-versions/vts/functional/VtsHalAudioV7_0TargetTest.xml +++ b/audio/core/all-versions/vts/functional/VtsHalAudioV7_0TargetTest.xml @@ -34,6 +34,6 @@ From 2f7d57651af8afdb30af9ed2d732aa3a482522ef Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Thu, 21 Apr 2022 18:52:32 +0000 Subject: [PATCH 03/34] VTSHalAudio: Increase test timeout for V6 to 10 minutes TV devices can list a lot of configurations and have low performing CPUs which causes the test to run for a significant amount of time. From b/229824670 it seems that 10 minutes should be enough. Bug: 229824670 Test: atest VtsHalAudioV6_0TargetTest Change-Id: Id7fa8eaa98bf2437fd1f676b9e5a7290df260fbd (cherry picked from commit 0b9b03eb710e7bcf4b2b2cf4489777e3c321b95f) --- .../all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/core/all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml b/audio/core/all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml index f035bafa29..1e73f8a01a 100644 --- a/audio/core/all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml +++ b/audio/core/all-versions/vts/functional/VtsHalAudioV6_0TargetTest.xml @@ -34,5 +34,6 @@ From afff8511105e0a23ae7f50e5e70b03d7b2743f7b Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Wed, 11 May 2022 22:12:00 +0000 Subject: [PATCH 04/34] Update VtsHalAudioPolicyV1_0TargetTest to match XML changes There was a proposal for a backward-compatible XML schema change (https://android-review.googlesource.com/q/I1bf31c6bf6c57c9b79f0d5751601aa77780f1f80) which had a mistake. Express the change correctly to match the implementation. Bug: 231929160 Test: atest VtsHalAudioPolicyV1_0TargetTest Change-Id: Id581e290740a3c00ba3719a339c9bc47d730f35c Merged-In: Id581e290740a3c00ba3719a339c9bc47d730f35c (cherry picked from commit e01186e117bc1a609543e364071a9449fadac1d9) --- audio/policy/1.0/xml/api/current.txt | 6 ++++-- .../1.0/xml/audio_policy_engine_configuration.xsd | 13 ++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/audio/policy/1.0/xml/api/current.txt b/audio/policy/1.0/xml/api/current.txt index 29a9cd402d..0b77d45539 100644 --- a/audio/policy/1.0/xml/api/current.txt +++ b/audio/policy/1.0/xml/api/current.txt @@ -232,10 +232,12 @@ package audio.policy.V1_0 { public class ValueType { ctor public ValueType(); + method public String getAndroid_type(); method public String getLiteral(); - method public int getNumerical(); + method public long getNumerical(); + method public void setAndroid_type(String); method public void setLiteral(String); - method public void setNumerical(int); + method public void setNumerical(long); } public class ValuesType { diff --git a/audio/policy/1.0/xml/audio_policy_engine_configuration.xsd b/audio/policy/1.0/xml/audio_policy_engine_configuration.xsd index 842e7246d6..3ce12e709b 100644 --- a/audio/policy/1.0/xml/audio_policy_engine_configuration.xsd +++ b/audio/policy/1.0/xml/audio_policy_engine_configuration.xsd @@ -189,9 +189,20 @@ - + + + + + + + + + + + + From 94a3a178aae80ac581eb50f3e2b771698b7e099e Mon Sep 17 00:00:00 2001 From: Karthik Ramakrishnan Date: Mon, 7 Feb 2022 17:37:39 -0800 Subject: [PATCH 05/34] 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 Bug: 226452499 Test: run vts -m VtsHalBluetoothV1_0TargetTest -t PerInstance/BluetoothHidlTest#InitializeAndClose/0_default Change-Id: Ica83f4959a87b8fb498b535572738e4e790c6ddb Merged-In: Ica83f4959a87b8fb498b535572738e4e790c6ddb (cherry picked from commit 0dc66a2c69c6c06a504c9bef8b8418bc615d41dc) --- .../1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.xml b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.xml index 09463c962f..ea7adc9159 100644 --- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.xml +++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.xml @@ -22,8 +22,11 @@ - -