test_helper.h (294328) | test_helper.h (294332) |
---|---|
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/* 3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 25 unchanged lines hidden (view full) --- 35}; 36typedef void (test_onerror_func_t)(void *); 37 38/* Supplied by test suite */ 39void tests(void); 40 41const char *test_data_file(const char *name); 42void test_start(const char *n); | 2/* 3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org> 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 25 unchanged lines hidden (view full) --- 35}; 36typedef void (test_onerror_func_t)(void *); 37 38/* Supplied by test suite */ 39void tests(void); 40 41const char *test_data_file(const char *name); 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 test_done(void); | 44void set_onerror_func(test_onerror_func_t *f, void *ctx); 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); 46void assert_bignum(const char *file, int line, 47 const char *a1, const char *a2, 48 const BIGNUM *aa1, const BIGNUM *aa2, enum test_predicate pred); 49void assert_string(const char *file, int line, 50 const char *a1, const char *a2, 51 const char *aa1, const char *aa2, enum test_predicate pred); 52void assert_mem(const char *file, int line, --- 222 unchanged lines hidden (view full) --- 275struct fuzz *fuzz_begin(u_int strategies, const void *p, size_t l); 276 277/* Free a fuzz context */ 278void fuzz_cleanup(struct fuzz *fuzz); 279 280/* Prepare the next fuzz case in the series */ 281void fuzz_next(struct fuzz *fuzz); 282 | 48void ssl_err_check(const char *file, int line); 49void assert_bignum(const char *file, int line, 50 const char *a1, const char *a2, 51 const BIGNUM *aa1, const BIGNUM *aa2, enum test_predicate pred); 52void assert_string(const char *file, int line, 53 const char *a1, const char *a2, 54 const char *aa1, const char *aa2, enum test_predicate pred); 55void assert_mem(const char *file, int line, --- 222 unchanged lines hidden (view full) --- 278struct fuzz *fuzz_begin(u_int strategies, const void *p, size_t l); 279 280/* Free a fuzz context */ 281void fuzz_cleanup(struct fuzz *fuzz); 282 283/* Prepare the next fuzz case in the series */ 284void fuzz_next(struct fuzz *fuzz); 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) */ 284int fuzz_done(struct fuzz *fuzz); 285 286/* Return the length and a pointer to the current fuzzed case */ 287size_t fuzz_len(struct fuzz *fuzz); 288u_char *fuzz_ptr(struct fuzz *fuzz); 289 290/* Dump the current fuzz case to stderr */ 291void fuzz_dump(struct fuzz *fuzz); | 293/* Determine whether the current fuzz sequence is exhausted (nonzero = yes) */ 294int fuzz_done(struct fuzz *fuzz); 295 296/* Return the length and a pointer to the current fuzzed case */ 297size_t fuzz_len(struct fuzz *fuzz); 298u_char *fuzz_ptr(struct fuzz *fuzz); 299 300/* Dump the current fuzz case to stderr */ 301void fuzz_dump(struct fuzz *fuzz); |
302 |
|
292#endif /* _TEST_HELPER_H */ | 303#endif /* _TEST_HELPER_H */ |