summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2019-10-19 16:38:21 +0200
committerTomas Mraz <tmraz@fedoraproject.org>2019-12-09 09:52:02 +0100
commitaf0857f0e7ae46b7c3df2eca496cfcb71f1ff904 (patch)
tree8d8174dc30f6467d46f50779598af0448188536e /apps
parent32745fccdb65c24049a09c93f7170b0236e9893b (diff)
apps/speed: allow to continue tests after any init failure handling.
previouly the exit(1) call was aborting the whole execution. Improve error message. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10078)
Diffstat (limited to 'apps')
-rw-r--r--apps/speed.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/speed.c b/apps/speed.c
index e4b104e9c3..ae6546bf00 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -2396,6 +2396,8 @@ int speed_main(int argc, char **argv)
count = run_benchmark(async_jobs, EVP_Digest_MDC2_loop, loopargs);
d = Time_F(STOP);
print_result(D_MDC2, testnum, count, d);
+ if (count < 0)
+ break;
}
}
#endif
@@ -2409,6 +2411,8 @@ int speed_main(int argc, char **argv)
count = run_benchmark(async_jobs, EVP_Digest_MD4_loop, loopargs);
d = Time_F(STOP);
print_result(D_MD4, testnum, count, d);
+ if (count < 0)
+ break;
}
}
#endif
@@ -2503,6 +2507,8 @@ int speed_main(int argc, char **argv)
count = run_benchmark(async_jobs, EVP_Digest_RMD160_loop, loopargs);
d = Time_F(STOP);
print_result(D_RMD160, testnum, count, d);
+ if (count < 0)
+ break;
}
}
#endif
@@ -3920,8 +3926,10 @@ static void pkey_print_message(const char *str, const char *str2, long num,
static void print_result(int alg, int run_no, int count, double time_used)
{
if (count == -1) {
- BIO_puts(bio_err, "EVP error!\n");
- exit(1);
+ BIO_printf(bio_err, "%s error!\n", names[alg]);
+ ERR_print_errors(bio_err);
+ /* exit(1); disable exit until default provider enabled */
+ return;
}
BIO_printf(bio_err,
mr ? "+R:%d:%s:%f\n"