Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5abb15e9 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

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
parent fe4705fa
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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<int>(AudioHandleConsts::AUDIO_IO_HANDLE_NONE);
  Return<Result> 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<int32_t>(static_cast<Result>(ret));
}

TEST_F(AudioEffectHidlTest, PrepareForProcessing) {