From: FdaSilvaYY Date: Sat, 19 Oct 2019 14:38:21 +0000 (+0200) Subject: apps/speed: allow to continue tests after any init failure handling. X-Git-Tag: openssl-3.0.0-alpha1~852 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=af0857f0e7ae46b7c3df2eca496cfcb71f1ff904;p=oweals%2Fopenssl.git 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 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/10078) --- 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"