From: Dr. David von Oheimb Date: Thu, 7 May 2026 19:43:15 +0000 (+0200) Subject: cmp_client_test.c: fix partly too generous total_timeout limit for IR session with... X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=bbe79162792feee8b2d9b5efbeef6d37526271bb;p=thirdparty%2Fopenssl.git cmp_client_test.c: fix partly too generous total_timeout limit for IR session with polling Reviewed-by: Eugene Syromiatnikov Reviewed-by: Norbert Pocs MergeDate: Wed Jun 10 06:46:36 2026 (Merged from https://github.com/openssl/openssl/pull/31111) --- diff --git a/test/cmp_client_test.c b/test/cmp_client_test.c index 7e3ab256e60..cd51d3d0e77 100644 --- a/test/cmp_client_test.c +++ b/test/cmp_client_test.c @@ -254,7 +254,9 @@ static int test_exec_REQ_ses_poll(int req_type, int check_after, return result; } -static int checkAfter = 1; +static const int checkAfter = 1; +static const int pollCount = 3; + static int test_exec_IR_ses_poll_ok(void) { return test_exec_REQ_ses_poll(OSSL_CMP_PKIBODY_IR, checkAfter, 2, 0, @@ -272,7 +274,7 @@ static int test_exec_IR_ses_poll_no_timeout(void) static int test_exec_IR_ses_poll_total_timeout(void) { return test_exec_REQ_ses_poll(OSSL_CMP_PKIBODY_IR, checkAfter, - 3 /* pollCount */, checkAfter + 4, + pollCount, (pollCount - 1) * checkAfter, OSSL_CMP_PKISTATUS_trans); } @@ -482,7 +484,7 @@ static int test_exec_GENM_ses_poll_no_timeout(void) static int test_exec_GENM_ses_poll_total_timeout(void) { return test_exec_REQ_ses_poll(OSSL_CMP_PKIBODY_GENM, checkAfter, - 3 /* pollCount */, checkAfter + 2, + pollCount, (pollCount - 1) * checkAfter, OSSL_CMP_PKISTATUS_trans); }