Commit Graph
3705 Commits
Author SHA1 Message Date
Nick Mathewson 2b2b97484a Merge branch 'ticket27490a_squashed' 2018-12-01 20:32:18 -05:00
Neel Chauhan ad031b64ce Add regression test for ClientAutoIPv6ORPort 2018-12-01 14:55:57 -05:00
Nick Mathewson 7e9985b75a Merge remote-tracking branch 'tor-github/pr/536' 2018-12-01 11:24:02 -05:00
Nick Mathewson af9dc12fab Merge branch 'maint-0.3.5' 2018-12-01 11:20:10 -05:00
rl1987 945c4dfda0 Also log a Tor log entry when it has a substring we are waiting for 2018-12-01 11:18:03 -05:00
rl1987 4c4ed413ee 1 ms. resolution for Tor logs 2018-12-01 11:18:03 -05:00
rl1987 0bb25931dc Log everything from tor down to debug loglevel 2018-12-01 11:18:03 -05:00
rl1987 320f5f30b3 In test_rebind.py, log stuff with timestamps 2018-12-01 11:18:03 -05:00
Nick Mathewson cf3f7753c3 Merge branch 'maint-0.3.5' 2018-12-01 11:15:09 -05:00
Nick Mathewson e82023d2f7 Merge branch 'maint-0.3.4' into maint-0.3.5 2018-12-01 11:15:09 -05:00
Nick Mathewson e3a19b1c78 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-12-01 11:15:09 -05:00
Nick Mathewson c292e505ff Merge remote-tracking branch 'tor-github/pr/539' 2018-11-26 17:22:37 -05:00
Nick Mathewson 7d8e0cc9ab Merge branch 'dormant_v2_squashed' 2018-11-26 16:33:31 -05:00
Nick Mathewson 02843c4a4e Test for check_network_participation_callback() 2018-11-26 16:32:40 -05:00
Nick Mathewson 55512ef022 Test netstatus.c tracking of user participation status 2018-11-26 16:32:40 -05:00
Nick Mathewson 3743f79695 Add options to control dormant-client feature.
The DormantClientTimeout option controls how long Tor will wait before
going dormant.  It also provides a way to disable the feature by setting
DormantClientTimeout to e.g. "50 years".

The DormantTimeoutDisabledByIdleStreams option controls whether open but
inactive streams count as "client activity".  To implement it, I had to
make it so that reading or writing on a client stream *always* counts as
activity.

Closes ticket 28429.
2018-11-26 16:32:40 -05:00
Taylor R Campbell 997a8b0ca7 Create a temporary directory for tor's DataDirectory in test_rebind.
Fixes #28562.

While here, put the argument count test and usage message _before_ we
attempt to read from sys.argv.
2018-11-23 12:51:39 -05:00
teor 805f75182a Entry Nodes: Test on reasonably live consensuses
As well as live consensuses.

Tests for 24661.
2018-11-22 17:47:12 +10:00
teor 390112d07e Entry Nodes: refactor tests to use macros
Part of 24661.
2018-11-22 17:46:52 +10:00
teor 3741f9e524 Fix a comment typo in test_hs_common.c 2018-11-22 16:56:06 +10:00
teor cebc39bcd5 Test: make unit tests use a reasonably live consensus
Cleanup after 24661.
2018-11-22 16:54:46 +10:00
teor ffc7b81b5d Test: Fix memory leaks and missing unmocks in entry guard tests
test_entry_guard_outdated_dirserver_exclusion leaks memory, and is
missing some unmocks.

Fixes 28554; bugfix on 0.3.0.1-alpha.
2018-11-22 16:42:32 +10:00
Nick Mathewson 48b08f0592 Merge branch 'ticket27359_v2_squashed' 2018-11-19 08:26:49 -05:00
Nick Mathewson 0e762c0cf5 Test new functions in nodelist.c 2018-11-19 08:26:10 -05:00
Nick Mathewson aa1d767e6b Aim for 100% test coverage on nodefamily.c 2018-11-19 08:26:10 -05:00
Nick Mathewson 426c9561c5 Use nodefamily_t in microdescriptors.
Closes ticket 27359.
2018-11-19 08:26:10 -05:00
Nick Mathewson 83be4d2bbd Backend for compact node-family representation.
This representation is meant to save memory in microdescriptors --
we can't use it in routerinfo_t yet, since those families need to be
encoded losslessly for directory voting to work.

