From 111feb10cab44da63e8931514c83fae9bae9cbfb Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Mon, 14 Jun 2021 11:29:21 -0700 Subject: [PATCH] Increase test coverage The VTS Gatekeeper tests never triggered a case where GateKeeper::DoVerify() failed, so add a test that does that. Bug: 160731903 Test: run test with instrumented build Change-Id: Ibcc51371e496f893c18ed9e8cdc53dfef8f4e4ad --- .../1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp b/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp index 7d32ced588..618624e1d4 100644 --- a/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp +++ b/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp @@ -236,6 +236,10 @@ TEST_P(GatekeeperHidlTest, VerifySuccess) { generatePassword(password, 0); enrollNewPassword(password, enrollRsp, true); verifyPassword(password, enrollRsp.data, 1, verifyRsp, true); + + ALOGI("Testing unenrolled password doesn't verify"); + generatePassword(password, 1); + verifyPassword(password, enrollRsp.data, 1, verifyRsp, false); ALOGI("Testing Enroll+Verify done"); }