summaryrefslogtreecommitdiff
path: root/src/test/testing_common.c
AgeCommit message (Collapse)Author
2016-09-09Chop another ~93 RSA key generations out of the unit testsNick Mathewson
We have a mock for our RSA key generation function, so we now wire it to pk_generate(). This covers all the cases that were not using pk_generate() before -- all ~93 of them.
2016-09-09Move the donna-fuzzing tests into test_slow.Nick Mathewson
This shaves another 3-4 seconds off the main-path tests for me, which is again worth it, according to XKCD#1204.
2016-09-09Re-enable RSA cacheing in tests, with a better design.Nick Mathewson
This makes tests faster and saves about 6 seconds for me, which makes it worth it, according to https://xkcd.com/1205.
2016-09-08Treat all nonfatal assertion failures as unit test failures.Nick Mathewson
Part of 19999.
2016-08-31Actually, always monotime_init() in the unit tests.Nick Mathewson
2016-08-31Always log [bug] warnings from the unit tests.Nick Mathewson
We should consider them bugs. If they are happening intentionally, we should use the log_test_helpers code to capture and suppress them. But having them off-by-default has potential to cause programming errors.
2016-06-11Add -Wmissing-variable-declarations, with attendant fixesNick Mathewson
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
2016-05-16Initialize networking _before_ initializing libevent in the testsNick Mathewson
This prevents WSANOTINITIALISED errors and fixes bug 18668. Bugfix on 0.2.8.1-alpha -- 1bac468882fd732460d8a25735131 specifically.
2016-02-27Update the copyright year.Nick Mathewson
2016-02-11Merge branch 'check_log_mutex_uncherrypicked'Nick Mathewson
2016-02-11Initialise logging before trying to use it in unit teststeor (Tim Wilson-Brown)
2016-02-04Fix two problems in the 0.2.8.x unit testsNick Mathewson
1. We were sometimes using libevent uninitialized, which is Not Allowed. 2. The malformed-PTR dns test was supposed to get a -1 output... but the test was wrong, since it forgot that in-addr.arpa addresses are in reverse order. Bugs not in any released tor.
2015-12-15Fix some memory leaks in the unit testsNick Mathewson
2015-11-25Make crypto_seed_rng() and crypto_rand() less scary.Nick Mathewson
These functions must really never fail; so have crypto_rand() assert that it's working okay, and have crypto_seed_rng() demand that callers check its return value. Also have crypto_seed_rng() check RAND_status() before returning.
2015-08-18Refactor initialization logic for control-event-queueNick Mathewson
This puts the init logic in a separate function, which we will need once we have locking.
2015-05-20Merge branch 'bug16034_no_more_openssl_098_squashed'Nick Mathewson
Conflicts: src/test/testing_common.c
2015-05-20Now that OpenSSL 0.9.8 is dead, crypto_seed_rng() needs no argsNick Mathewson
It needed an argument before because it wasn't safe to call RAND_poll() on openssl 0.9.8c if you had already opened more fds than would fit in fd_set.
2015-03-14Remove DynamicDHGroups as obsoleted by PluggableTransports or P256.Nick Mathewson
Closes ticket 13736.
2015-03-09testing_common.c: avoid side-effects of tor_assertTom van der Woerdt
2015-01-23Split the slow unit tests into their own binaryNick Mathewson
This can run in parallel with the faster ones and the other tests.