diff options
| author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2019-11-22 21:05:29 +0000 |
|---|---|---|
| committer | android-build-prod (mdb) <android-build-team-robot@google.com> | 2019-11-22 21:05:29 +0000 |
| commit | bd18cfdc06e1d4a90acb96b2da5e9de8b5dfa0b4 (patch) | |
| tree | a584c74b9a1ec5fb0965c5566a397a466bd145ea | |
| parent | c4cd8ed446dbde39df701dab0525e5ef5b9824ec (diff) | |
| parent | 4e46e7d3fe99de2ece1f12b814f9771fba5d137c (diff) | |
| download | platform_system_hardware_interfaces-android10-tests-release.tar.gz platform_system_hardware_interfaces-android10-tests-release.tar.bz2 platform_system_hardware_interfaces-android10-tests-release.zip | |
Snap for 6027181 from 4e46e7d3fe99de2ece1f12b814f9771fba5d137c to android10-tests-releaseandroid-vts-10.0_r9android-vts-10.0_r8android-vts-10.0_r7android-vts-10.0_r6android-vts-10.0_r5android-vts-10.0_r4android-vts-10.0_r3android-vts-10.0_r2android-cts-10.0_r9android-cts-10.0_r8android-cts-10.0_r7android-cts-10.0_r6android-cts-10.0_r5android-cts-10.0_r4android-cts-10.0_r3android10-tests-release
Change-Id: I6b9d869f9625d9a393b1fef344255c693e49e512
| -rw-r--r-- | wifi/keystore/1.0/vts/functional/VtsHalWifiKeystoreV1_0TargetTest.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/wifi/keystore/1.0/vts/functional/VtsHalWifiKeystoreV1_0TargetTest.cpp b/wifi/keystore/1.0/vts/functional/VtsHalWifiKeystoreV1_0TargetTest.cpp index 13a07f89..12096b4d 100644 --- a/wifi/keystore/1.0/vts/functional/VtsHalWifiKeystoreV1_0TargetTest.cpp +++ b/wifi/keystore/1.0/vts/functional/VtsHalWifiKeystoreV1_0TargetTest.cpp @@ -254,21 +254,24 @@ TEST_F(WifiKeystoreHalTest, Sign_empty_data) { GTEST_SKIP() << "Device not running a debuggable build, cannot make test keys"; } - IKeystore::KeystoreStatusCode statusCode; + bool callbackInvoked = false; - auto callback = [&statusCode](IKeystore::KeystoreStatusCode status, - const ::android::hardware::hidl_vec<uint8_t>& /*value*/) { - statusCode = status; + auto callback = [&callbackInvoked](IKeystore::KeystoreStatusCode /*status*/, + const ::android::hardware::hidl_vec<uint8_t>& /*value*/) { + // The result is ignored; this callback is a no-op. + callbackInvoked = true; return; }; bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, AID_WIFI); EXPECT_EQ(result, true); - // The data to sign is empty, and a failure is expected + // The data to sign is empty. The return code is not important, and the attempt could be + // interpreted as valid or an error case. The goal is to determine that the callback + // was invokved. ::android::hardware::hidl_vec<uint8_t> dataToSign; keystore->sign(kTestKeyName, dataToSign, callback); - EXPECT_EQ(IKeystore::KeystoreStatusCode::ERROR_UNKNOWN, statusCode); + EXPECT_EQ(true, callbackInvoked); } TEST_F(WifiKeystoreHalTest, Sign_wrong_key_purpose) { |
