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

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

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
parent 3021f1fa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
        }
+4 −0
Original line number Diff line number Diff line
@@ -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;
        }
+4 −0
Original line number Diff line number Diff line
@@ -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;
        }
+4 −0
Original line number Diff line number Diff line
@@ -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;
        }
+4 −0
Original line number Diff line number Diff line
@@ -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;
        }