Skip to content

Commit c037f4a

Browse files
esyrSashan
authored andcommitted
evp_setpeer: fix -k all
As max_time was initialised only once, the runs after the first one terminated immediately. Move max_time inside the key type loop. Fixes: 7388d62 "Set a constant amount of runtime on more perf tests" Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
1 parent 513dec3 commit c037f4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/evp_setpeer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ int main(int argc, char *argv[])
182182
return EXIT_FAILURE;
183183
}
184184

185-
max_time = ossl_time_add(ossl_time_now(), ossl_seconds2time(RUN_TIME));
186-
187185
counts = OPENSSL_malloc(sizeof(OSSL_TIME) * threadcount);
188186
if (counts == NULL) {
189187
printf("Failed to create counts array\n");
@@ -222,6 +220,8 @@ int main(int argc, char *argv[])
222220
return EXIT_FAILURE;
223221
}
224222

223+
max_time = ossl_time_add(ossl_time_now(), ossl_seconds2time(RUN_TIME));
224+
225225
if (!perflib_run_multi_thread_test(do_setpeer, threadcount, &duration)) {
226226
fprintf(stderr, "Failed to run the test %s\n", sample_names[k]);
227227
EVP_PKEY_free(pkey);

0 commit comments

Comments
 (0)