aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.c
AgeCommit message (Collapse)Author
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-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-17Add new Process subsystem.Alexander Færøy
This patch adds a new Process subsystem for running external programs in the background of Tor. The design is focused around a new type named `process_t` which have an API that allows the developer to easily write code that interacts with the given child process. These interactions includes: - Easy API for writing output to the child process's standard input handle. - Receive callbacks whenever the child has output on either its standard output or standard error handles. - Receive callback when the child process terminates. We also support two different "protocols" for handling output from the child process. The default protocol is the "line" protocol where the process output callbacks will be invoked only when there is complete lines (either "\r\n" or "\n" terminated). We also support the "raw" protocol where the read callbacks will get whatever the operating system delivered to us in a single read operation. This patch does not include any operating system backends, but the Unix and Windows backends will be included in separate commits. See: https://bugs.torproject.org/28179
2018-12-05Merge branch 'prop293_squashed'Nick Mathewson
2018-12-03Add a framework for testing set_routerstatus_from_routerinfo().Nick Mathewson
Additionally, use it to test that is_staledesc is set correctly. Eventually we'll want to test all the other flags, but I'm aiming for only adding coverage on the changed code here.
2018-11-14Move buffers.c out of lib/containers to resolve a circularity.Nick Mathewson
2018-10-24Re-alphabetize the list of tests in tests.[ch]Nick Mathewson
2018-10-16Add new source file to test targetrl1987
2018-10-01Remove routerparse include from files that dont use itNick Mathewson
2018-10-01Move v2 hs parsing into feature/rendNick Mathewson
2018-10-01Move routerparse and parsecommon to their own module.Nick Mathewson
2018-09-21Split main.c into main.c and mainloop.cNick Mathewson
The main.c code is responsible for initialization and shutdown; the mainloop.c code is responsible for running the main loop of Tor. Splitting the "generic event loop" part of mainloop.c from the event-loop-specific part is not done as part of this patch.
2018-09-21Move the non-crypto parts of onion.c out of src/core/cryptoNick Mathewson
The parts for handling cell formats should be in src/core/or. The parts for handling onionskin queues should be in src/core/or. Only the crypto wrapper belongs in src/core/crypto.
2018-09-04Merge branch 'nss_squashed' into nss_mergeNick Mathewson