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)
OMX_EventBufferFlag event is sent when the component has processed a buffer
with its EOS flag set. This event is not sent by soft omx components.
Vendor components can send this. From IOMX point of view, this event is
not sent for processing
bug:64102197
Merged-In: I3a978a885b1e4446f82f2356ae677f70ea6f8150
Change-Id: I3a978a885b1e4446f82f2356ae677f70ea6f8150
(cherry picked from commit c8df8940e1)
Skip SensorsHidlTest.*AshmemDirectReportOperation* tests if sensor
is not available on device.
Bug: 64230704
Test: compiles and test pass for a pixel device with mag sensor
masked in hal.
Merged-In: I9bfbea6301891eaa2b272bd3d15b0e237799b5d6
Change-Id: I9bfbea6301891eaa2b272bd3d15b0e237799b5d6
(cherry picked from commit 31e5bf8d93)
Bug: 64245250
Test: run vts test
Merged-In: I4ca434fb1fb44a6278942f020ddd02b162d7f605
Change-Id: I4ca434fb1fb44a6278942f020ddd02b162d7f605
(cherry picked from commit c901276e60)
(cherry picked from commit 029633dcd0)
Remove same unit test case with arguments "","0" for:
- sendEnvelope
- sendTerminalResponseToSim
- sendEnvelopeWithStatus
Test: verified by vendor, treehuger
Bug: 62926561
Change-Id: I5f535bdfc5821275a7ea2571d411374e0d7a8822
Merged-In: I5f535bdfc5821275a7ea2571d411374e0d7a8822
(cherry picked from commit 67901bf2ce)
No nexus/pixel device uses port gains and their configuration were taken
as reference for the xsd creation.
Gains in mixPort and devicePort are supported by the code and use by
oem. As a result the xsd should allow them.
For validation of this path, the xsd was run against the example xml in
the audiopolicy source. Several other misalignment were found. They will
be fix in an other patch.
The address is also an optional field that was forgotten for the same
reason.
Bug: b/63827061
Test: -noout xmllint --schema hardware/interfaces/audio/2.0/config/audio_policy_configuration.xsd frameworks/av/services/audiopolicy/config/audio_policy_configuration.xml
Test: the above command fails for some other xml node unrelated to this bug
Test: this is tracked by b/38184704
Change-Id: I8dae15eb85a6a6d43c87aa747daf92a88d3fdcc0
Merged-In: I8dae15eb85a6a6d43c87aa747daf92a88d3fdcc0
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 488beb2db1)