diff options
author | Jing-yan, Jang <josephjang@google.com> | 2020-10-15 02:54:10 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-10-15 02:54:10 +0000 |
commit | edaef8bea0df399fbf64f44902f3a03c554eca52 (patch) | |
tree | 8b4cb456dc9d295d9c11a031387e14a83d3f1bef /authsecret | |
parent | c5eb4f8b20b5b67c5eb2b720d993282660461b24 (diff) | |
parent | fc9c51d1a4f19a3dc98b687c36dda644869cc4ec (diff) |
Merge "authsecret: Notify LSS to generate secret" into rvc-qpr-dev am: fc9c51d1a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12771635
Change-Id: I8ef34701cd303eb78a8303bd8e3e087fc777aac9
Diffstat (limited to 'authsecret')
-rw-r--r-- | authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp b/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp index 687c70cb88..c09b265c3e 100644 --- a/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp +++ b/authsecret/1.0/vts/functional/VtsHalAuthSecretV1_0TargetTest.cpp @@ -34,11 +34,19 @@ class AuthSecretHidlTest : public testing::TestWithParam<std::string> { authsecret = IAuthSecret::getService(GetParam()); ASSERT_NE(authsecret, nullptr); + // Notify LSS to generate PIN code '1234' and corresponding secret. + (void)system("cmd lock_settings set-pin 1234"); + // All tests must enroll the correct secret first as this cannot be changed // without a factory reset and the order of tests could change. authsecret->primaryUserCredential(CORRECT_SECRET); } + static void TearDownTestSuite() { + // clean up PIN code after testing + (void)system("cmd lock_settings clear --old 1234"); + } + sp<IAuthSecret> authsecret; hidl_vec<uint8_t> CORRECT_SECRET{61, 93, 124, 240, 5, 0, 7, 201, 9, 129, 11, 12, 0, 14, 0, 16}; hidl_vec<uint8_t> WRONG_SECRET{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; |