From e3caaf2dca61716c450cc651b9c75bcfc87c3e0c Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Wed, 12 Jan 2022 14:46:56 -0800 Subject: binderRpcTest: BinderRpc.Java skip on user builds. Checks ro.build.type and assert failure on user builds. Test: forrest Fixes: 212650888 Change-Id: Id381916726f4f2a80edd23c1e534ebbbe3016e4c --- libs/binder/tests/binderRpcTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/binder/tests/binderRpcTest.cpp b/libs/binder/tests/binderRpcTest.cpp index ca68b99e35..c2639e7c67 100644 --- a/libs/binder/tests/binderRpcTest.cpp +++ b/libs/binder/tests/binderRpcTest.cpp @@ -1517,10 +1517,11 @@ TEST(BinderRpc, Java) { auto keepAlive = sp::make(); auto setRpcClientDebugStatus = binder->setRpcClientDebug(std::move(socket), keepAlive); - if (!android::base::GetBoolProperty("ro.debuggable", false)) { + if (!android::base::GetBoolProperty("ro.debuggable", false) || + android::base::GetProperty("ro.build.type", "") == "user") { ASSERT_EQ(INVALID_OPERATION, setRpcClientDebugStatus) - << "setRpcClientDebug should return INVALID_OPERATION on non-debuggable builds, " - "but get " + << "setRpcClientDebug should return INVALID_OPERATION on non-debuggable or user " + "builds, but get " << statusToString(setRpcClientDebugStatus); GTEST_SKIP(); } -- cgit v1.2.3-59-g8ed1b