aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.h
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>
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>
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-01-21test: Add HS onion balance testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-09Remove NS*() macros from test.h.Nick Mathewson
We never used them very much, and although they had potential to clarify some of our tests, they also made some of the logic harder for people to follow. Clang-format can't make head or tail of them, so the time has come to say goodbye to them.
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-22Re-run make autostyle.Nick Mathewson
2019-10-22Merge branch 'ticket31705_v2' into ticket31705_v2_mergedNick Mathewson
Conflicts: src/feature/dirparse/authcert_parse.c src/feature/dirparse/ns_parse.c src/feature/hs/hs_service.c src/lib/conf/conftesting.h src/lib/log/log.h src/lib/thread/threads.h src/test/test_options.c These conflicts were mostly related to autostyle improvements, with one or two due to doxygen fixes.
2019-10-22test.h: Use COCCI to suppress macros Coccinelle does not understand.Nick Mathewson
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-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-25Check that all valid values of int and unsigned int can be put into void pointerrl1987
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-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.
2018-12-20Merge remote-tracking branch 'tor-github/pr/445'Nick Mathewson
2018-12-18Actually allow unrecognized address types in NETINFO cellrl1987
Ignore the address value instead of failing with error condition in case unrecognized address type is found.
2018-12-17Merge branch 'ticket28179_squashed' into ticket28179_squashed_mergedNick Mathewson
2018-12-17Delete old process_handle_t code.Alexander Færøy
This patch removes the old process_handle_t code. Everything should by now be using the process_t interface. See: https://bugs.torproject.org/28179
2018-12-17Add slow test for process_t for main loop interaction.Alexander Færøy
This patch adds test cases for process_t which uses Tor's main loop. This allows us to test that the callbacks are actually invoked by the main loop when we expect them. See: https://bugs.torproject.org/28179