diff options
author | Firas Sammoura <fsammoura@google.com> | 2022-09-02 21:12:19 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-12 17:25:12 +0000 |
commit | b5c0f7c078c94caa75e0303d797b0ec3e589455f (patch) | |
tree | 6ad3393b799687ba96cbb07307223dd8b973809d /include | |
parent | 758c32cb93264f371a945efe5a2d036851202af5 (diff) | |
download | chrome-ec-b5c0f7c078c94caa75e0303d797b0ec3e589455f.tar.gz |
test: Add test for read_match_secret resp error
Add a test for fp_command_read_match_secret when the number of matched
finger is within the allowed range of [0 5[, the state deadline value is
valid, the state is readable with the correct matched finger number, and
and a trivial positive_match_salt. The test should fail with the error
message EC_RES_ERROR.
Add a trivial mock value for the positive_match_salt and a default fake
value for the positive_match_salt in the fpsensor_state_mock library.
BRANCH=None
BUG=b:242720387
TEST=make run-fpsensor_state
TEST=make runhosttests
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Change-Id: I9af4cb13a1b6f63049205cad9684050d5eb1f885
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3872553
Reviewed-by: Bobby Casey <bobbycasey@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/mock/fpsensor_state_mock.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mock/fpsensor_state_mock.h b/include/mock/fpsensor_state_mock.h index 4571a1e987..aad049d8e6 100644 --- a/include/mock/fpsensor_state_mock.h +++ b/include/mock/fpsensor_state_mock.h @@ -11,6 +11,12 @@ #include "ec_commands.h" extern const uint8_t default_fake_tpm_seed[FP_CONTEXT_TPM_BYTES]; +extern const uint8_t + default_fake_fp_positive_match_salt[FP_MAX_FINGER_COUNT] + [FP_POSITIVE_MATCH_SALT_BYTES]; +extern const uint8_t + trivial_fp_positive_match_salt[FP_MAX_FINGER_COUNT] + [FP_POSITIVE_MATCH_SALT_BYTES]; int fpsensor_state_mock_set_tpm_seed( const uint8_t tpm_seed[FP_CONTEXT_TPM_BYTES]); |