Merge "Run VtsHalRemotelyProvisionedComponentTargetTest only on V+ devices" into main am: 938c0177e3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3084447
Change-Id: I5f0198585211bc134dcc914acfc8b6dfd884db4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index 2a8fd96..2dbc73f 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -188,9 +188,15 @@
}
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.";
+ if (GetParam() == RKP_VM_INSTANCE_NAME) {
+ if (status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
+ GTEST_SKIP() << "The RKP VM is not supported on this system.";
+ }
+ int apiLevel = get_vsr_api_level();
+ if (apiLevel < __ANDROID_API_V__) {
+ GTEST_SKIP() << "The RKP VM is supported only on V+ devices. Vendor API level: "
+ << apiLevel;
+ }
}
ASSERT_TRUE(status.isOk());
}