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

Commit fa0d7a3b authored by Ram Mohan M's avatar Ram Mohan M Committed by Pawin Vongmasa
Browse files

Port mode configuration test - II

Change port modes randomly before the start of test and see if it
effects the end behavior

Test: make vts -j99 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 \
&& vts-tradefed run commandAndExit vts \
--skip-all-system-status-check --primary-abi-only \
--skip-preconditions --module VtsHalMediaOmxV1_0Host \
-l INFO

Bug: 63796949

Change-Id: I28c923b8e6cdc0f7bf6dd394ef6d088ff489e2e0
parent 9bd69497
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -853,6 +853,20 @@ TEST_F(VideoDecHidlTest, DecodeTest) {
    status = setPortBufferSize(omxNode, kPortIndexInput, maxBytesCount);
    ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);

    // Change the port modes arbitrarily at the start before finialising on the
    // desired values.
    PortMode dummyPM[] = {
        PortMode::PRESET_BYTE_BUFFER,    PortMode::PRESET_ANW_BUFFER,
        PortMode::PRESET_SECURE_BUFFER,  PortMode::DYNAMIC_ANW_BUFFER,
        PortMode::DYNAMIC_NATIVE_HANDLE,
    };
    for (size_t k = 0; k < sizeof(dummyPM) / sizeof(dummyPM[0]); k++) {
        // ports may or may not support these modes. These are not the final
        // values. This init is done to test if causes any problems.
        status = omxNode->setPortMode(kPortIndexInput, dummyPM[k]);
        status = omxNode->setPortMode(kPortIndexOutput, dummyPM[k]);
    }

    // set port mode
    portMode[0] = PortMode::PRESET_BYTE_BUFFER;
    portMode[1] = PortMode::DYNAMIC_ANW_BUFFER;