#include "output.h"
#include "tu_local.h"
+#include <errno.h>
#include <string.h>
#include <ctype.h>
#include "../../e_os.h"
const char *left, const char *right,
const char *op)
{
- test_printf_stderr("%*s# %s: ", subtest_level(), "",
- prefix != NULL ? prefix : "ERROR");
+ test_printf_stderr("%s: ", prefix != NULL ? prefix : "ERROR");
if (type)
test_printf_stderr("(%s) ", type);
if (op != NULL) {
{
test_fail_message_prefix(prefix, file, line, type, left, right, op);
if (fmt != NULL) {
- test_printf_stderr("%*s# ", subtest_level(), "");
test_vprintf_stderr(fmt, ap);
test_printf_stderr("\n");
}
test_printf_stderr("\n");
}
+void test_perror(const char *s)
+{
+ /*
+ * Using openssl_strerror_r causes linking issues since it isn't
+ * exported from libcrypto.so
+ */
+ TEST_error("%s: %s", s, strerror(errno));
+}
+
void test_note(const char *fmt, ...)
{
if (fmt != NULL) {
va_list ap;
- test_printf_stderr("%*s# ", subtest_level(), "");
va_start(ap, fmt);
test_vprintf_stderr(fmt, ap);
va_end(ap);
void test_openssl_errors(void)
{
ERR_print_errors_cb(openssl_error_cb, NULL);
+ ERR_clear_error();
}
/*