diff options
author | Kevin Rocard <krocard@google.com> | 2018-09-06 10:28:51 -0700 |
---|---|---|
committer | Kevin Rocard <krocard@google.com> | 2018-09-06 18:22:23 +0000 |
commit | e8957a35eaa093a51d553880224f97e0f7eba6fd (patch) | |
tree | f5f7c173fd9084ea29495f62962c054641ac12b1 /audio | |
parent | 391eb588cf3132b5de8d290154d0ffbc4135a981 (diff) | |
download | android_hardware_interfaces-e8957a35eaa093a51d553880224f97e0f7eba6fd.tar.gz android_hardware_interfaces-e8957a35eaa093a51d553880224f97e0f7eba6fd.tar.bz2 android_hardware_interfaces-e8957a35eaa093a51d553880224f97e0f7eba6fd.zip |
Audio VTS: Always check for Result::isOk()
A test was not checking for the Result::isOk() resulting
in an assert being triggered in HIDL code if the HAL crashed.
Test: (sleep 0.3; adb shell pkill audio) &
adb shell /data/nativetest64/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest
# Test finishes in failure but does not crash
Signed-off-by: Kevin Rocard <krocard@google.com>
Change-Id: I97a6213fe82a5e9a6eb333dc1dc2476102610b58
Diffstat (limited to 'audio')
-rw-r--r-- | audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp b/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp index 0f8996fc5..59ced271e 100644 --- a/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp +++ b/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp @@ -1402,6 +1402,7 @@ TEST_F(AudioPrimaryHidlTest, setBtHfpVolume) { "Make sure setBtHfpVolume is either not supported or " "only succeed if volume is in [0,1]"); auto ret = device->setBtHfpVolume(0.0); + ASSERT_TRUE(ret.isOk()); if (ret == Result::NOT_SUPPORTED) { doc::partialTest("setBtHfpVolume is not supported"); return; |