fd297c6f8e722ac834706844fec058ff7b1335c0 |
|
13-May-2017 |
Kevin Rocard <krocard@google.com> |
Temporary disable tests failing tests for O Those tests are failing because their fix (I0ea1a4bf952527ac0711ed3cdd31c6aa53db4d2e) is dangerous to merge in O so close to the final release. The fix implements a rejection feature for unsupported audio format. This rejection is required by the hal interface but was only partially implemented in the hal. The problem is that the framework was never tested with a hal supporting this behavior nor some calls implemented with this requirement. As a result I do not feel confident in merging it in oc-dev, it might complex, hard to detect bugs. The fix will be merged in master thus will be part of mr1. The current patch will be reverted in master after the fix is merged. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: Ia9e1dcec5442e2755f0bcb13d8d502663f507dbe Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
a1d6ea4ba76c96cd613ee81eb204bc3041a219f7 |
|
09-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL: A speech volume outside of [0,1] is an error Hals are supposed to received normalized volumes, between 0 and 1. Previously volumes outside [0,1] were clamp to this range. This clamping has the capability to hide bugs thus return an error if such volume is received. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: Iab70f9c651540ea2434d10939d28c1c842db19e0 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
fcf186bd5949f3bbb4274f8f7bf4ab9e4497d541 |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Some methods are not optional Some mandatory methods were allowed to return NOT_SUPPORTED although their implementations is mandatory. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: Ibe4b3cf73257309975ed11269a38315051fa9064 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
96f46c4a23e8acce582bba8d6fc6b1d5a61af319 |
|
08-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Log test unexpected behaviour Some test output infos that are useful to understand how they run. Unfortunately the xml report does not seem to be saved by VTS tradefed. Thus output them in logcat. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: I9a2cc10160c3b1c8f81db0464efbc6b26600cadc Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
f26f67a16b1c29993309380e3b33178bf35c4507 |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Improve ASSERT of Result and Return Previously tests on Result and Return were using ASSERT_NO_FATAL_FAILURE and helper methods. This leaded to complex error messages were the error did not pointed to the helper methods instead of the ASSERT_RESULT call. Additionally SCOPE_TRACE messages are repeated for each ASSERT_NO_FATAL_FAILURE level. Use ::testing::AssertionResult to improve drastically the error messages. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: If705502546606d678df3f1966b0cd9f3ef8c2529 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
304b6c810eb0209d5c548d63252670ce2396b020 |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: stopped stream state getters may return INVALID_STATE A never started stream should have its render position and next write timestamp at 0 or indicate that the state is invalid. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: I62e16066bb22101ee8f75154fc6c85a66be2f402 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
c4f1b2f86a0dd9337577192372219e868a6c59f3 |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: setGain allow -0.0 Previously -0.0 was consider an invalid value as not in the range [0,1]. But it is quite difficult in C++ to differentiate -0.0 and 0.0 as -0.0 == 0.0 and such difference has no impact in practice. Thus leave the implementation support or not -0.0. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: Ia0ebcb325f77adcf8471620f418da1cbe8995e36 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
98390a6c2cff5b5c75b7236b40a6b72b5b116f17 |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Some methods are optional Although the method documentation does not say it, some HIDL interface methods are optional. Update the tests to allow NOT_SUPPORTED to be returned. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: If31acc2dbdb6d1d563910e85c99401c48f4f3f86 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
476e38fd3146989efbac1e02e0e918d1deed9fff |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: GetPresentationPosition may return 0 on stop stream GetPresentationPosition returns the last time a sample was written to the hardware. Calling it on a stop stream should return 0 sample written, but the timestamps of that measure is of little importance. Thus allow this timestamp to be 0 indicating that the measure was never actually made. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: I3c33b60f98e8cbea269a7739cc1889af932dcff5 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
8f8730c7629fe87d8a2123359da2e1a20f926d0e |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: getDevice() == NONE => not supported getDevice does not return a Result, thus it can not return NOT_SUPPORTED. Consider NONE as not supported. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: I3b6f7a1fbc1d1535faf549f5b031461cb39d1722 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
4aefd1c1ff3f92fd02fdfb76d7feda93cdea2909 |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Getter test assert logic was incorrect Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: Iaf2d71829a15b12dcf56e825773c8a697896a264 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
5e5783daef84deecd53bfb1e94a0177e667b71db |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: debugDump can only test for crash DebugDump does not return an error code, thus the implementation can not return not implemented. As a result, the test can not expect any output from the function. Only test that the call does not crash and add a log if the function is probably not implemented in the test. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: I2c18958bceb1eb638491f9afce9d8e8025ccd3ec Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
195205b323b7d93cf4d477445469759b27371f45 |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Sanitize prepareFor{Writing,Reading} input size Return an error if framesCount or frameSize are null to avoid a division by zero when calculating the buffer size. The message queues are allocated with a buffer size but if two big they will assert not return an error. Thus take some margin on the buffer size check. Note that both function should be refactored as 99% identical. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: I0576e9016ef2e567c8d4e171c6237883d9865db9 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
04364edefcc39a5f620156a35209b760eb66a916 |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Sanitize setMode input Some values of AudioMode are exposed although implementation detail. Make sure the client can not use them. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: If513c2a06efa8a92459f0af80c63232fc63302b0 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
f8500dcb5a22b3f21dbcdadf04cf3d667d499b51 |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Allow OK when setting a non existing parameter setHwAvSync and setParameters were implemented in the pre-hidl interface as set_parameters. Unfortunately set_parameters did not return an error if a key was not implemented. As most HIDL implementation will be a wrapper around the pre-hidl interface, allow those functions to return OK on not implemented key. Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: Icfcaa02b7d63e03375fddc90dc5a803754c1874f Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
fa3b4a9334ac3c747c121652441f402a1bd3f45e |
|
03-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: differentiate getParam success/failure/not_implemented When sending parameters to the HAL (and some getters are implemented with getParameters), the client expect a status consistent with the other HIDL methods. Ie: not implemented or success and failure. Unfortunately, the legacy get_parameter interface, which currently most Audio HIDL implementation are a wrapper around, do not return such error code. Get parameters return a list of key values. - If a requested key does not return a key value pair, consider it not implemented - If a requested key returns a key not followed by a correct value, consider it a failure - otherwise it is a success Test: vts-tradefed run vts --module VtsHalAudioV2_0Target Test: call/play music/record/video... Bug: 36311550 Change-Id: Id6711e9c1974fe5a336b6de83a9b6d14f74437c9 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
72e50e2ef1480fc3d90f0d88c7e9e3595622e75c |
|
05-May-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Fix style on modified files In order to avoid style inconsistency as well as non functional modification in following patches, fix the style of all files modified for the fix of the VTS tests. Patch generated with: $ clang-format -i --style file -- <file list> Bug: 36311550 Test: compile Change-Id: I53dbcdabf959a6100e34a2ee4d0f951d525049cb
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
8604a738a79d9caf8b57773a7bcc2ef99a8a624d |
|
24-Apr-2017 |
Mikhail Naganov <mnaganov@google.com> |
audiohal: Fix incorrect parameter handling in IDevicesFactory::openDevice Check for possibly invalid values of IDevicesFactory::Device enum. Bug: 37592306 Change-Id: I4a2300d3be9ab38e6c51ba8a3b5bbbb606a11c2b Test: VTS (cherry picked from commit 8c16d85122472ef01a9e023c9568968faac1aff8)
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
3e6fe754f647db202a7a455adcf1ab5d686105d3 |
|
24-Apr-2017 |
Mikhail Naganov <mnaganov@google.com> |
audiohal: Fix handling of invalid arguments in 'debugDump' methods Add checks for validity of the passed in native handle. Bug: 37590777 Change-Id: If906f0086c3442819e1844cc521215d5b74af015 Test: VTS (cherry picked from commit 7bae6a0b635b142cfba9d4c4612e1e114f85b842)
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
fba442a60d199441d06bf03375cb7904768403da |
|
01-Apr-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL: Detect openDevice failure The result status was not checked. Test: Run test on target Bug: 36311550 Change-Id: I197b52d0b5a1276d3e3beba105bb91639f89e060 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
6f22680db6bfe392a2f9f6b934ea8a54abea0ad7 |
|
03-Apr-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Fix documentation Some test did not have any documentation Test: compile & run Bug: 36311550 Change-Id: I37c40f6f17993a275e5c40b9a835ac04acf4f8e6 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
e9a8fb737192cafcb7d1d6cd34446825be9e1590 |
|
21-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: test leftover calls Test: run on target Bug: 34170075 Change-Id: I9529d3b8db7388332dde3ea7d5940d58e010e449 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
624800c0737674f8d01564ab68eb5dcea0ff0a38 |
|
11-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Add test for IStreamOut Some test are only negative. Test: run test on board Bug: 34170075 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
c9963526d9660c85b5f567d3b24884028234ac7e |
|
11-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Add tests for IStreamIn For now most tests are negative. Test: run test on board Bug: 34170075 Change-Id: Id207ae310e0fa5a3ab4db49122249594cd2c2703 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
8878b4ba1f7c1f1e9fcfdf907bf0cad6b93f6a02 |
|
11-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Add at least negative tests for IStream Add negative test for the remaining methods of IStream and positive one for most. Test: run test on board Bug: 34170075 Change-Id: Ib18c6d2e4d0a14ee4517f31319ddecf5e23ac8de Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
b903124b365a095b56cce6ac4345fc1166d937c7 |
|
13-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Test IStream::debugDump Test: run it on target Bug: 34170075 Change-Id: I4af190806f79e0c03b59e1cd60b6f58a08b05322 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
a7df7fc097d09deff178ffc591f1bbdac041f561 |
|
11-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Audio HAL VTS: Split big test for better traceability As some part of this big test were failing, it was difficult to actually track on the dashboard what was wrong. Split it in small independent equivalent tests. Test: mm & run on target Bug: 34170075 Change-Id: I03686e55ec112f0f0c0ef2683c5dc1ae79ff8d5e Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
20e7af61590dd024096e1d49365ca5bbc95216ea |
|
11-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Audio Hal VTS: Refactor ASSERT_RESULT helper ASSERT_INVALID_ARGUMENTS was a macro that asserted that a given Result or Return contained INVALID_ARGUMENT. The problem was that a result can have lots of other values like INVALID_STATE or NOT_SUPPORTED. Additionally not all test expect only one possible result. Introduce two overload of ASSERT_RESULT() The first one takes an expected Result value and compare it to the obtained one. The second take a list and expect the obtained one to be in this list. Test: run the test on target Bug: 34170075 Change-Id: I798729f27f723c98292610bfb43dbdb2724ec2ca Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
9c369149837baf173401b5033b5ec96214362631 |
|
09-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Audio hal VTS: generate names for parametrized tests The gtest dashboard only shows test names, not their parameters. This mean that parametrized tests are names 0,1,2... Thus when one test fails, the dashboard info is not very useful. This patch appends the audio config to the test name. Test: run the test on target Bug: 34170075 Change-Id: I77090a3a17e4a3e97ecb72a8a89ad2d88626d96f Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
92ce35df946b0514e1e73a4f976cccff9e49823b |
|
09-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Audio hal VTS: factorize master volume test Master volume was the first pair of getter/setter tested and did not use the generic test*Accessor function. Test: run the corresponding vts test Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target Bug: 34170075 Change-Id: I77080a3a17e4a3e97ecb72a8a89ad2d88626d96f Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
ee771e9cfac6d0ec1d930ef9e71b1c7bd9b91fa9 |
|
09-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Fix potentiel deadlock in audio VTS The IDevice::debugDump method dumps debug info in a file descriptor. Such file descriptor was previously the writing end of a pipe. As the test is not multithreaded, if the dump was bigger than the pipe buffer, a deadlock would occur. With this patch, the test uses a file instead of a pipe. Thus write will never block infinitely. Test: run the corresponding vts test Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target Bug: 34170075 Change-Id: I928cae712a1cb4411f907b3a9583014ba6486abc Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
161b564b350c6038d9b49edc48ae2a220cc6326c |
|
10-Mar-2017 |
Yuexi Ma <yuexima@google.com> |
audio: use vts target test base class Test: make vts succeed Change-Id: I8008392e016e0604f8aa9a292f1ec6c6e7c3b384
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
3c405a7acf443a5910601763616275f21bb91a41 |
|
09-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Add VTS for the audio primary device Its base class was tested but not the primary device getters and setters. Test: run the corresponding vts test Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target Bug: 34170075 Change-Id: Ic451761c7b8b29fd302a62aba83be6ce7be35f64 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
fd067c3f54669b84b267047d173d15392d178dc4 |
|
09-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Fix segfault in Primary audio hal hidl wrapper getDevice Test: run the corresponding vts test Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target Bug: 34170075 Change-Id: I0652f1bf748de99a8a2594630daf5ea2acec8934 Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
d1e98aef14a6ad2042548c7c02a9b76c086744ed |
|
09-Mar-2017 |
Kevin Rocard <krocard@google.com> |
Do not skip failing Audio vts tests Previously failing tests were commented because I thought our implementation had to pass all tests. As a mater of facts, it is not the case and tests are allowed to fail. Bugs will be raised for those failure. This is much better way to track the fixes that FIXMEs. Test: run the corresponding vts test Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target Bug: 34170075 Change-Id: I928cae712a1cb4411f907b3a9583014ba6487abd Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|
f0357884b5048c097cc7acda694e62f5aa68b631 |
|
11-Feb-2017 |
Kevin Rocard <krocard@google.com> |
Add VTS tests for the primary audio hal Test: run the vts test on target Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target Bug: 34170075 Change-Id: I4bd6cb0aa5b7cc628537cd7c024542c4db8b592d Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
|