diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-10-17 23:28:05 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-11-22 16:14:31 +1100 |
commit | 35d0e5fefc419bddcbe09d7fc163d8cd3417125b (patch) | |
tree | c47dbf67447dddd82deb0539ce01b574f09a3819 /regress/unittests/sshbuf/test_sshbuf_fuzz.c | |
parent | c1941293d9422a14dda372b4c21895e72aa7a063 (diff) |
upstream: add some knobs:
UNITTEST_FAST?= no # Skip slow tests (e.g. less intensive fuzzing).
UNITTEST_SLOW?= no # Include slower tests (e.g. more intensive fuzzing).
UNITTEST_VERBOSE?= no # Verbose test output (inc. per-test names).
useful if you want to run the tests as a smoke test to exercise the
functionality without waiting for all the fuzzers to run.
OpenBSD-Regress-ID: e04d82ebec86068198cd903acf1c67563c57315e
Diffstat (limited to 'regress/unittests/sshbuf/test_sshbuf_fuzz.c')
-rw-r--r-- | regress/unittests/sshbuf/test_sshbuf_fuzz.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/regress/unittests/sshbuf/test_sshbuf_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_fuzz.c index c52376b5..e236c82f 100644 --- a/regress/unittests/sshbuf/test_sshbuf_fuzz.c +++ b/regress/unittests/sshbuf/test_sshbuf_fuzz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test_sshbuf_fuzz.c,v 1.1 2014/04/30 05:32:00 djm Exp $ */ +/* $OpenBSD: test_sshbuf_fuzz.c,v 1.2 2018/10/17 23:28:05 djm Exp $ */ /* * Regress test for sshbuf.h buffer API * @@ -30,10 +30,15 @@ sshbuf_fuzz_tests(void) { struct sshbuf *p1; u_char *dp; - size_t sz, sz2, i; + size_t sz, sz2, i, ntests = NUM_FUZZ_TESTS; u_int32_t r; int ret; + if (test_is_fast()) + ntests >>= 2; + if (test_is_slow()) + ntests <<= 2; + /* NB. uses sshbuf internals */ TEST_START("fuzz alloc/dealloc"); p1 = sshbuf_new(); |