From 5abb15e9872a203bf2e5a8b879ac4842c8cac789 Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Thu, 1 Jun 2017 09:58:06 -0700 Subject: [PATCH] VTS Audio Effect: Do not check the result of IEffect::offload method HAL may not support offloading, and a call to IEffect::offload is allowed to return an error code. Update the test to only check that the call to the method doesn't crash. Bug: 38437110 Test: still passes Change-Id: I6cfd25998edb9c68d2e585e572ba8ba3a3427e98 --- .../2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp b/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp index 940bb4e5c9..f069c467c7 100644 --- a/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp +++ b/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp @@ -450,16 +450,13 @@ TEST_F(AudioEffectHidlTest, SetAudioSource) { } TEST_F(AudioEffectHidlTest, Offload) { - description("Verify that calling Offload method either works or returns not supported"); + description("Verify that calling Offload method does not crash"); EffectOffloadParameter offloadParam; offloadParam.isOffload = false; offloadParam.ioHandle = static_cast(AudioHandleConsts::AUDIO_IO_HANDLE_NONE); Return ret = effect->offload(offloadParam); EXPECT_TRUE(ret.isOk()); - EXPECT_TRUE(Result::OK == ret || Result::NOT_SUPPORTED == ret) - << "Expected OK or NOT_SUPPORTED, actual value: " - << static_cast(static_cast(ret)); } TEST_F(AudioEffectHidlTest, PrepareForProcessing) {