diff options
author | Shawn Willden <swillden@google.com> | 2022-06-02 14:04:33 -0600 |
---|---|---|
committer | Shawn Willden <swillden@google.com> | 2022-06-06 17:13:01 +0000 |
commit | 8292bc9292e21b88cd6df77a3dc0969b349a4264 (patch) | |
tree | 03566cf932c8d8f9afb0aa07432bec468ac3612c /security/keymint/aidl/vts/functional/KeyMintTest.cpp | |
parent | e8919888ad3ece2d0587272487f231fc6450ad1e (diff) |
Implement KeyMint2 test for VSR13
Test: VtsAidlKeyMintTargetTest & VtsHalKeymasterV4_0TargetTest
Bug: 235099905
Ignore-AOSP-First: Cherry pick from aosp/2115214
Change-Id: Ie10b705bb06990a2a2c6223fcce28f5fde6bf3f3
Merged-In: Ie10b705bb06990a2a2c6223fcce28f5fde6bf3f3
Diffstat (limited to 'security/keymint/aidl/vts/functional/KeyMintTest.cpp')
-rw-r--r-- | security/keymint/aidl/vts/functional/KeyMintTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp index 3c2bece4af..4e746b2bb9 100644 --- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp +++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp @@ -7991,6 +7991,18 @@ TEST_P(UnlockedDeviceRequiredTest, DISABLED_KeysBecomeUnusable) { INSTANTIATE_KEYMINT_AIDL_TEST(UnlockedDeviceRequiredTest); +using VsrRequirementTest = KeyMintAidlTestBase; + +TEST_P(VsrRequirementTest, Vsr13Test) { + int vsr_api_level = get_vsr_api_level(); + if (vsr_api_level < 33) { + GTEST_SKIP() << "Applies only to VSR API level 33, this device is: " << vsr_api_level; + } + EXPECT_GE(AidlVersion(), 2) << "VSR 13+ requires KeyMint version 2"; +} + +INSTANTIATE_KEYMINT_AIDL_TEST(VsrRequirementTest); + } // namespace aidl::android::hardware::security::keymint::test int main(int argc, char** argv) { |