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

Commit 2437b322 authored by Sherry Yang's avatar Sherry Yang
Browse files

Add test to open and close with no mmap



Add a test to check that alloc->buffers
is properly initialized when calling
close after open with no mmap.

Bug: 36007193
Test: run binderDriverInterfaceTest
Change-Id: I94af8499e65714b1b09ac063459eacf05504262a
Signed-off-by: default avatarSherry Yang <sherryy@android.com>
parent 74a871ae
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -139,6 +139,12 @@ TEST_F(BinderDriverInterfaceTest, Version) {
    ASSERT_EQ(BINDER_CURRENT_PROTOCOL_VERSION, version.protocol_version);
}

TEST_F(BinderDriverInterfaceTest, OpenNoMmap) {
    int binderFd = open(BINDER_DEV_NAME, O_RDWR | O_NONBLOCK | O_CLOEXEC);
    ASSERT_GE(binderFd, 0);
    close(binderFd);
}

TEST_F(BinderDriverInterfaceTest, WriteReadNull) {
    binderTestIoctlErr1(BINDER_WRITE_READ, NULL, EFAULT);
}