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

Commit c1172457 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

VTS Audio Effect: Allow 'NOT_SUPPORTED' from 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 accept either OK or NOT_SUPPORTED.

Bug: 38437110
Test: still passes
Change-Id: I1822010eed73f61bb0e0ae1852739b47fa72eade
parent af7bc59c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -450,14 +450,16 @@ TEST_F(AudioEffectHidlTest, SetAudioSource) {
}

TEST_F(AudioEffectHidlTest, Offload) {
  description("Verify that calling Offload methods works for an effect");
  description("Verify that calling Offload method either works or returns not supported");
  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_EQ(Result::OK, ret);
  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) {