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

Commit 0f713677 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder: Disable the experimental version for binderRpcToTrustyTest"...

Merge "libbinder: Disable the experimental version for binderRpcToTrustyTest" into main am: 65a53410 am: c11f8a5f

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



Change-Id: I587e7f099b45abc914639454dc46c927ec82d888
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a47327bc c11f8a5f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -74,6 +74,12 @@ static inline std::vector<RpcSecurity> RpcSecurityValues() {
}

static inline bool hasExperimentalRpc() {
#ifdef BINDER_RPC_TO_TRUSTY_TEST
    // Trusty services do not support the experimental version,
    // so that we can update the prebuilts separately.
    // This covers the binderRpcToTrustyTest case on Android.
    return false;
#endif
#ifdef __ANDROID__
    return base::GetProperty("ro.build.version.codename", "") != "REL";
#else
+2 −0
Original line number Diff line number Diff line
@@ -48,11 +48,13 @@ TEST(BinderRpc, CannotUseNextWireVersion) {
    EXPECT_FALSE(session->setProtocolVersion(RPC_WIRE_PROTOCOL_VERSION_NEXT + 15));
}

#ifndef BINDER_RPC_TO_TRUSTY_TEST
TEST(BinderRpc, CanUseExperimentalWireVersion) {
    auto session = RpcSession::make();
    EXPECT_EQ(hasExperimentalRpc(),
              session->setProtocolVersion(RPC_WIRE_PROTOCOL_VERSION_EXPERIMENTAL));
}
#endif

TEST_P(BinderRpc, Ping) {
    auto proc = createRpcTestSocketServerProcess({});