aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.h
AgeCommit message (Collapse)Author
2018-09-04Several unit tests to improve test coverage of x509*.cNick Mathewson
2018-08-21Split tls modules and their tests into openssl and generic.Nick Mathewson
Also, add a stubbed-out nss version of the modules. The tests won't pass with NSS yet since the NSS modules don't do anything. This is a good patch to read with --color-moved.
2018-08-21Add rudimentary support for PEM-encoding, since NSS doesn't do that.Nick Mathewson
2018-07-17Merge branch 'bug25552_ope_squashed'Nick Mathewson
2018-07-17Implementation for a simple order-preserving encryption scheme.Nick Mathewson
This is meant for use when encrypting the current time within the period in order to get a monotonically increasing revision counter without actually revealing our view of the time. This scheme is far from the most state-of-the-art: don't use it for anything else without careful analysis by somebody much smarter than I am. See ticket #25552 for some rationale for this logic.
2018-07-03Clean up various things that broke with our stdint.h changesNick Mathewson
Casting before printf was necessary; now it's not so smart. We don't have SIZEOF_UINT8_T any more.
2018-06-29Eliminate compat.hNick Mathewson
2018-06-21Remove unused pubsub module.Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-20Enable DEBUG_SMARTLIST in unit testsrl1987
2018-05-09Merge branch 'ticket26009'Nick Mathewson
2018-05-06Add unit test for ..get_start_of_next_voting_interval().Nick Mathewson
This functionality was covered only accidentally by our voting-test code, and as such wasn't actually tested at all. The tests that called it made its coverage nondeterministic, depending on what time of day you ran the tests. Closes ticket 26014.
2018-05-03Basic unit tests for update_current_time().Nick Mathewson
This function is about to get more complicated, so we should track how it's working.
2018-04-23test: Add periodic events unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-13Merge branch 'token_bucket_refactor_squashed'Nick Mathewson
2018-04-13Add a new token-bucket backend abstraction, with testsNick Mathewson
This differs from our previous token bucket abstraction in a few ways: 1) It is an abstraction, and not a collection of fields. 2) It is meant to be used with monotonic timestamps, which should produce better results than calling gettimeofday over and over.
2018-04-10Merge remote-tracking branch 'isis-github/bug25425_squashed2'Nick Mathewson
2018-04-09tests: Make tt_finished() macro for tests without tt_*_op() calls.Isis Lovecruft
2018-04-09test: Add testing module and some unittests for bridges.c.Isis Lovecruft
This roughly doubles our test coverage of the bridges.c module. * ADD new testing module, .../src/test/test_bridges.c. * CHANGE a few function declarations from `static` to `STATIC`. * CHANGE one function in transports.c, transport_get_by_name(), to be mockable. * CLOSES #25425: https://bugs.torproject.org/25425
2018-04-05Merge remote-tracking branch 'public/split_relay_crypto'Nick Mathewson
2018-03-24Basic unit tests for relay_crypto.cNick Mathewson
These tests handle incoming and outgoing cells on a three-hop circuit, and make sure that the crypto works end-to-end. They don't yet test spec conformance, leaky-pipe, or various error cases.
2018-03-15Split geoip tests into a separate module.Nick Mathewson
2018-02-09Merge remote-tracking branch 'dgoulet/ticket24902_029_05'Nick Mathewson
2018-02-08Merge branch 'ticket25183_029_01' into ticket24902_029_05David Goulet
2018-02-08test: Add unit tests for addressset.cDavid Goulet
This also adds one that tests the integration with the nodelist. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-30Merge branch 'ticket24902_029_05' into ticket24902_033_02David Goulet
2018-01-30test: Add unit tests for the DoS subsystemGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-08Merge remote-tracking branch 'mikeperry/bug23114_squashed2'Nick Mathewson
2017-12-07Add tests for circuitstats.cMike Perry
These tests primarily test the relaxed and measured behavior of circuitstats.c, to make sure we did not break it with #23100 or #23114.
2017-12-05test: Add HS_DESC v3 unit testsDavid Goulet
This introduces the test_hs_control.c file which at this commit contains basic unit test for the HS_DESC event. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-27Merge branch 'protover-rust-impl_squashed'Nick Mathewson
2017-10-27move to allocating c strings from rustChelsea Holland Komlo
2017-09-27Let's get 100% coverage for proto_http while we're at it.Nick Mathewson
There was some coverage before, but it was mostly accidental.
2017-09-27Add unit tests for var_cell and control0 proto functions.Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-08-24Fix operator usage in src/test/*.cAlexander Færøy
This patch fixes the operator usage in src/test/*.c to use the symbolic operators instead of the normal C comparison operators. This patch was generated using: ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch]
2017-08-08test: Add test_hs_common unit testsDavid Goulet
Move tests from test_hs_service.c to this file. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08test: Add test_hs_ntor unit testsDavid Goulet
Move the ntor test from test_hs_service.c to this file. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08test: Add test_hs_cell unit testsDavid Goulet
Move ESTABLISH_INTRO tests from test_hs_service.c to this new file. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-13test: Add HS v2 service configuration unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-07test: Add client-side unittests for e2e rend circuits.George Kadianakis
2017-05-19Merge branch 'add_rust_squashed'Nick Mathewson
2017-05-19Add some Rust utility functions and print supportSebastian Hahn
This gives an indication in the log that Tor was built with Rust support, as well as laying some groundwork for further string-returning APIs to be converted to Rust
2017-05-08Merge branch 'netflow_padding-v6-rebased2-squashed'Nick Mathewson
2017-05-08Netflow record collapsing defense.Mike Perry
This defense will cause Cisco, Juniper, Fortinet, and other routers operating in the default configuration to collapse netflow records that would normally be split due to the 15 second flow idle timeout. Collapsing these records should greatly reduce the utility of default netflow data for correlation attacks, since all client-side records should become 30 minute chunks of total bytes sent/received, rather than creating multiple separate records for every webpage load/ssh command interaction/XMPP chat/whatever else happens to be inactive for more than 15 seconds. The defense adds consensus parameters to govern the range of timeout values for sending padding packets, as well as for keeping connections open. The defense only sends padding when connections are otherwise inactive, and it does not pad connections used solely for directory traffic at all. By default it also doesn't pad inter-relay connections. Statistics on the total padding in the last 24 hours are exported to the extra-info descriptors.
2017-04-24Unit tests for consdiffmgr moduleNick Mathewson
Initial tests. These just try adding a few consensuses, looking them up, and making sure that consensus diffs are generated in a more or less reasonable-looking way. It's enough for 87% coverage, but it leaves out a lot of functionality.
2017-04-07Merge branch 'isolate_openssl'Nick Mathewson
2017-04-06Tests for simple cases of conscache code.Nick Mathewson
2017-04-03Add tests for new_route_len()Taylor Yu