summaryrefslogtreecommitdiff
path: root/regress/unittests/test_helper/test_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'regress/unittests/test_helper/test_helper.h')
-rw-r--r--regress/unittests/test_helper/test_helper.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/regress/unittests/test_helper/test_helper.h b/regress/unittests/test_helper/test_helper.h
index a398c615f..1d9c66986 100644
--- a/regress/unittests/test_helper/test_helper.h
+++ b/regress/unittests/test_helper/test_helper.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: test_helper.h,v 1.3 2014/05/02 09:41:32 andre Exp $ */ 1/* $OpenBSD: test_helper.h,v 1.6 2015/01/18 19:52:44 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org> 3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
4 * 4 *
@@ -40,8 +40,11 @@ void tests(void);
40 40
41const char *test_data_file(const char *name); 41const char *test_data_file(const char *name);
42void test_start(const char *n); 42void test_start(const char *n);
43void test_info(char *s, size_t len);
43void set_onerror_func(test_onerror_func_t *f, void *ctx); 44void set_onerror_func(test_onerror_func_t *f, void *ctx);
44void test_done(void); 45void test_done(void);
46void test_subtest_info(const char *fmt, ...)
47 __attribute__((format(printf, 1, 2)));
45void ssl_err_check(const char *file, int line); 48void ssl_err_check(const char *file, int line);
46void assert_bignum(const char *file, int line, 49void assert_bignum(const char *file, int line,
47 const char *a1, const char *a2, 50 const char *a1, const char *a2,
@@ -280,6 +283,13 @@ void fuzz_cleanup(struct fuzz *fuzz);
280/* Prepare the next fuzz case in the series */ 283/* Prepare the next fuzz case in the series */
281void fuzz_next(struct fuzz *fuzz); 284void fuzz_next(struct fuzz *fuzz);
282 285
286/*
287 * Check whether this fuzz case is identical to the original
288 * This is slow, but useful if the caller needs to ensure that all tests
289 * generated change the input (e.g. when fuzzing signatures).
290 */
291int fuzz_matches_original(struct fuzz *fuzz);
292
283/* Determine whether the current fuzz sequence is exhausted (nonzero = yes) */ 293/* Determine whether the current fuzz sequence is exhausted (nonzero = yes) */
284int fuzz_done(struct fuzz *fuzz); 294int fuzz_done(struct fuzz *fuzz);
285 295
@@ -289,4 +299,5 @@ u_char *fuzz_ptr(struct fuzz *fuzz);
289 299
290/* Dump the current fuzz case to stderr */ 300/* Dump the current fuzz case to stderr */
291void fuzz_dump(struct fuzz *fuzz); 301void fuzz_dump(struct fuzz *fuzz);
302
292#endif /* _TEST_HELPER_H */ 303#endif /* _TEST_HELPER_H */