aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_helpers.c
AgeCommit message (Collapse)Author
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-11-12Fake the current time when we're loading TEST_DESCRIPTORS.Nick Mathewson
Fixes bug 40187; bugfix on 0.4.5.1-alpha.
2020-07-15Add support for patterns on %include #25140Daniel Pinto
Also adds generic tor_glob function to expand globs.
2020-05-14circuitbuild: test relays sending IPv6 extend cellsteor
Add tests for relays sending IPv6 extend cells in circuit_send_next_onion_skin(). Clients also use this code, check that they can only extend over IPv4 (for now). Part of 33222.
2020-05-14test: Move the origin circuit function to test helpersteor
Part of 33222.
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Use new ENABLE/DISABLE_GCC_WARNINGNick Mathewson
This is an automated commit, generated by: perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2020-01-07test_helpers: add a missing free for CID 1457527.Nick Mathewson
2020-01-06Merge branch 'haxxpop/tcp_proxy_squashed' into tcp_proxy_squshed_and_mergedNick Mathewson
2020-01-06test: HAPRoxy protocolSuphanat Chunhapanya
2019-10-26Rename confparse.[ch] identifiers to confmgt.[ch] identifiers.Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ confparse.h confmgt.h \ confparse.c confmgt.c \ CONFPARSE_PRIVATE CONFMGT_PRIVATE \ TOR_CONFPARSE_H TOR_CONFMGT_H
2019-09-11Update #includes to point to confparse.h in its new location.Nick Mathewson
This commit was automatically generated by running scripts/maint/rectify_include_paths.py .
2019-07-24Add a config_mgr_t type to wrap config_format_tNick Mathewson
Remember that our goal in the present refactoring is to allow each subsystem to declare its own configuration structure and variables. To do this, each module will get its own config_format_t, and so we'll want a different structure that wraps several config_format_t objects. This is a "config_mgr_t".
2019-06-11Rework origin circuit tracking to use pubsubTaylor Yu
Part of ticket 29976.
2019-06-11Rework orconn tracking to use pubsubTaylor Yu
Part of ticket 29976.
2019-04-26Make nodelist_get_list() return a const pointer.Nick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-11-14Move buffers.c out of lib/containers to resolve a circularity.Nick Mathewson
2018-09-21Merge remote-tracking branch 'ahf-github/asn/bugs4700_2'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-15Add unittest for HiddenServiceExportCircuitID.George Kadianakis
Had to move a function to test helpers.
2018-07-10Isolate resolve.h usage in the modules that really need it.Nick Mathewson
(Almost none of Tor should actually need to touch the platform resolver.)
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Remove needless includes from or.hNick Mathewson
or.h should really include only the minimum of stuff from or/*, common/*, and lib/*.
2018-06-28Fix paths for buffers.h; automated.Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Extract cell type and their queues into new headersNick Mathewson
Since packed_cell and destroy_cell exist only to be queued, they go in the same headers as the queues.
2018-06-15Extract desc_store_t and routerlist_t into their own headers.Nick Mathewson
2018-06-15Extract node_t into its own header.Nick Mathewson
2018-06-15Extract {or,origin}_circuit_t into their own headersNick Mathewson
2018-06-15Extract connection_t into its own header.Nick Mathewson
Now the entire connection_t hierarchy is extracted from or.h
2018-05-03Merge remote-tracking branch 'isis/bug24660_r1'Nick Mathewson
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-04-02Remove event2/event.h include from compat_libevent.hNick Mathewson
Only one module was depending on this include (test_helpers.c), and it was doing so incorrectly.
2018-02-20Remove a bunch of other redundant #includesNick Mathewson
Folks have found two in the past week or so; we may as well fix the others. Found with: \#!/usr/bin/python3 import re def findMulti(fname): includes = set() with open(fname) as f: for line in f: m = re.match(r'^\s*#\s*include\s+["<](\S+)[>"]', line) if m: inc = m.group(1) if inc in includes: print("{}: {}".format(fname, inc)) includes.add(m.group(1)) import sys for fname in sys.argv[1:]: findMulti(fname)
2017-09-05Refactor buffer APIs to put a buf_t first.Nick Mathewson
By convention, a function that frobs a foo_t should be called foo_frob, and it should have a foo_t * as its first argument. But for many of the buf_t functions, the buf_t was the final argument, which is silly.
2017-09-05Repair buffer API so everything starts with buf_.Nick Mathewson
Our convention is that functions which manipulate a type T should be named T_foo. But the buffer functions were super old, and followed all kinds of conventions. Now they're uniform. Here's the perl I used to do this: \#!/usr/bin/perl -w -i -p s/read_to_buf\(/buf_read_from_socket\(/; s/flush_buf\(/buf_flush_to_socket\(/; s/read_to_buf_tls\(/buf_read_from_tls\(/; s/flush_buf_tls\(/buf_flush_to_tls\(/; s/write_to_buf\(/buf_add\(/; s/write_to_buf_compress\(/buf_add_compress\(/; s/move_buf_to_buf\(/buf_move_to_buf\(/; s/peek_from_buf\(/buf_peek\(/; s/fetch_from_buf\(/buf_get_bytes\(/; s/fetch_from_buf_line\(/buf_get_line\(/; s/fetch_from_buf_line\(/buf_get_line\(/; s/buf_remove_from_front\(/buf_drain\(/; s/peek_buf_startswith\(/buf_peek_startswith\(/; s/assert_buf_ok\(/buf_assert_ok\(/;
2017-08-24apply ahf's test_assert_int.cocciNick Mathewson
2017-08-24Fix operator usage in src/test/*.cAlexander Færøy
This patch fixes the operator usage in src/test/*.c to use the symbolic operators instead of the normal C comparison operators. This patch was generated using: ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch]
2017-07-13test: Add HS v2 service configuration unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-07test: Move some test code to test helpers.George Kadianakis
Move code to create connection streams and rend_data structures to test_helpers so that we can use them from the e2e rendezvous circuit unittests.
2017-04-27Clean up mentions of 'zlib' and rename the mentions to 'compressed'.Alexander Færøy
This patch cleans up in various places where 'zlib' is mentioned.
2017-03-15Run the copyright update script.Nick Mathewson
2017-01-03Fix unit test failures in response to DNS hijacking.Nick Mathewson
Some DNS NXDOMAIN hijackers hijack truly ridiculous domains, like "invalid-stuff!!" or "1.2.3.4.5". This would provoke unit test failures where we used addresses like that to force tor_addr_lookup() to fail. The fix, for testing, is to mock tor_addr_lookup() with a variant that always fails when it gets a name with a !. Fixes bugs 20862 and 20863.
2016-11-24adding documentation to extracted unit test helperChelsea H. Komlo
2016-11-24moving useful test helper to test_helpers.hChelsea H. Komlo
2016-11-04test: Add prop224 directory fetch/upload unit testsGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>