From c476ff3857857cc1c62bc93b59846f480f87b547 Mon Sep 17 00:00:00 2001 From: Daniel Cardenas Date: Fri, 2 Mar 2018 17:10:45 -0800 Subject: [PATCH] Increase default timeout for changeStateIdletoExecute() from 100ms to 400ms Bug: 70933963 Test: vts-tradefed run vts -m VtsHalMediaOmxV1_0Host Change-Id: I2f01b5fcd72b03148750589a8eabbc8037f61e6f --- .../1.0/vts/functional/common/media_hidl_test_common.cpp | 2 +- .../omx/1.0/vts/functional/common/media_hidl_test_common.h | 2 ++ .../component/VtsHalMediaOmxV1_0TargetComponentTest.cpp | 6 ++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp index 29be2a09b3..f299e36f23 100644 --- a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp +++ b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp @@ -492,7 +492,7 @@ void changeStateIdletoExecute(sp omxNode, status = omxNode->sendCommand(toRawCommandType(OMX_CommandStateSet), OMX_StateExecuting); ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK); - status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT); + status = observer->dequeueMessage(&msg, RELAXED_TIMEOUT); ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK); ASSERT_EQ(msg.type, Message::Type::EVENT); ASSERT_EQ(msg.data.eventData.event, OMX_EventCmdComplete); diff --git a/media/omx/1.0/vts/functional/common/media_hidl_test_common.h b/media/omx/1.0/vts/functional/common/media_hidl_test_common.h index c276ad3829..42d9e2a5b1 100644 --- a/media/omx/1.0/vts/functional/common/media_hidl_test_common.h +++ b/media/omx/1.0/vts/functional/common/media_hidl_test_common.h @@ -41,6 +41,8 @@ /* As component is switching states (loaded<->idle<->execute), dequeueMessage() * expects the events to be received within this duration */ #define DEFAULT_TIMEOUT 150000 +// b/70933963 +#define RELAXED_TIMEOUT 400000 /* Time interval between successive Input/Output enqueues */ #define DEFAULT_TIMEOUT_Q 2000 /* While the component is amidst a process call, asynchronous commands like diff --git a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp index 2223583740..1c1d39b4e0 100644 --- a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp +++ b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp @@ -1165,15 +1165,13 @@ TEST_F(ComponentHidlTest, PortEnableDisable_Execute) { ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK); // do not enable the port until all the buffers are supplied - status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, - &pBuffer[0], &pBuffer[1]); + status = observer->dequeueMessage(&msg, RELAXED_TIMEOUT, &pBuffer[0], &pBuffer[1]); ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT); ASSERT_NO_FATAL_FAILURE(allocatePortBuffers( omxNode, &pBuffer[i - portBase], i, portMode[i - portBase])); - status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, - &pBuffer[0], &pBuffer[1]); + status = observer->dequeueMessage(&msg, RELAXED_TIMEOUT, &pBuffer[0], &pBuffer[1]); ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK); ASSERT_EQ(msg.type, Message::Type::EVENT); ASSERT_EQ(msg.data.eventData.data1, OMX_CommandPortEnable);