summaryrefslogtreecommitdiffstats
path: root/test/evp_test.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2017-04-30 20:38:39 -0400
committerRich Salz <rsalz@openssl.org>2017-05-11 11:28:29 -0400
commit412486070fd044fa67d8cfd0a195a9f2a572145a (patch)
treea30b228a3a2e58cb95f637c71f989ce6ed0725d3 /test/evp_test.c
parent6c5943c9f619fdad08b8c6d01b12bd500a6c605a (diff)
Address some feedback
Report test detail error. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3324)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r--test/evp_test.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index 0d5de4d5b3..f5b0a1af72 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -416,7 +416,8 @@ static int run_and_get_next(EVP_TEST *t, const EVP_TEST_METHOD *tmeth)
if (t->meth) {
t->ntests++;
if (t->skip) {
- TEST_info("Line %d skipped %s test", t->start_line, t->meth->name);
+ /*TEST_info("Line %d skipped %s test", t->start_line, t->meth->name);
+ */
t->nskip++;
} else {
/* run the test */
@@ -425,8 +426,7 @@ static int run_and_get_next(EVP_TEST *t, const EVP_TEST_METHOD *tmeth)
return 0;
}
if (!check_test_error(t)) {
- if (t->err)
- ERR_print_errors_fp(stderr);
+ test_openssl_errors();
t->errors++;
}
}
@@ -1265,12 +1265,15 @@ static int mac_test_run(EVP_TEST *t)
t->err = "DIGESTSIGNFINAL_LENGTH_ERROR";
goto err;
}
- if (!TEST_ptr(mac = OPENSSL_malloc(mac_len))
- || !EVP_DigestSignFinal(mctx, mac, &mac_len)
- || !TEST_mem_eq(mdata->output, mdata->output_len, mac, mac_len)) {
+ if (!TEST_ptr(mac = OPENSSL_malloc(mac_len))) {
t->err = "TEST_FAILURE";
goto err;
}
+ if (!EVP_DigestSignFinal(mctx, mac, &mac_len)
+ || !TEST_mem_eq(mdata->output, mdata->output_len, mac, mac_len)) {
+ t->err = "TEST_MAC_ERR";
+ goto err;
+ }
t->err = NULL;
err: