Commit graph

6516 commits

Author SHA1 Message Date
Kevin Rocard
ec65974f60 Audio HAL: Allow setters to not be implemented
am: 5b21eaa608  -s ours

Change-Id: I14f534be8a78e52287673d200f7050a1a5d38616
2018-01-23 22:46:06 +00:00
Kevin Rocard
0b304504b5 Merge "Audio VTS: HAL can support more than the native sampling rates" into oreo-vts-dev
am: 96b6fcdc4f  -s ours

Change-Id: I3e2c23a1442726e742c41909f87a42e2e2e8d8c6
2018-01-23 22:44:23 +00:00
Kevin Rocard
f4f190fd03 Audio policy config: Device port (type,address) must be unique
am: 117188b315  -s ours

Change-Id: I73ce4291045840041d7c40ed13d3015ddc6e2be3
2018-01-23 22:44:14 +00:00
Kevin Rocard
6834a7bea7 Audio policy config: allow vendor to extend module name
am: eb488fad65  -s ours

Change-Id: Ic43abe7100e5dbc92f8143db25e78034e9da7f20
2018-01-23 22:44:05 +00:00
sqian
633778a470 Set time delay in the vts test setup
am: d4c4a4edfb  -s ours

Change-Id: Iecd99a7bd79988394c192bdf0aad4d4783c9e8a3
2018-01-23 22:42:29 +00:00
Wyatt Riley
f657ce53b4 Loosen speed check for first GPS location
am: bf4f6db431  -s ours

Change-Id: I20c516409df5251bedcd284df4ea3b1f8f4bff0f
2018-01-23 22:42:20 +00:00
Kevin Rocard
5b21eaa608 Audio HAL: Allow setters to not be implemented
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)
2018-01-23 22:42:18 +00:00
Treehugger Robot
96b6fcdc4f Merge "Audio VTS: HAL can support more than the native sampling rates" into oreo-vts-dev 2018-01-23 22:42:11 +00:00
Kevin Rocard
1e7e982a72 Audio VTS: HAL can support more than the native sampling rates
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)
2018-01-23 22:41:44 +00:00
Kevin Rocard
117188b315 Audio policy config: Device port (type,address) must be unique
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)
2018-01-23 22:41:21 +00:00
Kevin Rocard
eb488fad65 Audio policy config: allow vendor to extend module name
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)
2018-01-23 22:40:40 +00:00
Edwin Wong
4a9b599f9a Add tests to validate key length for clearkey plugin.
am: c312e21b5e  -s ours

Change-Id: Ie0657f6b7a5f78926bac6f729c738b543a905847
2018-01-23 22:38:23 +00:00
sqian
b2b0cd70fa Add REQUEST_NOT_SUPPORTED / SIM_ABSENT for vts tests
am: 1d93dbfb3b  -s ours

Change-Id: Ibaa8bd1ca8994b0c461905cea6ee7b2434b5e631
2018-01-23 22:38:14 +00:00
sqian
d4c4a4edfb Set time delay in the vts test setup
Bug: 69398018
Test: run vts
Change-Id: Ibe1e8f1b08342f1b0b867bfa7bcf1b2fe4a85622
Merged-In: Ibe1e8f1b08342f1b0b867bfa7bcf1b2fe4a85622
(cherry picked from commit 1a5c25dd95)
2018-01-23 22:38:12 +00:00
Sanket Padawe
0cc426f287 Fix VTS test which turns off radio.
am: 71620817a9  -s ours

Change-Id: I88a0b069e095553607255a27641e2de8520597e4
2018-01-23 22:38:06 +00:00
Iris Chang
2af656a3ea VTS: fix VtsHalKeymasterV3_0Target issue
am: af5fad4036  -s ours

Change-Id: I4d4a415b863bb1eabcb6c8e394bd2334df580907
2018-01-23 22:37:58 +00:00
Kevin Rocard
19ce816981 Audio VTS: do not test duplicate policy configuration file
am: 68d4dd6e85  -s ours

