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

Commit 61ec20f4 authored by Devin Moore's avatar Devin Moore Committed by Automerger Merge Worker
Browse files

Merge "Revert "Revert "Testing AIDL delegator class with RPC""" am: 70adbc5f...

Merge "Revert "Revert "Testing AIDL delegator class with RPC""" am: 70adbc5f am: e89f896b am: 24469903 am: 1007b621 am: 646bd286

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1859613

Change-Id: Ie5b4b029cc9d5f8cff4f9fdc922d11a093eb85a1
parents 52031f30 646bd286
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1307,6 +1307,16 @@ TEST_P(BinderRpc, Fds) {
    ASSERT_EQ(beforeFds, countFds()) << (system("ls -l /proc/self/fd/"), "fd leak?");
}

TEST_P(BinderRpc, AidlDelegatorTest) {
    auto proc = createRpcTestSocketServerProcess({});
    auto myDelegator = sp<IBinderRpcTestDelegator>::make(proc.rootIface);
    ASSERT_NE(nullptr, myDelegator);

    std::string doubled;
    EXPECT_OK(myDelegator->doubleString("cool ", &doubled));
    EXPECT_EQ("cool cool ", doubled);
}

static bool testSupportVsockLoopback() {
    // We don't need to enable TLS to know if vsock is supported.
    unsigned int vsockPort = allocateVsockPort();