summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-04-02 02:21:39 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-04-02 02:21:39 +0000
commit0f713677e08e871abe3ebade263447f0e2ee91c3 (patch)
tree9e449313f3f94dfac97079ee17e0eeaf3391d53f
parenta47327bcc96486f622bfef7062b682873f635282 (diff)
parentc11f8a5f59125fcc4cc79ec912bf01ee9d6e70d2 (diff)
Merge "libbinder: Disable the experimental version for binderRpcToTrustyTest" into main am: 65a5341054 am: c11f8a5f59
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3018463 Change-Id: I587e7f099b45abc914639454dc46c927ec82d888 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/binder/tests/binderRpcTestCommon.h6
-rw-r--r--libs/binder/tests/binderRpcUniversalTests.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/libs/binder/tests/binderRpcTestCommon.h b/libs/binder/tests/binderRpcTestCommon.h
index 62fe9e56f6..8832f1a6ba 100644
--- a/libs/binder/tests/binderRpcTestCommon.h
+++ b/libs/binder/tests/binderRpcTestCommon.h
@@ -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
diff --git a/libs/binder/tests/binderRpcUniversalTests.cpp b/libs/binder/tests/binderRpcUniversalTests.cpp
index 885bb45d82..f4807806ad 100644
--- a/libs/binder/tests/binderRpcUniversalTests.cpp
+++ b/libs/binder/tests/binderRpcUniversalTests.cpp
@@ -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({});