summaryrefslogtreecommitdiffstats
path: root/test/errtest.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-07-24 13:25:56 +0200
committerRichard Levitte <levitte@openssl.org>2019-07-31 06:44:45 +0200
commitadd8c8e9647a71cc755dea22490e2075e342624b (patch)
tree5189711696c4c1b4bc9d6357fbfa00854012ae76 /test/errtest.c
parented57f7f93508776b898e4c23b65d67f3479edaf1 (diff)
ERR: Remove ERR_put_func_error() and reimplement ERR_put_error() as a macro
Also, deprecate ERR_put_error() Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9452)
Diffstat (limited to 'test/errtest.c')
-rw-r--r--test/errtest.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/errtest.c b/test/errtest.c
index 88ff860092..1a18335b6e 100644
--- a/test/errtest.c
+++ b/test/errtest.c
@@ -47,12 +47,14 @@ static int vdata_appends(void)
/* Test that setting a platform error sets the right values. */
static int platform_error(void)
{
- const char *file = __FILE__, *f, *data;
- const int line = __LINE__;
+ const char *file, *f, *data;
+ int line;
int l;
unsigned long e;
- ERR_put_func_error(ERR_LIB_SYS, "exit", ERR_R_INTERNAL_ERROR, file, line);
+ file = __FILE__;
+ line = __LINE__ + 1; /* The error is generated on the next line */
+ FUNCerr("exit", ERR_R_INTERNAL_ERROR);
if (!TEST_ulong_ne(e = ERR_get_error_line_data(&f, &l, &data, NULL), 0)
|| !TEST_int_eq(ERR_GET_REASON(e), ERR_R_INTERNAL_ERROR)
|| !TEST_int_eq(l, line)