mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Add VSR enforcement testing for IRPC versioning.
Check the VSR API level for the device under test and ensure that the appropriate HAL version for the IRemotelyProvisionedComponent interface is present. E.g. a VSR 13 chipset should have IRPC v2 or newer. Bug: 251185719 Test: atest VtsHalRemotelyProvisionedComponentTargetTest Change-Id: I136cac27953d1d5acaa45510ad9efec2a75d8038
This commit is contained in:
@@ -783,4 +783,20 @@ TEST_P(CertificateRequestV2Test, NonEmptyRequest_testKeyInProdCert) {
|
||||
|
||||
INSTANTIATE_REM_PROV_AIDL_TEST(CertificateRequestV2Test);
|
||||
|
||||
using VsrRequirementTest = VtsRemotelyProvisionedComponentTests;
|
||||
|
||||
INSTANTIATE_REM_PROV_AIDL_TEST(VsrRequirementTest);
|
||||
|
||||
TEST_P(VsrRequirementTest, VsrEnforcementTest) {
|
||||
RpcHardwareInfo hwInfo;
|
||||
ASSERT_TRUE(provisionable_->getHardwareInfo(&hwInfo).isOk());
|
||||
int vsr_api_level = get_vsr_api_level();
|
||||
if (vsr_api_level < 34) {
|
||||
GTEST_SKIP() << "Applies only to VSR API level 34 or newer, this device is: "
|
||||
<< vsr_api_level;
|
||||
}
|
||||
EXPECT_GE(hwInfo.versionNumber, 3)
|
||||
<< "VSR 14+ requires IRemotelyProvisionedComponent v3 or newer.";
|
||||
}
|
||||
|
||||
} // namespace aidl::android::hardware::security::keymint::test
|
||||
|
||||
Reference in New Issue
Block a user