Change-Id: I66865be42cf153db5e80447e0b35671d66f362ea
2018-01-23 22:37:50 +00:00
Kevin Rocard
330909404a Audio VTS: remove expectation of policy configuration unicity
am: 9c4e363a70  -s ours

Change-Id: Ic096889afc2c27d02dcd71762ba4372b3bea6c1c
2018-01-23 22:37:32 +00:00
Wyatt Riley
bf4f6db431 Loosen speed check for first GPS location
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)
2018-01-23 22:37:03 +00:00
Kevin Rocard
615a9a5925 Allow partially dynamic profile in the audio policy config
am: e54b381d9d  -s ours

Change-Id: Ib5cfec73b48c3be394fd022d9d44845eef841dc3
2018-01-23 22:34:11 +00:00
Ram Mohan M
fecadf319e bug fix: restore support for broken flag
am: 8d009afdbb  -s ours

Change-Id: Ide7f8c7558e69535c81f9b732a0af59d4e6ebcb3
2018-01-23 22:34:03 +00:00
Ram Mohan M
2d7693b618 bug fix: handle multiple port settings change events signalled at once
am: 0a542276f8  -s ours

Change-Id: I4a7620be2660e12b9a769d42fecedfdfd01bdd9d
2018-01-23 22:33:54 +00:00
Kevin Rocard
1991aa694c Merge "Audio VTS: Look for Audio policy config in all supported folders" into oreo-vts-dev
am: 5e74540849  -s ours

Change-Id: I91eac1061a1779984fde7cfadb5661471378fb83
2018-01-23 22:33:44 +00:00
Shawn Willden
73c30b0870 Merge "Don't send more than 2K to addRngEntropy" into oreo-vts-dev
am: b461eafa23  -s ours

Change-Id: I71ce6acd1922221774954089db25bcdf9f393f80
2018-01-23 22:33:36 +00:00
Ram Mohan M
0be554b166 bug fix: disable timestamp deviation test for audio decoder
am: c4e3cc8b51  -s ours

Change-Id: I98b372420e6341c75425f6f01833547344464cda
2018-01-23 22:33:27 +00:00
Edwin Wong
c312e21b5e Add tests to validate key length for clearkey plugin.
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)
2018-01-23 22:33:24 +00:00
Jeff Tinker
c0e92d519e Merge "Allow clearkey tests to run if no vendor modules" into oreo-vts-dev
am: d5c6411aeb  -s ours

Change-Id: If94c39f3381e0e0896ce588e4cdd91ceb2fb0915
2018-01-23 22:33:16 +00:00
Ram Mohan M
86995ef4e4 bug fix: output colorformat configuration fixed
am: 56906949cc  -s ours

Change-Id: Ie030a332b96ff61988b6b8dc071dcb0bb207ce32
2018-01-23 22:33:04 +00:00
Ram Mohan M
fcaa3c4dbe Merge "bug fix: configure input port buffer size" into oreo-vts-dev
am: ccc3c36c88  -s ours

Change-Id: I0fe04262aeeeb2fa9d051423e182e4515e301d8b
2018-01-23 22:32:55 +00:00
Tomasz Wasilczyk
fa0c4e6f1f Update broadcastradio HAL 1.0 VTS tests.
am: aab4a1a574  -s ours

Change-Id: I52898a4f8bf5f4152b5c71001d48bef4542da769
2018-01-23 22:32:37 +00:00
Ram Mohan M
5f17d44600 bug fix: handle OMX_EventBufferFlag events
am: 7409a9312d  -s ours

Change-Id: Idecc2bf191bc9c5ba77fb5b74daca7d5f5d46251
2018-01-23 22:32:18 +00:00
Peng Xu
7c8df54d68 Skip direct report test if sensor is not available
am: c9c4ba222b  -s ours

Change-Id: I3078b341bcdedac1b99f9e59ac3b3a1c6dfb1dd6
2018-01-23 22:32:01 +00:00
Shawn Willden
0448a9a2c5 Reduce max keymaster message size to 2K
am: a0b9b39647  -s ours

