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

Commit e6683e2b authored by Valerie Hau's avatar Valerie Hau
Browse files

Fixing execute bug in VTS tests for hardware composer

Bug: 113532117
Test: ./VtsHalGraphicsComposerV2_1TargetTest &&
./VtsHalGraphicsComposerV2_2TargetTest
Change-Id: I5c3485d45c798c40377e4567ab14cce667dd17ea
parent c93640c1
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -293,7 +293,6 @@ void ComposerClient::execute(TestCommandReader* reader, CommandWriterBase* write
    if (queueChanged) {
        auto ret = mClient->setInputCommandQueue(*writer->getMQDescriptor());
        ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
        return;
    }

    mClient->executeCommands(commandLength, commandHandles,
+3 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ namespace V2_1 {
namespace vts {

void TestCommandReader::parse() {
    mErrors.clear();
    mCompositionChanges.clear();
    while (!isEmpty()) {
        IComposerClient::Command command;
@@ -41,7 +42,8 @@ void TestCommandReader::parse() {
                ASSERT_EQ(2, length);
                auto loc = read();
                auto err = readSigned();
                GTEST_FAIL() << "unexpected error " << err << " at location " << loc;
                std::pair<uint32_t, uint32_t> error(loc, err);
                mErrors.push_back(error);
            } break;
            case IComposerClient::Command::SET_CHANGED_COMPOSITION_TYPES:
                ASSERT_EQ(0, length % 3);
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ class TestCommandReader : public CommandReaderBase {
    // unexpected errors or commands.
    void parse();

    std::vector<std::pair<uint32_t, uint32_t>> mErrors;
    std::vector<std::pair<uint64_t, uint32_t>> mCompositionChanges;
};

+4 −1
Original line number Diff line number Diff line
@@ -672,7 +672,10 @@ class GraphicsComposerHidlCommandTest : public GraphicsComposerHidlTest {
        mReader = std::make_unique<TestCommandReader>();
    }

    void TearDown() override { ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::TearDown()); }
    void TearDown() override {
        ASSERT_EQ(0, mReader->mErrors.size());
        ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::TearDown());
    }

    const native_handle_t* allocate() {
        IMapper::BufferDescriptorInfo info{};
+0 −1
Original line number Diff line number Diff line
@@ -68,7 +68,6 @@ void ComposerClient::execute(V2_1::vts::TestCommandReader* reader, CommandWriter
    if (queueChanged) {
        auto ret = mClient->setInputCommandQueue(*writer->getMQDescriptor());
        ASSERT_EQ(Error::NONE, static_cast<Error>(ret));
        return;
    }

    mClient->executeCommands(commandLength, commandHandles,
Loading