From: Dan Streetman Date: Fri, 14 Jul 2023 15:21:43 +0000 (-0400) Subject: test: reduce the number of loops in tpm2 test_tpms_pcr_selection_mask_and_hash() X-Git-Tag: v254-rc2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4916cc47508219485763712de50fa36332c76b8b;p=thirdparty%2Fsystemd.git test: reduce the number of loops in tpm2 test_tpms_pcr_selection_mask_and_hash() This test loops through masks, but is a relatively long test due to the increment size between loops; this slightly increases the increment size (from 3->5) which greatly speeds up the test. --- diff --git a/src/test/test-tpm2.c b/src/test/test-tpm2.c index 1220e9e3102..9eb9085a590 100644 --- a/src/test/test-tpm2.c +++ b/src/test/test-tpm2.c @@ -218,9 +218,9 @@ TEST(tpms_pcr_selection_mask_and_hash) { TPMI_ALG_HASH HASH_ALGS[] = { TPM2_ALG_SHA1, TPM2_ALG_SHA256, }; for (unsigned i = 0; i < ELEMENTSOF(HASH_ALGS); i++) - for (uint32_t m2 = 0; m2 <= 0xffffff; m2 += 0x30000) - for (uint32_t m1 = 0; m1 <= 0xffff; m1 += 0x300) - for (uint32_t m0 = 0; m0 <= 0xff; m0 += 0x3) + for (uint32_t m2 = 0; m2 <= 0xffffff; m2 += 0x50000) + for (uint32_t m1 = 0; m1 <= 0xffff; m1 += 0x500) + for (uint32_t m0 = 0; m0 <= 0xff; m0 += 0x5) _test_pcr_selection_mask_hash(m0 | m1 | m2, HASH_ALGS[i]); }