diff options
author | Shawn Willden <swillden@google.com> | 2021-03-04 00:08:01 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-03-04 00:08:01 +0000 |
commit | 6af85f1552b5ef24d44b17e15e65bc66b74b6f0c (patch) | |
tree | 646eff0b67cf35681eb109edd5adbb8f61603db7 /security/keymint/aidl/vts/functional/KeyMintTest.cpp | |
parent | e0fb8a1ef304a91185d18979669ddafa9d30f8b7 (diff) | |
parent | 0fbf87918dc0607d81d3df47810e166565f39225 (diff) |
Merge "Add performOperation stub." am: 4411dc963c am: 421806ad79 am: 0fbf87918d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1596937
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I1a10ce712cde9410ad6cbcfc05c2ecdafdf57476
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) { |