teor
9d352028e6
Makefike: Add an IPv6 test to test-network
...
The IPv6 test only runs if IPv6 is available.
Also, explicitly use the bridges+hs-v2 network for the IPv4-only test.
This network was chutney's default as of January 2020.
Closes 33300.
2020-02-13 13:00:15 +10:00
Nick Mathewson
7f03ba06d8
Merge branch 'ticket32806'
2020-01-17 08:37:33 -05:00
Nick Mathewson
1b63eea66c
Merge branch 'haxxpop/tcp_proxy_squashed' into tcp_proxy_squshed_and_merged
2020-01-06 13:41:20 -05:00
Suphanat Chunhapanya
41b9dca07b
test: Implement haproxy
2020-01-06 13:39:10 -05:00
Nick Mathewson
bc0f1076d5
Move get_foo_options() test helpers into a new test module.
...
Some of these helpers will be needed in multiple places in the unit
tests, so we should move them now.
2019-12-19 09:19:02 -05:00
Nick Mathewson
92a6803e1d
Distribute checkSpaceTest.sh and run it when we have perl.
2019-12-03 12:56:53 +10:00
Nick Mathewson
3094651fa3
New unit tests for options_create_directories().
2019-11-20 09:26:47 -05:00
teor
6169469546
Merge remote-tracking branch 'tor-github/pr/1477'
2019-11-05 14:23:10 +10:00
teor
5d0848ebde
test: Split stats into its own file
...
Part of 32213.
2019-11-05 10:50:39 +10:00
David Goulet
ceca6e7c35
ewma: Implement unit tests
...
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-28 13:17:11 -04:00
David Goulet
dba249bc73
test: Add fakecircs.{h|c} helper
...
Fake circuits are created everywhere in the unit tests. This is an attempt at
centralizing a "fake circuit creation" API like fakechans.c does for channel.
This commit introduces fakecircs.c and changes test_relay.c and
test_circpadding.c which were using roughly the same code.
This will allow easier OR circuit creation for the future tests in
test_circuitmux.c
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
Nick Mathewson
eebd2d44a1
Merge remote-tracking branch 'tor-github/pr/1393' into maint-0.4.2
2019-10-14 15:55:13 -04:00
Nick Mathewson
4a0749596c
Add a mock replacement for blocking hostname resolution
...
Based on examination of our tests, this mock function accepts
"localhost" and "torproject.org", and rejects everything else.
2019-10-04 08:03:19 -04:00
George Kadianakis
3778b97cab
Merge branch 'tor-github/pr/1276'
2019-10-03 19:13:02 +03:00
Nick Mathewson
49d6990cae
Unit tests for dirserv_reject_tor_version().
2019-10-03 19:12:52 +03:00
Nick Mathewson
7c7e8402b5
Add a test script to try parsing and encoding Tor configurations
...
This script takes a set of example torrcs and command-lines from
src/test/conf_examples. If a success is expected, it runs "tor
--dump-config" and compares the result with the one we expect. If a
failure is expected, it runs "tor --verify-config" and greps for the
error we expect.
2019-09-14 19:00:41 -04:00
Nick Mathewson
14f48cb083
Add test_cmdline.sh to distribution.
2019-09-11 09:42:19 -04:00
Nick Mathewson
7a8ea0d3c3
integration test for --list-torrc-options
...
(This option tests our existing behavior, not necessarily the most
sensible behavior.)
2019-09-11 09:42:19 -04:00
Nick Mathewson
b1d7ddfb02
Merge branch 'ticket31240v2' into ticket31240v2_merged_2
2019-08-28 09:46:59 -04:00
Nick Mathewson
e4162cdb38
Start on test cases for the multi-object feature of confmgr.
...
This test case, at this point, only constructs the confmgr object.
More code to come.
2019-08-28 09:42:17 -04:00
Nick Mathewson
35cfe2e776
Merge remote-tracking branch 'tor-github/pr/1208'
2019-08-07 09:49:49 -04:00
David Goulet
fec0a7b7cb
test: Add hs_dos.c unit tests
...
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-08-06 07:58:14 -04:00
Nick Mathewson
fa60fee8d5
practracker: Add unit tests to test script, and test script to makefile
...
This makes all of the practracker tests get run by make check, and
hence by our CI.
Closes ticket 31304.
2019-08-01 14:01:43 -04:00
Nick Mathewson
26436fb1b6
Add more unit tests for confparse.c, so we can refactor.
...
This set of tests gets the line coverage to 100%.
2019-06-15 16:49:18 -04:00
David Goulet
7cf9d54e6d
token-bucket: Implement a single counter object
...
Closes #30687 .
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-11 14:02:22 +03:00
Nick Mathewson
07ccffa989
Coverage: do not include test-rebind in coverage builds.
...
Because it invokes the Tor mainloop, it does unpredictable things to
test coverage of a lot of code that it doesn't actually test at
all. (It is more an integration test than anything else.)
2019-05-23 12:48:51 -04:00
David Goulet
2f44786e30
Merge branch 'tor-github/pr/976'
2019-05-13 07:34:00 -04:00
George Kadianakis
b2c2cb9287
Merge branch 'tor-github/pr/986'
2019-05-02 18:12:52 +03:00
Nick Mathewson
721e65a1d5
Add comments to include.am files to note where new sources go
...
This mechanism isn't perfect, and sometimes it will guess wrong,
but it will help our automation.
2019-05-02 09:37:18 -04:00
Nick Mathewson
11eaed66bb
Add support for deterministic override of crypto_rand() in tests
...
We had this previously, but we did it differently in different
places. This implementation is pulled from test_prob_distr.c
2019-04-30 11:11:39 -04:00
David Goulet
cede93b2d8
tests: Implement unit tests for SENDME v1
...
Part of #26288
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-29 12:17:57 -04:00
teor
f35bd36814
test-network-all: Test IPv6-only v3 single onion services
...
In "make test-network-all", test IPv6-only v3 single onion services,
using the chutney network single-onion-v23-ipv6-md. This test will
not pass until 23588 has been merged.
Closes ticket 27251.
2019-04-24 17:42:59 +10:00
Nick Mathewson
a47b61f329
Merge branch 'messaging_v3' into messaging_v3_merged
2019-03-26 20:13:49 -04:00
Nick Mathewson
24df14eb09
Pubsub: macros for ease-of-use and typesafety.
2019-03-25 16:35:33 -04:00
Nick Mathewson
9e60482b80
Pubsub: an OO layer on top of lib/dispatch
...
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-25 16:35:33 -04:00
Nick Mathewson
e4d3098d4d
Low-level dispatch module for publish-subscribe mechanism
...
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-25 16:35:33 -04:00
Nick Mathewson
dfd7a7f5b6
Add a type to map names to short identifiers
...
We'll be using this for four kinds of identifier in dispatch.c
2019-03-25 16:35:33 -04:00
rl1987
0bc9ed9d38
Move casts to separate C file to prevent compiler from optimising them away
2019-03-20 18:54:11 +02:00
rl1987
d731ab4583
Check that all valid values of int and unsigned int can be put into void pointer
2019-02-25 20:04:02 +02:00
Nick Mathewson
34183f0d71
Fix a goofy change from abcde10fce that broke test-slow linking
...
boklm tracked this down, and it doesn't make sense. It caused
This change goes back to the previous LDFLAGS line.
2019-02-21 09:10:15 -05:00
Neel Chauhan
384c5c6188
Make test-slow compile with libevent
2019-02-16 16:03:17 -05:00
Nick Mathewson
acbde10fce
Add a test-rng program so we can pipe to dieharder.
2019-02-14 09:26:40 -05:00
Nick Mathewson
3d3578ab41
Extract RNG tests into a new test module
...
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-02-14 09:26:40 -05:00
George Kadianakis
2ccf326837
Implement and test probability distributions used by WTF-PAD.
...
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-02 15:25:55 +02:00
George Kadianakis
a336d816a6
Circuit padding tests.
...
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2019-01-02 15:25:55 +02:00
Taylor Yu
f0f971409a
Add tests for bootstrap tracker
...
Part of ticket 27617.
2018-12-21 14:15:35 -05:00
Nick Mathewson
973a5db808
Merge remote-tracking branch 'tor-github/pr/445'
2018-12-20 07:53:57 -05:00
rl1987
c92c0cbc9f
Actually allow unrecognized address types in NETINFO cell
...
Ignore the address value instead of failing with error condition in case
unrecognized address type is found.
2018-12-18 12:10:08 +02:00
Nick Mathewson
e969d9c6b4
Merge branch 'ticket28179_squashed' into ticket28179_squashed_merged
2018-12-17 16:41:01 -05:00
Alexander Færøy
f7d13425fc
Delete old process_handle_t code.
...
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-17 16:39:28 -05:00