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

Commit 1eda2be7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixing execute bug in VTS tests for hardware composer"

parents f22f2202 e6683e2b
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