aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.c
AgeCommit message (Collapse)Author
2023-06-23Add congestion control tests to build.Mike Perry
2023-05-10test_hs_pow: add test vectors for our hs_pow client puzzleMicah Elizabeth Scott
This adds test vectors for the overall client puzzle at the hs_pow and hs_cell layers. These are similar to the crypto/equix tests, but they also cover particulars of our hs_pow format like the conversion to byte arrays, the replay cache, the effort test, and the formatting of the equix challenge string. Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-04-06Prop#329 Tests: Add tests for the conflux poolMike Perry
2023-04-06Prop#329 Tests: Add tests for conflux cells.David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22Add test for TAP vs ntor2+ntor3 onion queue orderingMike Perry
2021-09-28test: Add sandbox unit testsSimon South
2021-08-26Initial backend for an ntor-v3 implementation.Nick Mathewson
This code is based directly on the specification, without looking at the reference implementation or the implementation in Arti. Nonetheless, it is now passing with the test vectors generated by the reference implementation.
2021-04-23Merge branch 'tor-gitlab/mr/327'David Goulet
Conflicts: src/test/test.c Minor comment issue.
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-02-24Add tests for parsing and selecting directory ports.Nick Mathewson
2021-02-19hs-v2: Removal of service and relay supportDavid Goulet
This is unfortunately massive but both functionalities were extremely intertwined and it would have required us to actually change the HSv2 code in order to be able to split this into multiple commits. After this commit, there are still artefacts of v2 in the code but there is no more support for service, intro point and HSDir. The v2 support for rendezvous circuit is still available since that code is the same for the v3 and we will leave it in so if a client is able to rendezvous on v2 then it can still transfer traffic. Once the entire network has moved away from v2, we can remove v2 rendezvous point support. Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-18Merge branch 'bug40168+34088-035-v3' into bug40168+34088-035-v3-masterMike Perry
2021-02-18Add CBT unit test for Xm and alpha estimation.Mike Perry
2021-02-18Completely ignore abandoned circs from circ timeout calcMike Perry
This prevents the timeout curve from getting spread out as much, resulting in more accurate timeout values for quantiles from 60-80.
2020-10-27test: Add test for onion service metrics moduleDavid Goulet
Related to #40063 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27test: Metrics tests for lib/ and feature/David Goulet
Related to #40063 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-07Remove long-obsolete members from the state file.Nick Mathewson
Tor has a feature to preserve unrecognized state file entries in order to maintain forward compatibility. But this feature, along with some unused code that we never actually removed, led to us keeping items that were of no use to the user, other than at worst to preserve ancient information about them. This commit adds a feature to remove obsolete entries when we load the file. Closes ticket 40137.
2020-09-23Implement IPv6 sybil protection.vnepveu
[This is a squashed patch for ticket 7193, based on taking a "git diff" for the original branch, then applying it with "git apply -3". I earlier attempted to squash the branch with "git rebase", but there were too many conflicts. --nickm]
2020-07-02Allow multiple addresses in extend_info_t.Nick Mathewson
In practice, there will be at most one ipv4 address and ipv6 address for now, but this code is designed to not care which address is which until forced to do so. This patch does not yet actually create extend_info_t objects with multiple addresses. Closes #34069.
2020-01-21test: Add HS onion balance testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2020-01-06Merge branch 'haxxpop/tcp_proxy_squashed' into tcp_proxy_squshed_and_mergedNick Mathewson
2020-01-06test: Implement haproxySuphanat Chunhapanya
2019-11-20New unit tests for options_create_directories().Nick Mathewson
2019-11-05Merge remote-tracking branch 'tor-github/pr/1477'teor
2019-11-05test: Split stats into its own fileteor
Part of 32213.
2019-10-28ewma: Implement unit testsDavid Goulet
At this commit, 93.9% of line coverage and 95.5% of function coverage. Closes #32196 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-03Merge branch 'tor-github/pr/1276'George Kadianakis
2019-10-03Unit tests for dirserv_reject_tor_version().Nick Mathewson
2019-08-28Merge branch 'ticket31240v2' into ticket31240v2_merged_2Nick Mathewson
2019-08-28Start on test cases for the multi-object feature of confmgr.Nick Mathewson
This test case, at this point, only constructs the confmgr object. More code to come.
2019-08-06test: Add hs_dos.c unit testsDavid Goulet
Currently test the only available function which is hs_dos_can_send_intro2() within the HS anti-DoS subsystem. Closes #15516 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-15Add more unit tests for confparse.c, so we can refactor.Nick Mathewson
This set of tests gets the line coverage to 100%.
2019-06-11token-bucket: Implement a single counter objectDavid Goulet
Closes #30687. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-07Merge branch 'tor-github/pr/994'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-02Merge branch 'tor-github/pr/986'George Kadianakis
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-30Update circuit_timeout test to use deterministic prngNick Mathewson
2019-04-29tests: Implement unit tests for SENDME v1David Goulet
Part of #26288 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-03-26Merge branch 'messaging_v3' into messaging_v3_mergedNick Mathewson
2019-03-25Pubsub: macros for ease-of-use and typesafety.Nick Mathewson
2019-03-25Pubsub: an OO layer on top of lib/dispatchNick Mathewson
This "publish/subscribe" layer sits on top of lib/dispatch, and tries to provide more type-safety and cross-checking for the lower-level layer. Even with this commit, we're still not done: more checking will come in the next commit, and a set of usability/typesafety macros will come after.
2019-03-25Low-level dispatch module for publish-subscribe mechanismNick Mathewson
This module implements a way to send messages from one module to another, with associated data types. It does not yet do anything to ensure that messages are correct, that types match, or that other forms of consistency are preserved.
2019-03-25Add a type to map names to short identifiersNick Mathewson
We'll be using this for four kinds of identifier in dispatch.c
2019-02-14Extract RNG tests into a new test moduleNick Mathewson
test_crypto.c is pretty big; it wouldn't hurt to split it up some more before I start adding stuff to the PRNG tests.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2019-01-02Implement and test probability distributions used by WTF-PAD.George Kadianakis
This project introduces the prob_distr.c subsystem which implements all the probability distributions that WTF-PAD needs. It also adds unittests for all of them. Code and tests courtesy of Riastradh. Co-authored-by: Taylor R Campbell <campbell+tor@mumble.net> Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
2019-01-02Circuit padding tests.George Kadianakis
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2018-12-21Add tests for bootstrap trackerTaylor Yu
Part of ticket 27617.