aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.h
AgeCommit message (Collapse)Author
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
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-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-10-24Re-alphabetize the list of tests in tests.[ch]Nick Mathewson
2018-10-16Add new source file to test targetrl1987
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