summaryrefslogtreecommitdiff
path: root/src/test/test.c
AgeCommit message (Collapse)Author
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-10-24Merge branch 'feature18329_029_squashed' into maint-0.3.2Nick Mathewson
2017-10-24test: Add unittest for descriptors with BridgeDistribution option.Isis Lovecruft
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-24Ensure that `make check-spaces` is happy.Alexander Færøy
The `test-operator-cleanup` patch, and related coccinelle patches, don't do any checks for line length. This patch fixes the line length issues caused by the previous commits.
2017-08-24apply ahf's test_assert_null.cocciNick Mathewson
2017-08-24apply ahf's test_assert_int.cocciNick Mathewson
2017-08-19prop224: Refactor parse_extended_hostname() to parse v3 addrs.George Kadianakis
We need this func so that we recognize SOCKS conns to v3 addresses. - Also rename rend_valid_service_id() to rend_valid_v2_service_id() - Also move parse_extended_hostname() tests to their own unittest, and add a v3 address to the test as well. Signed-off-by: David Goulet <dgoulet@torproject.org>
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-24Rename the hybrid_encrypt/decrypt functions; label them as dangerousNick Mathewson
We need to keep these around for TAP and old-style hidden services, but they're obsolete, and we shouldn't encourage anyone to use them. So I've added "obsolete" to their names, and a comment explaining what the problem is. Closes ticket 23026.
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-25Merge branch 'ahf_prop278_21662_squashed'Nick Mathewson
2017-04-25Rename the `torgzip` module to `compress`.Alexander Færøy
See https://bugs.torproject.org/21663
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
2017-03-31Remove crypto/rand include from test_crypto.cNick Mathewson
Create a new test_crypto_openssl to test openssl-only crypto.c functionality.
2017-03-16Merge branch 'storagedir_squashed'Nick Mathewson
2017-03-16Define a "storagedir" abstraction to hold numerous similar filesNick Mathewson
We could use one of these for holding "junk" descriptors and unparseable things -- but we'll _need_ it for having cached consensuses and diffs between them.
2017-03-16Merge branch 'prop140_21643_diff_only_squashed'Nick Mathewson
2017-03-16Consensus diff backend from Daniel Martí GSOC project.Daniel Martí
(This commit was extracted by nickm based on the final outcome of the project, taking only the changes in the files touched by this commit from the consdiff_rebased branch. The directory-system changes are going to get worked on separately.)
2017-03-15Run the copyright update script.Nick Mathewson
2016-12-14Merge branch 'dgoulet_ticket19043_030_03_squashed'Nick Mathewson
2016-12-14prop224: Add unittests handling v3 ESTABLISH_INTRO cells.George Kadianakis
Test for both v2 and v3 ESTABLISH_INTRO handling.
2016-11-24Refactor circuit_predict_and_launch_newChelsea H. Komlo
2016-11-04Merge branch 'ticket17238_029_02-resquash'Nick Mathewson
Conflicts: src/or/rendclient.c src/or/rendcommon.c src/or/routerparse.c src/test/test_dir.c src/trunnel/ed25519_cert.h
2016-11-04test: Add prop224 directory cache unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04test: Add prop224 descriptor unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-09-26checkpoint basic protover backendNick Mathewson
2016-08-20Unit test for connection_handle_oos()Andrea Shepard
2016-07-06test coverage on onion_fast: 0%->100%Nick Mathewson
2016-07-06Improve test coverage a little on onion*.cNick Mathewson
2016-07-01prop250: Add unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
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-11Merge branch 'pubsub_squashed'Nick Mathewson
2016-05-11Basic work on a publish/subscribe abstractionNick Mathewson
The goal here is to provide a way to decouple pieces of the code that want to learn "when something happens" from those that realize that it has happened. The implementation here consists of a generic backend, plus a set of macros to define and implement a set of type-safe frontends.
2016-04-19Basic 'handle' implementation and tests.Nick Mathewson
This abstraction covers the case where one part of the program needs to refer to another object that is allowed to disappear.
2016-02-27Update the copyright year.Nick Mathewson