summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRam Mohan M <ram.mohan@ittiam.com>2017-10-11 15:38:25 +0530
committerPawin Vongmasa <pawin@google.com>2017-10-17 04:34:30 -0700
commita0698429dd47e2f029866765c6980bc8720a7acb (patch)
tree148aca952162336840b6e7d1441c49440cc4e94e
parent3021f1fafbfb1a4b464effa543aee381f42d8080 (diff)
downloadandroid_hardware_interfaces-a0698429dd47e2f029866765c6980bc8720a7acb.tar.gz
android_hardware_interfaces-a0698429dd47e2f029866765c6980bc8720a7acb.tar.bz2
android_hardware_interfaces-a0698429dd47e2f029866765c6980bc8720a7acb.zip
bug fix: during fatal fails bypass freeNode() calls
If test application undergoes a fatal failure bypass all the omx api calls till the application safely returns. 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: If5a33672a31665db913e53c6f8ba8bea6cfd3ebd
-rw-r--r--media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp4
-rw-r--r--media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp4
-rw-r--r--media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp4
-rw-r--r--media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp4
-rw-r--r--media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp4
5 files changed, 20 insertions, 0 deletions
diff --git a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp
index 9e185f279..38cdcd650 100644
--- a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp
+++ b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp
@@ -230,6 +230,10 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
virtual void TearDown() override {
if (omxNode != nullptr) {
+ // If you have encountered a fatal failure, it is possible that
+ // freeNode() will not go through. Instead of hanging the app.
+ // let it pass through and report errors
+ if (::testing::Test::HasFatalFailure()) return;
EXPECT_TRUE((omxNode->freeNode()).isOk());
omxNode = nullptr;
}
diff --git a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp
index d87244493..953dc7507 100644
--- a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp
+++ b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp
@@ -216,6 +216,10 @@ class AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
virtual void TearDown() override {
if (omxNode != nullptr) {
+ // If you have encountered a fatal failure, it is possible that
+ // freeNode() will not go through. Instead of hanging the app.
+ // let it pass through and report errors
+ if (::testing::Test::HasFatalFailure()) return;
EXPECT_TRUE((omxNode->freeNode()).isOk());
omxNode = nullptr;
}
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 401e54ab9..d66136d21 100644
--- a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
+++ b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
@@ -191,6 +191,10 @@ class ComponentHidlTest : public ::testing::VtsHalHidlTargetTestBase {
virtual void TearDown() override {
if (omxNode != nullptr) {
+ // If you have encountered a fatal failure, it is possible that
+ // freeNode() will not go through. Instead of hanging the app.
+ // let it pass through and report errors
+ if (::testing::Test::HasFatalFailure()) return;
EXPECT_TRUE((omxNode->freeNode()).isOk());
omxNode = nullptr;
}
diff --git a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
index 667c2e124..9b74a339c 100644
--- a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
+++ b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
@@ -232,6 +232,10 @@ class VideoDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
virtual void TearDown() override {
if (omxNode != nullptr) {
+ // If you have encountered a fatal failure, it is possible that
+ // freeNode() will not go through. Instead of hanging the app.
+ // let it pass through and report errors
+ if (::testing::Test::HasFatalFailure()) return;
EXPECT_TRUE((omxNode->freeNode()).isOk());
omxNode = nullptr;
}
diff --git a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp
index 743ff787a..099658f8a 100644
--- a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp
+++ b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp
@@ -243,6 +243,10 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
virtual void TearDown() override {
if (omxNode != nullptr) {
+ // If you have encountered a fatal failure, it is possible that
+ // freeNode() will not go through. Instead of hanging the app.
+ // let it pass through and report errors
+ if (::testing::Test::HasFatalFailure()) return;
EXPECT_TRUE((omxNode->freeNode()).isOk());
omxNode = nullptr;
}