This representation saves memory in three ways:
   1. It uses only one allocation per family.  (The old way used a
      smartlist (2 allocs) plus one strdup per entry.)
   2. It stores identity digests in binary, not hex.
   3. It keeps families in a canonical format, memoizes, and
      reference-counts them.

Part of #27359.
2018-11-19 08:26:10 -05:00
Nick Mathewson 35558c39dd Merge remote-tracking branch 'dgoulet/ticket27471_035_02' into maint-0.3.5 2018-11-16 08:57:56 -05:00
Nick Mathewson 80a6228aac Merge branch 'bug25573-034-typefix' into maint-0.3.4 2018-11-15 16:58:16 -05:00
Nick Mathewson 15e752e6b1 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-15 16:54:56 -05:00
Nick Mathewson cbe04d4550 Merge branch 'maint-0.2.9' into maint-0.3.3 2018-11-15 16:54:16 -05:00
Nick Mathewson 8569166c70 Merge remote-tracking branch 'public/bug24104_029_squashed' into maint-0.2.9
Resolved conflicts with the 26269 fix in 015fcd0e11.
2018-11-15 16:43:50 -05:00
Nick Mathewson 2c15b65381 Make the NET_PARTICIPANT role dependent on user activity
This patch implements all of 28337, except for the part where we
turn off the role if we've been idle for a long time.
2018-11-15 11:17:22 -05:00
Nick Mathewson a0380b705d Move control_per_second_events() into a callback with its own role
Part of making extra-dormant mode work; closes ticket 28421.
2018-11-15 11:17:22 -05:00
Nick Mathewson b9a88bd53a Add new "ALL" and "NET_PARTICIPANT" roles for periodic events
The previous "ALL" role was the OR of a bunch of other roles,
which is a mistake: it's better if "ALL" means "all".

The "NET_PARTICIPANT" role refers to the anything that is actively
building circuits, downloading directory information, and
participating in the Tor network.  For now, it is set to
!net_is_disabled(), but we're going to use it to implement a new
"extra dormant mode".

Closes ticket 28336.
2018-11-15 11:17:22 -05:00
Nick Mathewson bf4f55a13d Merge branch 'subsystems' 2018-11-09 15:01:49 -05:00
Nick Mathewson c7b6ed1d80 Merge remote-tracking branch 'tor-github/pr/271' 2018-11-07 11:21:13 -05:00
Nick Mathewson 8020d6fb05 Merge remote-tracking branch 'tor-github/pr/464' 2018-11-06 15:33:25 -05:00
Nick Mathewson 019a044e5e Turn "compress" into a subsystem. 2018-11-05 09:22:02 -05:00
Nick Mathewson 207253df8d Move monotonic time setup into a subsystem 2018-11-05 09:22:02 -05:00
Nick Mathewson cad61f0f6d Move prefork, postfork, and thread-exit hooks into subsys
So far, crypto is the only module that uses them, but others are
likely to do so in the future.
2018-11-05 09:22:02 -05:00
Nick Mathewson 50436ccea4 Add crypto module as a subsystem. 2018-11-05 09:22:02 -05:00
Nick Mathewson cfe5b35edb Move networking startup/cleanup logic into a subsystem. 2018-11-05 09:22:02 -05:00
Nick Mathewson 05b54f6a6a Use subsystems manager for subsystems used in tests. 2018-11-05 09:22:02 -05:00
Nick Mathewson 6e7ff8cba0 Move the code that knows our tor version into a lowest-level lib 2018-11-05 09:22:02 -05:00
Neel Chauhan 45b28167d7 In count_acceptable_nodes(), count direct and indirect nodes with node_has_preferred_descriptor() 2018-11-05 08:26:02 -05:00
Nick Mathewson 3e2423d19b Update address tests to avoid offending coverity. 2018-11-02 13:29:24 -04:00
Nick Mathewson f0bd6c2c9d Merge branch 'maint-0.3.5' 2018-11-02 13:14:37 -04:00
Nick Mathewson 996f24fcd3 Merge branch 'bug27968_squashed' into maint-0.3.5 2018-11-02 13:14:32 -04:00
teor e36e4a9671 Sort the imports in test_rebind.py
Cleanup after #27968.
2018-11-02 13:14:23 -04:00