diff options
author | Shawn Willden <swillden@google.com> | 2021-02-19 14:51:51 -0700 |
---|---|---|
committer | Shawn Willden <swillden@google.com> | 2021-03-01 09:29:39 -0700 |
commit | d659c7c1818ea4e41c70de0ff39939e8da8a532c (patch) | |
tree | 7c772fcca97cc467af456a256848928aa6df42c8 /security/keymint/aidl/vts/functional/KeyMintTest.cpp | |
parent | d8541611d7b245a8d82ce7529510b4091aa90a36 (diff) |
Add performOperation stub.
Test: VtsAidlKeyMintTargetTest
Change-Id: I3689fd2993941343c6b9ba503fbe56153742fb3e
Diffstat (limited to 'security/keymint/aidl/vts/functional/KeyMintTest.cpp')
-rw-r--r-- | security/keymint/aidl/vts/functional/KeyMintTest.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp index f8eca6bc36..7ecfa3723f 100644 --- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp +++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp @@ -4633,7 +4633,7 @@ TEST_P(KeyAgreementTest, Ecdh) { INSTANTIATE_KEYMINT_AIDL_TEST(KeyAgreementTest); -typedef KeyMintAidlTestBase EarlyBootKeyTest; +using EarlyBootKeyTest = KeyMintAidlTestBase; TEST_P(EarlyBootKeyTest, CreateEarlyBootKeys) { auto [aesKeyData, hmacKeyData, rsaKeyData, ecdsaKeyData] = @@ -4690,9 +4690,10 @@ TEST_P(EarlyBootKeyTest, DISABLED_FullTest) { CheckedDeleteKey(&rsaKeyData.blob); CheckedDeleteKey(&ecdsaKeyData.blob); } + INSTANTIATE_KEYMINT_AIDL_TEST(EarlyBootKeyTest); -typedef KeyMintAidlTestBase UnlockedDeviceRequiredTest; +using UnlockedDeviceRequiredTest = KeyMintAidlTestBase; // This may be a problematic test. It can't be run repeatedly without unlocking the device in // between runs... and on most test devices there are no enrolled credentials so it can't be @@ -4724,8 +4725,19 @@ TEST_P(UnlockedDeviceRequiredTest, DISABLED_KeysBecomeUnusable) { CheckedDeleteKey(&rsaKeyData.blob); CheckedDeleteKey(&ecdsaKeyData.blob); } + INSTANTIATE_KEYMINT_AIDL_TEST(UnlockedDeviceRequiredTest); +using PerformOperationTest = KeyMintAidlTestBase; + +TEST_P(PerformOperationTest, RequireUnimplemented) { + vector<uint8_t> response; + auto result = keymint_->performOperation({} /* request */, &response); + ASSERT_EQ(GetReturnErrorCode(result), ErrorCode::UNIMPLEMENTED); +} + +INSTANTIATE_KEYMINT_AIDL_TEST(PerformOperationTest); + } // namespace aidl::android::hardware::security::keymint::test int main(int argc, char** argv) { |