"Allow startLceService to succeed even in the
SIM_ABSENT case. The original RIL documentation
states that SUCCESS is valid for all LCE
operations, and there is no logical reason why
one of these operations must fail in a no-SIM
case (though a vendor may choose not to support
that configuration). Thus, a call to
startLceService should permit NONE when requested
in the no-SIM case for 1.0 VTS.
In addition, a successful call to startLceService
should also permit a successful call to
pullLceData, so also allow RadioError::NONE for
the pull operation. Ideally the tests would only
allow NONE for pull if startLceService also
returns NONE, but that's out of scope for now."
Bug: 110181475
Bug: 72075328
Test: confirmed in the discussion; compilation
The audio tests use a static cache of some HAL objects for
performance reasons (speed up by 10x on Pixel).
Those object are destroy during the test environment tear-down.
This tear-down was destroying the objects in a FIFO instead of LIFO
order. Thus the DeficesFactory was destroyed before the Device it
created.
Bug: 79889318
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
check that the device destructor is called before the
devicesFactory one.
Change-Id: I1b4345158139ba14a8779a9508f7ebdc41129d1d
Merged-In: I1b4345158139ba14a8779a9508f7ebdc41129d1d
Signed-off-by: Kevin Rocard <krocard@google.com>
Analysis: VtsHalRadioV1_0Target's timeout is too short for
getAvailableNetworks, because this request duration depends on NW
environment or frequency.
Suggested solution: Add a timeout parameter to wait() and default
timeout value is 5 minutes in order to avoid timeout fail due to NW
environment.
Bug: 68834032
Test: getAvailableNetworks can be passed after we apply this patch and
test result for all other telephony 1.0 test cases are not changed.
Change-Id: Iaef7e8eefa8fcfde0ff8030cba1f9753a28eac61
Merged-In: Iaae71e0abacd28275d86a19264813ff209ddb79c
Check for WiFi Logger capability Support and do not
assert if it returns ERROR_NOT_SUPPORTED.
Bug: 69094019
Test: VTS tests for module VtsHalWifiV1_0TargetTest.
(cherry-picked from 2b7b24b245a6099fdb127d38a99d7608a6c5bc91)
Change-Id: Id8eb171937b66221a5c9303e377310db54202f71
This constraint was added due to an incorrect assumption
that device ports were identified by names whereas
they are by the (module,type,address) triplet.
Bug: 69442986
Test: xmllint validates an XML with two identically named devices in
different modules.
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Merged-In: I66d890d3c967bead4f2a287202c259009217996a
Change-Id: I66d890d3c967bead4f2a287202c259009217996a
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 503c3e0a4e)
setSampleRate, setChannelMask, setFormat
may not be implemented by the HAL, although this is not documented in
the HAL API.
Currently the VTS test requires their implementation if the respective
getSupported{SampleRate,ChannelMask,Format} are supported.
Relax this requirement as the framework never calls those setters.
Note that the optionality of those functions will be documented
in the next HAL API version.
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Bug: 69811500
Change-Id: I3a390ae925cabd99e7f1ed4a627e71ad87b1b437
Merged-In: I3a390ae925cabd99e7f1ed4a627e71ad87b1b437
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 3bcba14c36)
getSupportedSampleRate should return the native sampling rates,
(IE. the sampling rates that can be played without resampling)
but other sampling rates can be supported by the HAL.
The test was too strict as it was failing if HALs were supporting more
sample rates than there native (optimized) ones.
For example, a HAL might have its best performance (no resampling)
on 48kHz but still support 16kHz through resampling.
Note: getSupportedSampleRate might be renamed to getNativeSampleRate in
the next major HAL revision to avoid ambiguity.
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Bug: 69811500
Merged-In: I1ec1ce422bc5039637463c6641060508f4ee892b
Change-Id: I1ec1ce422bc5039637463c6641060508f4ee892b
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 02025847de)
Device port are not identified by names but by their type and address
and the module they are in.
As a result, enforce this constraint in the XSD. Violating it results in
a policy parsing crash.
Bug: 69442986
Test: xmllint invalidates an XML with two devices of the same type
and address
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Merged-In: I84245f0fa80fef786a002c98073c166b6aaf2be4
Change-Id: I84245f0fa80fef786a002c98073c166b6aaf2be4
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit fa1f597442)
Vendor are currently not allowed to extend the XML format.
As some enumeration are allowed to be extended, this mean that
the format must allow some extension mechanism.
This patch relaxes the definition of the module name field.
AOSP names are still allowed, but a vendor can add its own name
if prefixed with "vx_". Eg:
<module name="vx_google_vr" halVersion="3.0">
Test: xmllint --xinclude --noout --schema hardware/interfaces/audio/2.0/config/audio_policy_configuration.xsd audio_policy_configuration.xml
with audio_policy_configuration.xml containing a module named vx_google_vr
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
on Pixel 2
Bug: 69442986
Signed-off-by: Kevin Rocard <krocard@google.com>
Merged-In: I4ead38535cce89bb8fe44cf23fa1146acd1271d6
Change-Id: I4ead38535cce89bb8fe44cf23fa1146acd1271d6
(cherry picked from commit 7558e8c6e4)
As it is often found in a short integration
window with very high Doppler uncertainty.
Bug: 67877519
Merged-In: Ia05359f572f4ea7be81f9d5fe30bd619322bebd3
Test: Verified Pixel still passes VTS
Change-Id: Ia05359f572f4ea7be81f9d5fe30bd619322bebd3
(cherry picked from commit 763b4eab01)
AesCtrDecryptor::decrypt() doesn't check whether the size of "key" is
equal to 16 bytes, which may lead to an OOB read problem in the context
of mediadrmserver. The fix is in clearkey plugin. Add tests to validate
the fix.
Test: VTS test
adb shell /data/nativetest/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest
bug: 63982768
Merged-In: Ife2da17e7f39d8031bc36b83c3b27ba5e9d83eb7
Change-Id: Ife2da17e7f39d8031bc36b83c3b27ba5e9d83eb7
(cherry picked from commit cc77a50e96)
Since the purpose of most of the test cases in current VTS is to check
if proper errors are returned and there is no crash seen in vendor code,
updating setRadioPower test case to turn on the radio instead of
turning off. We want to avoid test cases which turn off
radio or leads to modem shut down as those test cases affect other tests.
Test: VTS
Change-Id: I4fb9f18884f7ef21162015a0032c4431444f7025
Merged-In: I4fb9f18884f7ef21162015a0032c4431444f7025
Bug: 65230472
(cherry picked from commit 9a721b8087)
(cherry picked from commit 536818d17a)
Failed cases:
AttestationTest.RsaAttestation
AttestationTest.EcAttestation
Analysis:
The verify_attestation_record() in Keymaster_hidl_hal_test.cpp calls
parse_attestation_record() to set the value of att_challenge. It fails
to compare att_challenge with challenge by memcmp.
Because setToExternal() method uses buffer pointer to local variable
(record), not use memcpy to copy into itself buffer in
parse_attestation_record(). When it leaves the parse_attestation_record(),
we will get the att_challenge which is null buffer to compare with challenge
incorrectly.
Fix: use memcpy to copy the buffer.
Bug: 65039571
Test: build passed. VtsHalKeymasterV3_0Target -> PASSED: 106, FAILED: 0.
Change-Id: I700a9242cc9a5f4cb196b62860823601e4088531
Merged-In: I700a9242cc9a5f4cb196b62860823601e4088531
(cherry picked from 54ca32a130)
(cherry picked from commit 926a8e7440)
This patch only modifies the VTS tests.
O generic policy configuration fallback is incorrect
(see I2a39606cd820b5cd27a640248bf692204ec2cd71 for the fix).
Nevertheless, has no impact on products because this fallback
is only used in aosp builds and GSI.
Unfortunatly, this break the VTS test when run agains GSI.
Because it is too late to change GSI for Oc and DR,
relax the test to support current O GSI.
For P, ihis patch will not be part of VTS
and the fallback config will be fixed.
Bug: 65535343
Merged-In: I2a39606cd820b5cd27a640248bf692204ec2cd71
Test: Following script:
setup() {
BUILD_ID=$1
TARGET_PRODUCT=$2
TARGET_BUILD_TYPE=${3:-userdebug}
TARGET_ARCH=${4:-arm64}
set +x
echo "The following three variables can be overridden" \
"by setting the corresponding environment variable"
set -x
TEST_SUITES_TARGET=${VTS_TEST_SUITES_TARGET:-test_suites_${TARGET_ARCH}}
BASE_TARGET=${VTS_BASE_TARGET:-${TARGET_PRODUCT}-${TARGET_BUILD_TYPE}}
AOSP_TARGET=${VTS_AOSP_TARGET:-aosp_${TARGET_ARCH}_ab-${TARGET_BUILD_TYPE}}
set +x
download() {
local target=$1
local file=$2
test -f $file ||
/google/data/ro/projects/android/fetch_artifact --bid $BUILD_ID --target $target $file ||
{ local r=$?; rm $file; return $r; }
}
echo "Downloading"
download $TEST_SUITES_TARGET 'android-vts.zip'
download $BASE_TARGET "${TARGET_PRODUCT}-img-${BUILD_ID}.zip"
download $AOSP_TARGET "aosp_${TARGET_ARCH}_ab-img-${BUILD_ID}.zip"
echo "Unzipping"
rm -r system.img android-vts
unzip aosp_${TARGET_ARCH}_ab-img-$BUILD_ID.zip system.img
unzip android-vts.zip
echo "Building vbmeta without verity"
avbtool make_vbmeta_image --flag 2 --output vbmeta.img
set -x
adb reboot bootloader
fastboot update ${TARGET_PRODUCT}-img-$BUILD_ID.zip --skip-reboot
fastboot flash vbmeta vbmeta.img || echo "Warning: Device does not support vbmeta"
fastboot erase system
fastboot flash system system.img
fastboot erase metadata
fastboot -w
fastboot reboot
echo "Board setup"
echo "You may now start vts-tradefed with:"
echo '$ ANDROID_BUILD_TOP= PATH="$PWD:$PATH" vts-tradefed'
}
VTS_TEST_SUITES_TARGET=test_suites_arm64_fastbuild3d_linux setup 4327646 sailfish
vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Merged-In: Ibe1feed41325a3e4fb25e959bd254156348aa584
Change-Id: Ibe1feed41325a3e4fb25e959bd254156348aa584
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit ff7dcd7e4d)
The XML audio policy configuration is expected to be located in /vendor.
Additionally for AOSP builds (no vendor) and as a fallback in case of
missing vendor configuration, the system supports loading the XML from
/system.
This fallback config is not guaranty to be compatible with the phone HAL,
but probably does for a wide range of android phones
(at least for basic use cases).
In each of those cases, there is only one configuration file, either in
/vendor or /system.
As a result, the audio policy configuration VTS test was asserting that
only one audio_policy_configuration.xml could be found.
If multiple were found, one was useless and the platform integrator
should remove it.
But VTS are now run on phone with a /system partition from an AOSP
build and a /vendor partition from a device build.
In such scenario two audio policy config are now present on the device,
thus breaking the VTS expectation.
This is not a problem for the framework because it does not look for a /system
config if one was found in /vendor.
In the future, the /system XML might be removed as boards
specific config should be found in /vendor only as per treble
requirements.
Test: Compile
Bug: 65482614
Merged-In: I7cd7eb7284c0aa52782aa591411f8a9bf2a87a76
Change-Id: I7cd7eb7284c0aa52782aa591411f8a9bf2a87a76
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 76efe01bbd)
The audio policy configuration deserializer supports fully dynamic
profiles by not setting a profile in a port.
It also supports partially dynamic profile by
not setting @format, @samplingRates or @channelMasks
Nevertheless this last feature of partial dynamic profile
was mistakenly not allowed by the configuration xsd.
Bug: 63541622
Change-Id: I78f77a77a3c62bba28a7da5a0e3c8c608b5a01d9
Merged-In: I78f77a77a3c62bba28a7da5a0e3c8c608b5a01d9
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 43d25f2f26)
(cherry picked from commit 3092b31b14)
timestampDevTest flag can be used to disable timestamp deviation
tests. The flag is not working as intended. This is corrected.
Test: make vts -j99 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 \
&& vts-tradefed run commandAndExit vts \
--skip-all-system-status-check --primary-abi-only \
--skip-preconditions --module VtsHalMediaOmxV1_0Test -l INFO
Bug: 64743270
Bug: 65166112
Merged-In: I611e96498a4677b6ccbff33c291d56eed7b48f6f
Change-Id: I611e96498a4677b6ccbff33c291d56eed7b48f6f
(cherry picked from commit dc6270ecc1)
Components can send various kinds of port settings changed events all
at once. During a full port reconfiguration this is causing problems
due to limited flexibility in the message handling design. For now,
before committing to a full port reconfiguration defer any events
waiting in the queue to be addressed to a later point.
Test: make vts -j99 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 \
&& vts-tradefed run commandAndExit vts \
--skip-all-system-status-check --primary-abi-only \
--skip-preconditions --module VtsHalMediaOmxV1_0Test -l INFO
Bug: 64468705
Merged-In: I537cdd3e7d92cdc6d54168f091d7897afe541599
Change-Id: I537cdd3e7d92cdc6d54168f091d7897afe541599
(cherry picked from commit a230bad8d4)
audio_policy_configuration.xml can be loaded from the following places:
- /system/etc/
- /vendor/etc
- /odm/etc
Nevertheless the config validation test was expecting it to be in
/vendor/etc exclusively.
This patch changes the test logic to:
- look for the config files in all 3 folders
- make sure the config is unique
Test: run the following script to check for regressions and test that
invalid config make the test fail.
(
set -xe
runVTS() { vts-tradefed run commandAndExit vts \
--skip-all-system-status-check --primary-abi-only \
--skip-preconditions --module VtsHalAudioV2_0Target \
-t CheckConfig.audioPolicyConfigurationValidation; }
echo "# Test valid config"
runVTS
echo "# Test multiple invalid match"
adb shell touch /system/etc/audio_policy_configuration.xml
! runVTS
adb shell rm /system/etc/audio_policy_configuration.xml
echo "# Test multiple valid match"
adb shell cp /{vendor,system}/etc/audio_policy_configuration.xml
! runVTS
adb shell rm /system/etc/audio_policy_configuration.xml
echo "# Test invalid config"
adb shell sed -i /defaultOutputDevice/p /vendor/etc/audio_policy_configuration.xml
! runVTS
adb shell sed -i '"/defaultOutputDevice/{p;N;d}"' /vendor/etc/audio_policy_configuration.xml
echo "# Test that the test did not break the config"
runVTS
)
Bug: 64881365
Merged-In: I9db5e6f727d19fd654a3cc543a2aaab196682001
Change-Id: I9db5e6f727d19fd654a3cc543a2aaab196682001
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 6dcc713281)
The eColorFormat field in OMX_PARAM_PORTDEFINITIONTYPE structure
has no effect on the component. This has to be configured from
OMX_VIDEO_PARAM_PORTFORMATTYPE. This is corrected. This color format
information is passed to graphic buffer during its allocation
Bug: 63796949
Merged-In: I51b1e59631647d1291ecfac373781ac5e5a0ffd5
Change-Id: I51b1e59631647d1291ecfac373781ac5e5a0ffd5
(cherry picked from commit 1441864f4c)
DRM cannot skip all tests when vendor modules are
not present. Currently even the clearkey tests are
skipping when there is no vendor lib. This can be
replicated by just pushing the DRM VTS test binary
build from master (or DR or MR) and executing the
binary without VTS. All test cases skip (including
clearkey).
This change prevents exiting when no vendor
modules are found.
Test: Push the test binary and confirm that the
clearkey tests run.
bug:64459011
Merged-In: Ic5f554d9b223d6ca4bf26f92f072254cc18f4620
Change-Id: Ic5f554d9b223d6ca4bf26f92f072254cc18f4620
(cherry picked from commit 5db2e67293)
In video decoders, size of a single input frame (elementary-stream)
is dependent on width, height, color format, profile settings, ...
Most of this information is part of sps, pps and requires parsing.
But as the max size of the stream is known ahead, use it to configure
the input buffer size requirements
Bug: 63875287
Bug: 63796949
Merged-In: Ib760c4f55b094260a0abd120f852dcf1899df4e0
Change-Id: Ib760c4f55b094260a0abd120f852dcf1899df4e0
(cherry picked from commit 9ce313a7b3)
This is a cherry-pick of the following VTS changes from O MR1 to O:
- ag/2462390: Fix Broadcast radio 1.0 VTS to not fail on
other radio types than AM/FM.
- ag/2477726: Make tuned field description more precise and
fix VTS tests to obey it.
- ag/2549733: Implement out-of-band metadata images (a test for in-band).
Additionally, it fixes config callback handling in OpenTunerTwice test.
Bug: b/64324703
Test: VTS
Change-Id: I590b9b4d927fb0cd41f92e919343b5b94ad0e246
Merged-In: I590b9b4d927fb0cd41f92e919343b5b94ad0e246
(cherry picked from commit 9e7774c3b9)