diff options
author | Richard Levitte <levitte@openssl.org> | 2017-04-28 14:37:19 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-04-28 15:59:46 +0200 |
commit | 579d0fabcddb4a0ec4307be420f0bc7c2eea6b7c (patch) | |
tree | 727c517e198f387031b228b4154cbb02e9c18cae /test/testutil | |
parent | Add checks on return code when applying some settings. (diff) | |
download | openssl-579d0fabcddb4a0ec4307be420f0bc7c2eea6b7c.tar.xz openssl-579d0fabcddb4a0ec4307be420f0bc7c2eea6b7c.zip |
testutil: Move printing function declarations to "internal" header
These functions aren't meant to be used directly by the test programs,
reflect that by making the declarations a little harder to reach, but
still available enough if there's a need to override them.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3345)
Diffstat (limited to 'test/testutil')
-rw-r--r-- | test/testutil/basic_output.c | 1 | ||||
-rw-r--r-- | test/testutil/driver.c | 1 | ||||
-rw-r--r-- | test/testutil/output.h | 30 | ||||
-rw-r--r-- | test/testutil/test_main.c | 1 | ||||
-rw-r--r-- | test/testutil/tests.c | 1 |
5 files changed, 34 insertions, 0 deletions
diff --git a/test/testutil/basic_output.c b/test/testutil/basic_output.c index 9080aaec37..8cf5def714 100644 --- a/test/testutil/basic_output.c +++ b/test/testutil/basic_output.c @@ -8,6 +8,7 @@ */ #include "../testutil.h" +#include "output.h" #include <openssl/crypto.h> #include <openssl/bio.h> diff --git a/test/testutil/driver.c b/test/testutil/driver.c index 29c97a9912..7914ea5201 100644 --- a/test/testutil/driver.c +++ b/test/testutil/driver.c @@ -8,6 +8,7 @@ */ #include "../testutil.h" +#include "output.h" #include <string.h> #include <assert.h> diff --git a/test/testutil/output.h b/test/testutil/output.h new file mode 100644 index 0000000000..5e7d8c0954 --- /dev/null +++ b/test/testutil/output.h @@ -0,0 +1,30 @@ +/* + * Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_TU_OUTPUT_H +# define HEADER_TU_OUTPUT_H + +#include <stdarg.h> + +/* + * The basic I/O functions used internally by the test framework. These + * can be overriden when needed. Note that if one is, then all must be. + */ +void test_open_streams(void); +void test_close_streams(void); +/* The following ALL return the number of characters written */ +int test_puts_stdout(const char *str); +int test_puts_stderr(const char *str); +int test_vprintf_stdout(const char *fmt, va_list ap); +int test_vprintf_stderr(const char *fmt, va_list ap); +/* These return failure or success */ +int test_flush_stdout(void); +int test_flush_stderr(void); + +#endif /* HEADER_TU_OUTPUT_H */ diff --git a/test/testutil/test_main.c b/test/testutil/test_main.c index 0152421fe1..7c9843c01c 100644 --- a/test/testutil/test_main.c +++ b/test/testutil/test_main.c @@ -8,6 +8,7 @@ */ #include "../testutil.h" +#include "output.h" #include <stdio.h> diff --git a/test/testutil/tests.c b/test/testutil/tests.c index 67b20a572c..b7f5bfb2a1 100644 --- a/test/testutil/tests.c +++ b/test/testutil/tests.c @@ -8,6 +8,7 @@ */ #include "../testutil.h" +#include "output.h" #include <string.h> #include "../../e_os.h" |