Revert "[avf] Adjust IRPC VTS tests to handle AVF in unsupported env"
Revert submission 2778549-expose-avf-rkp-hal
Reason for revert: SELinux denial
avc: denied { find } for pid=3400 uid=10085 name=android.hardware.security.keymint.IRemotelyProvisionedComponent/avf scontext=u:r:rkpdapp:s0:c85,c256,c512,c768 tcontext=u:object_r:avf_remotelyprovisionedcomponent_service:s0 tclass=service_manager permissive=0
Reverted changes: /q/submissionid:2778549-expose-avf-rkp-hal
Bug: 308596709
Change-Id: Id6a930d16949389048713cef20dfa06cdbb9ac95
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index a1de93e..62463eb 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -55,8 +55,6 @@
constexpr uint8_t MIN_CHALLENGE_SIZE = 0;
constexpr uint8_t MAX_CHALLENGE_SIZE = 64;
-const string RKP_VM_INSTANCE_NAME =
- "android.hardware.security.keymint.IRemotelyProvisionedComponent/avf";
#define INSTANTIATE_REM_PROV_AIDL_TEST(name) \
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(name); \
@@ -183,12 +181,7 @@
provisionable_ = IRemotelyProvisionedComponent::fromBinder(binder);
}
ASSERT_NE(provisionable_, nullptr);
- auto status = provisionable_->getHardwareInfo(&rpcHardwareInfo);
- if (GetParam() == RKP_VM_INSTANCE_NAME &&
- status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
- GTEST_SKIP() << "The RKP VM is not supported on this system.";
- }
- ASSERT_TRUE(status.isOk());
+ ASSERT_TRUE(provisionable_->getHardwareInfo(&rpcHardwareInfo).isOk());
}
static vector<string> build_params() {
@@ -214,11 +207,7 @@
ASSERT_NE(rpc, nullptr);
RpcHardwareInfo hwInfo;
- auto status = rpc->getHardwareInfo(&hwInfo);
- if (hal == RKP_VM_INSTANCE_NAME && status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
- GTEST_SKIP() << "The RKP VM is not supported on this system.";
- }
- ASSERT_TRUE(status.isOk());
+ ASSERT_TRUE(rpc->getHardwareInfo(&hwInfo).isOk());
if (hwInfo.versionNumber >= VERSION_WITH_UNIQUE_ID_SUPPORT) {
ASSERT_TRUE(hwInfo.uniqueId);