[openssl] master update
shane.lontis at oracle.com
shane.lontis at oracle.com
Thu May 28 04:19:24 UTC 2020
The branch master has been updated
via 3d518d3d813da40195ff9fe5f4567ab9f09ddcc9 (commit)
from bac8d066a595454e3f4a75e6e155a9d5b99ce4ea (commit)
- Log -----------------------------------------------------------------
commit 3d518d3d813da40195ff9fe5f4567ab9f09ddcc9
Author: Shane Lontis <shane.lontis at oracle.com>
Date: Wed May 27 12:10:52 2020 +1000
Fix errtest for older compilers
Some older compilers use "unknown function" if they dont support __func, so the
test using ERR_PUT_error needed to compensate for this when comparing against the
expected value.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11967)
-----------------------------------------------------------------------
Summary of changes:
test/errtest.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/errtest.c b/test/errtest.c
index cc2f6612d1..9adf4ca917 100644
--- a/test/errtest.c
+++ b/test/errtest.c
@@ -10,6 +10,7 @@
#include <string.h>
#include <openssl/opensslconf.h>
#include <openssl/err.h>
+#include <openssl/macros.h>
#include "testutil.h"
@@ -24,17 +25,20 @@
static int test_print_error_format(void)
{
- static const char expected[] =
- ":error::system library:test_print_error_format:Operation not permitted:"
+ static const char expected_format[] =
+ ":error::system library:%s:Operation not permitted:"
# ifndef OPENSSL_NO_FILENAMES
"errtest.c:30:";
# else
":0:";
# endif
+ char expected[256];
char *out = NULL, *p = NULL;
int ret = 0, len;
BIO *bio = NULL;
+ BIO_snprintf(expected, sizeof(expected), expected_format, OPENSSL_FUNC);
+
if (!TEST_ptr(bio = BIO_new(BIO_s_mem())))
return 0;
More information about the openssl-commits
mailing list