From 46ff286f6dc30f00f7d715ef771e048e6826a211 Mon Sep 17 00:00:00 2001 From: Alice Wang Date: Tue, 14 May 2024 07:07:05 +0000 Subject: [PATCH] Run VtsHalRemotelyProvisionedComponentTargetTest only on V+ devices Bug: 340188780 Test: atest VtsHalRemotelyProvisionedComponentTargetTest Change-Id: Id20a01b23324eb46620d96bd29c30b8cf9acd162 --- .../VtsRemotelyProvisionedComponentTests.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp index 2a8fd96611..2dbc73f8e3 100644 --- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp +++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp @@ -188,9 +188,15 @@ class VtsRemotelyProvisionedComponentTests : public testing::TestWithParamgetHardwareInfo(&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()); }