Nick Mathewson
8fdf2f583c
Unit tests for proposal 271 client-side implementation
2016-09-13 09:45:55 -04:00
Nick Mathewson
20c4b01694
Make preferred_chunk_size avoid overflow, handle big inputs better
...
Also, add tests for the function.
Closes 20081; bugfix on 0.2.0.16-alpha. This is a Guido Vranken
issue. Thanks, Guido!
2016-09-13 09:07:12 -04:00
Nick Mathewson
d5d29cd5a2
Whoops. Cant call sockaddr_in a "sin", since sin() is a thing.
2016-09-11 17:59:25 -04:00
Nick Mathewson
ccea2a5aa9
Fix gmtime unit test on openbsd
...
openbsd helpfully handles gmtime() of INT64_MIN. Good job!
Our tests didn't handle that so well.
2016-09-11 17:43:20 -04:00
Nick Mathewson
c6e70dacb8
Try to make our ersatz-socketpair test work better on FreeBSD jails
2016-09-11 17:28:29 -04:00
Nick Mathewson
a671a1c9d6
Tweak tor_gmtime_r test.
...
On openbsd64, I'm seeing a warning that the log isn't saying what
I'd expect, but I'm not seeing what the answer actually _is_ here.
2016-09-11 17:13:51 -04:00
Nick Mathewson
64521a9d35
Merge remote-tracking branch 'public/solaris_warnings_028'
2016-09-11 16:52:24 -04:00
Nick Mathewson
77e2be06f6
make check-spaces
2016-09-09 15:38:46 -04:00
Nick Mathewson
75a7997148
Fix a coupole of coverity complaints.
2016-09-09 15:29:57 -04:00
Nick Mathewson
4c55e8a58f
Fix cases where the tests were doing closesocket() on a non-socket
...
These seem to have caused warnings on windows. Hmmm.
2016-09-09 10:28:12 -04:00
Nick Mathewson
2fe7e3d9d2
Oh dear, I was missing an extern.
2016-09-09 10:20:34 -04:00
Nick Mathewson
373bfd9630
Make a couple more tests run faster.
...
The point of diminishing returns has been reached.
2016-09-09 10:08:27 -04:00
Nick Mathewson
7c52109641
Disable a single pbkdf2 test vector
...
The other test vectors are pretty complete, and get full coverage, I
believe.
This one test vector accounted for half the time spent in
test-slow. "Now that's slow!"
2016-09-09 09:57:15 -04:00
Nick Mathewson
5e30e26c6d
Chop another ~93 RSA key generations out of the unit tests
...
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-09 09:45:50 -04:00
Nick Mathewson
05110c9294
Move the donna-fuzzing tests into test_slow.
...
This shaves another 3-4 seconds off the main-path tests for me,
which is again worth it, according to XKCD#1204.
2016-09-09 08:58:42 -04:00
Nick Mathewson
5ec395b27f
Re-enable RSA cacheing in tests, with a better design.
...
This makes tests faster and saves about 6 seconds for me, which
makes it worth it, according to https://xkcd.com/1205 .
2016-09-09 08:58:42 -04:00
Nick Mathewson
63e34e9e49
Reinstate a couple of teardown_capture_of_logs that I missed
...
Patch from rubiate. See #19999
2016-09-08 19:49:21 -04:00
Nick Mathewson
55713f0d79
Placate "make check-spaces"
2016-09-08 15:43:56 -04:00
Nick Mathewson
d860b99dbf
Fix remaining test warnings. (in test_relay.c)
2016-09-08 15:25:56 -04:00
Nick Mathewson
e9fdec2b1d
capture and detect expected BUG messages in shared-random tests
2016-09-08 15:13:53 -04:00
Nick Mathewson
deb294ff53
Simplify log_test_helpers interface
...
Previously, you needed to store the previous log severity in a local
variable, and it wasn't clear if you were allowed to call these
functions more than once.
2016-09-08 15:03:11 -04:00
Nick Mathewson
b0a9e54705
Resolve more BUG warnings in the unit tests
2016-09-08 14:39:20 -04:00
Nick Mathewson
d0fe86f39e
Fix bug warnings in test_circuitlist.
2016-09-08 14:04:55 -04:00
Nick Mathewson
3269307daf
Treat all nonfatal assertion failures as unit test failures.
...
Part of 19999.
2016-09-08 13:27:30 -04:00
Nick Mathewson
6a1454aa46
Tolerate another failure mode of get_if_addres6_list in tests
2016-09-08 11:47:16 -04:00
Nick Mathewson
f9cb9d8990
more consistent use of expect_log_msg_containing
2016-09-08 11:16:09 -04:00
Nick Mathewson
f64f293c48
Suppress a really impressive pile of warnings in conection/.. tests
2016-09-08 10:56:51 -04:00
Nick Mathewson
d626ffe29c
Fix a bug in connection/download_status.. tests
2016-09-08 10:48:22 -04:00
Nick Mathewson
3705ee8fe4
Revise log-testing macros to dump the actual log contents on failure
2016-09-08 10:33:01 -04:00
Nick Mathewson
ae3ea9a7a1
Remove redundant definitions of expect_{no_,}log_msg()
2016-09-08 10:32:59 -04:00
Nick Mathewson
8acb951fc8
Unit test fix: windows should be able to handle DNSPort just fine.
2016-09-08 09:23:20 -04:00
Nick Mathewson
08d1ac4f2a
Patch from rubiate: disable openbsd memory protections in test-memwipe
...
Test-memwipe is *supposed* to invoke undefined behavior, alas.
Closes 20066.
2016-09-08 09:00:24 -04:00
Nick Mathewson
bee5f38e39
set the "addr" field in the dir_handle_get tests, to resolve bug warnings.
2016-09-07 14:30:51 -04:00
Nick Mathewson
ab4485e281
Remove the useless (and uninitialized) MOCK_TOR_ADDR in test_dir_handle_get.c
2016-09-07 14:26:43 -04:00
Nick Mathewson
9d933bbacf
Capture and enforce BUG warnings in dir/param_voting_lookup
2016-09-07 13:49:18 -04:00
Nick Mathewson
075c52084d
Fix unit test failure introduced by #20002
...
Updating the consensus algorithm made a non-valid node never get
listed, which messed up some other tests.
2016-09-07 13:40:38 -04:00
Nick Mathewson
a49fee1c29
Capture and enforce bug warnings in util/time test
2016-09-07 12:15:46 -04:00
Nick Mathewson
e9b1d0619f
Merge remote-tracking branch 'dgoulet/ticket18693_029_01'
2016-09-07 11:46:00 -04:00
Nick Mathewson
3823d0aa7d
Capture and detect the BUG() warnings in test_util_parse_integer.
2016-09-06 21:01:52 -04:00
Nick Mathewson
2a4a815f58
Fix a unit test bug for passing arguments to tor_parse_ulong.
...
We wanted to make sure -50 was a bad input, but instead we were
passing a 'min' that was greater than 'max'.
2016-09-06 20:29:55 -04:00
Nick Mathewson
7ba47ca1fd
Split tor_parse_{some_int} testing into separate fn. Code movement only.
2016-09-06 20:25:54 -04:00
Nick Mathewson
43092e21c1
Merge remote-tracking branch 'teor/feature20069'
2016-09-06 19:06:32 -04:00
Nick Mathewson
5927ed8d33
checkSpace.pl now forbids more identifiers.
...
The functions it warns about are:
assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc,
strdup, strndup, calloc.
Also, fix a few lingering instances of these in the code. Use other
conventions to indicate _intended_ use of assert and
malloc/realloc/etc.
2016-09-06 12:35:37 -04:00
teor
26b47f80dd
Add hs-ipv6 to the chutney IPv6 tests
...
Requires a recent version of chutney.
Also remove bridges+hs, as it's somewhat redundant.
2016-09-06 13:45:09 +10:00
Andrea Shepard
341a159ab4
Appease make check-spaces
2016-09-05 17:47:39 +00:00
Nick Mathewson
6abce601f2
Fix BUG warning with stack trace from config/parse_port_config__listenaddress
2016-09-05 13:30:50 -04:00
Nick Mathewson
6c1d1127a8
Fix memory leaks in the shared random tests.
...
Please remember to test your code with
--enable-expensive-hardening. :)
2016-09-01 09:10:27 -04:00
Nick Mathewson
7ef4eef764
Actually, always monotime_init() in the unit tests.
2016-08-31 14:38:17 -04:00
Nick Mathewson
cfc62e2374
Initialize monotonic timer code before using it in the tests
2016-08-31 14:34:49 -04:00
Nick Mathewson
d4f05dcd0e
Detect and suppress bug message from zlib compression bomb test
2016-08-31 14:30:34 -04:00