From a98d0b0d3cea70d36261cb9cd5aa1205c231b2e6 Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 22 Aug 2024 07:39:32 -0700 Subject: [PATCH] Improve the unit test for PCR select with HASH_COUNT. --- tests/unit_tests.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit_tests.c b/tests/unit_tests.c index 4a08e0b..948ea15 100644 --- a/tests/unit_tests.c +++ b/tests/unit_tests.c @@ -289,7 +289,9 @@ static void test_TPM2_PCRSel(void) TPM2_SetupPCRSelArray(&pcr, TPM_ALG_SHA256, pcrArray, 1); pcrArray[0] = 3; TPM2_SetupPCRSelArray(&pcr, TPM_ALG_SHA384, pcrArray, 1); - if (pcr.count != 2) { + pcrArray[0] = 4; + TPM2_SetupPCRSelArray(&pcr, TPM_ALG_SHA512, pcrArray, 1); + if (pcr.count != HASH_COUNT) { rc = BAD_FUNC_ARG; }