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

Commit 750c8878 authored by Tianyu Jiang's avatar Tianyu Jiang
Browse files

Fix BufferHubBufferTest test crash

Fix: 124377165
Test: BufferHub_test
verified on vega_xr target on oc-dr1-daydream-dev branch.
I cannot reproduce the test failure on master branch locally, although
it exist on the builds on Blackbox dashboard. Anyhow, I am certain about
this fix.

Change-Id: Ic473aae794b2996da1e713cd02a2bfc31cbaab1b
parent 7caa828e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -214,8 +214,8 @@ TEST_F(BufferHubBufferTest, ImportInvalidToken) {
    native_handle_t* token = native_handle_create(/*numFds=*/0, /*numInts=*/1);
    token->data[0] = 0;

    auto b1 = BufferHubBuffer::import(NativeHandle::create(token, /*ownHandle=*/true));
    native_handle_delete(token);
    sp<NativeHandle> tokenHandle = NativeHandle::create(token, /*ownHandle=*/true);
    auto b1 = BufferHubBuffer::import(tokenHandle);

    EXPECT_THAT(b1, IsNull());
}