Change-Id: I66612de2e93cb927b7dbf54daef8c1987761a95b
2018-01-23 22:31:53 +00:00
Ruchi Kandoi
8bd3ee8792 nfc: NCI 2.0: Add CORE_INIT_CMD for NCI 2.0
am: 6753a9be72  -s ours

Change-Id: I0b44f5c31d18362342882e84f740e48791d8c098
2018-01-23 22:31:44 +00:00
sqian
245ea97cf8 Add EMPTY_RECORD for getDeviceIdentity
am: 40d93997b5  -s ours

Change-Id: I9674e601054063087917b95133a34e24b9ee59d3
2018-01-23 22:31:36 +00:00
Kevin Rocard
cf08dbb02c Audio policy config xsd: add missing gains and address in ports
am: 69ad0a9c6f  -s ours

Change-Id: Ie444e6969dd2fa3a30b9ffcd3411e646ba9a5085
2018-01-23 22:31:28 +00:00
sqian
1d93dbfb3b Add REQUEST_NOT_SUPPORTED / SIM_ABSENT for vts tests
Bug: 65230472
Test: run vts
Merged-In: I1fab6f49f04a04a7f1cd3b613fe7049f927171d1
Change-Id: I1fab6f49f04a04a7f1cd3b613fe7049f927171d1
(cherry picked from commit 83cc3ab888)
2018-01-23 22:31:26 +00:00
Sanket Padawe
71620817a9 Fix VTS test which turns off radio.
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)
2018-01-23 22:31:01 +00:00
Iris Chang
af5fad4036 VTS: fix VtsHalKeymasterV3_0Target issue
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)
2018-01-23 22:30:41 +00:00
Kevin Rocard
68d4dd6e85 Audio VTS: do not test duplicate policy configuration file
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)
2018-01-23 22:29:59 +00:00
Kevin Rocard
9c4e363a70 Audio VTS: remove expectation of policy configuration unicity
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)
2018-01-23 22:28:39 +00:00
Kevin Rocard
e54b381d9d Allow partially dynamic profile in the audio policy config
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)
2018-01-23 22:27:22 +00:00
Ram Mohan M
8d009afdbb bug fix: restore support for broken flag
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)
2018-01-23 22:26:15 +00:00
Ram Mohan M
0a542276f8 bug fix: handle multiple port settings change events signalled at once
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)
2018-01-23 22:25:50 +00:00
Treehugger Robot
5e74540849 Merge "Audio VTS: Look for Audio policy config in all supported folders" into oreo-vts-dev 2018-01-23 22:24:10 +00:00
Treehugger Robot
b461eafa23 Merge "Don't send more than 2K to addRngEntropy" into oreo-vts-dev 2018-01-23 22:24:08 +00:00
Ram Mohan M
c4e3cc8b51 bug fix: disable timestamp deviation test for audio decoder
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: 64128634
Bug: 65166112

Merged-In: I8a08a8da7dd203cd16cbfbfd3f15e27966db711f
Change-Id: I8a08a8da7dd203cd16cbfbfd3f15e27966db711f
(cherry picked from commit eb9e25a3e2)
2018-01-23 22:23:27 +00:00
Treehugger Robot
d5c6411aeb Merge "Allow clearkey tests to run if no vendor modules" into oreo-vts-dev 2018-01-23 22:23:14 +00:00
Shawn Willden
7f9b29b9e2 Don't send more than 2K to addRngEntropy
Bug: 63745893
Test: VtsHalKeymasterV3_0TargetTest
Merged-In: I136920d3b62e026b22fbe06594bc40ccddc57dc3
Change-Id: I136920d3b62e026b22fbe06594bc40ccddc57dc3
(cherry picked from commit 3e1267edf0)
(cherry picked from commit 02ffb2be41)
2018-01-23 22:23:11 +00:00
Kevin Rocard
d6bcee4018 Audio VTS: Look for Audio policy config in all supported folders
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)
2018-01-23 22:22:54 +00:00