David Goulet
7ee0a2b9aa
sr: Don't use a dynamic voting schedule
...
The exposed get_voting_schedule() allocates and return a new object everytime
it is called leading to an awful lot of memory allocation when getting the
start time of the current round which is done for each node in the consensus.
Closes #23623
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-27 09:23:37 -04:00
Nick Mathewson
4af1653e0f
Merge branch 'maint-0.3.2'
2017-10-26 10:43:05 -04:00
David Goulet
c4ef21ff5e
fuzzing: Make hsdescv3 use the decoding API correctly
...
Fixes #21509
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-26 09:52:15 -04:00
David Goulet
4d2de821ce
Revert "Temporarily disable compilation of the v3 hs fuzzing code"
...
This reverts commit 5ef656e7d1
.
2017-10-26 09:41:47 -04:00
George Kadianakis
1a6814c096
Fix offending unittest and add changes file for #23862 .
2017-10-25 20:22:52 +03:00
George Kadianakis
8c8d3b90f7
Add a unittest that reveals the offending case of #23862 .
2017-10-25 20:22:52 +03:00
Nick Mathewson
b95ef19a77
Merge branch 'feature18329_029_squashed' into maint-0.3.2
2017-10-24 19:35:32 -04:00
Nick Mathewson
594cf92498
Merge branch 'feature18329_029_squashed' into maint-0.3.2
2017-10-24 19:35:28 -04:00
Nick Mathewson
f3af74ccf5
Updates to fix check-spaces/check-changes warnings
2017-10-24 19:35:16 -04:00
Nick Mathewson
44e8aaa9aa
Adjust test to allow hyphens too.
2017-10-24 19:33:38 -04:00
Isis Lovecruft
02cde0d939
test: Add unittest for descriptors with BridgeDistribution option.
2017-10-24 19:26:24 -04:00
Nick Mathewson
fcd5c3144a
Merge branch 'maint-0.2.8' into maint-0.2.9
2017-10-23 09:11:10 -04:00
Nick Mathewson
eac4c374e4
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-10-23 09:11:10 -04:00
Nick Mathewson
6a7aa47357
Merge branch 'maint-0.3.1' into maint-0.3.2
2017-10-23 09:11:10 -04:00
Nick Mathewson
85115796bb
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-10-23 09:11:10 -04:00
Nick Mathewson
a5f5bda462
Adjust test, now that there are 9 dirauths again
2017-10-23 09:11:07 -04:00
Nick Mathewson
c4a07b261b
Add unit tests for cases of starting with bogus keygen arguments
...
In particular, this tests that we give an appropriate warning when
we are told to use some keygen argument, but --keygen is not specified.
2017-10-20 19:27:48 -04:00
Nick Mathewson
72b5e4a2db
Move tor_git_revision into a new module.
...
At first, we put the tor_git_revision constant in tor_main.c, so
that we wouldn't have to recompile config.o every time the git
revision changed. But putting it there had unintended side effect
of forcing every program that wanted to link libor.a (including
test, test-slow, the fuzzers, the benchmarks, etc) to declare their
own tor_git_revision instance.
That's not very nice, especially since we want to start supporting
others who want to link against Tor (see 23846).
So, create a new git_revision.c file that only contains this
constant, and remove the duplicated boilerplate from everywhere
else.
Part of implementing ticket 23845.
2017-10-18 13:49:35 -04:00
Taylor Yu
44e4a96bb5
Don't expect permission failure if running as root
...
Skip test_config_include_no_permission() when running as root, because
it will get an unexpected success from config_get_lines_include().
This affects some continuous integration setups. Fixes bug 23758.
2017-10-04 08:42:05 -05:00
Nick Mathewson
1e7e36da4b
Merge branch 'bug23672_032_01_squashed'
2017-10-03 10:56:52 -04:00
David Goulet
30d2e0b71e
test: Add an HS v3 descriptor fetch unit test
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-03 10:56:46 -04:00
Nick Mathewson
783a44b2cd
Merge remote-tracking branch 'asn/bug23670'
2017-10-03 09:05:16 -04:00
George Kadianakis
f7306b16ec
entrynodes: Better naming for dir info check functions.
2017-10-03 15:55:19 +03:00
Nick Mathewson
a6c62cbd13
Merge branch 'bug23678_032'
2017-10-03 08:18:08 -04:00
Nick Mathewson
f923aeee1b
Follow-up on 23678: fix socks/wrong_protocol test
2017-10-03 08:17:41 -04:00
Nick Mathewson
bb7288b2c3
Make the fp_pair_map tests cover {get,set}_by_digests
2017-10-03 08:07:36 -04:00
George Kadianakis
5352785d0c
entrynodes: Error msg for missing guard descs is now more informative.
2017-10-03 14:41:20 +03:00
George Kadianakis
c9729853a5
entrynodes: Be specific about how many primary descriptors we miss.
2017-10-03 14:39:34 +03:00
Nick Mathewson
4e6374c26b
Merge remote-tracking branch 'catalyst-oniongit/bug23691'
2017-09-28 19:07:23 -04:00
Taylor Yu
2ae1b7e2db
Fix leak in test_util.c
...
AddressSanitizer found a leak in test_util_decompress_dos_impl().
Fixes bug #23691 .
2017-09-28 17:53:38 -05:00
Alexander Færøy
c2fac2c6b0
Enable disabled test that was disabled due to bug #23551
...
See: https://bugs.torproject.org/23551
2017-09-28 18:58:15 +02:00
Nick Mathewson
3a073c463d
Improve unit test coverage for compression code.
...
These tests try uncompressing garbage, verify that we won't
make compression bombs, and verify that we won't uncompress
compression bombs.
2017-09-28 12:20:02 -04:00
Nick Mathewson
f71ff0cabc
Unit test for case where %included dir exists but is unreadable
2017-09-28 09:49:30 -04:00
Nick Mathewson
5b6f2713cd
unit test for config_lines_dup_and_filter
2017-09-28 09:40:17 -04:00
Nick Mathewson
99e52711bb
Add unit test for buf_get_line().
2017-09-28 08:35:30 -04:00
Nick Mathewson
f21102c069
Let's get 100% coverage for proto_http while we're at it.
...
There was some coverage before, but it was mostly accidental.
2017-09-27 21:45:55 -04:00
Nick Mathewson
57f04a482e
Test more error cases of our socks code.
...
Coverage is now respectable. :)
2017-09-27 19:37:36 -04:00
Nick Mathewson
6882e711d0
Add unit tests for SOCKS functions that parse server responses
...
We use these when we're acting as a SOCKS client, but we'd never
actually written tests for them :/
2017-09-27 18:55:14 -04:00
Nick Mathewson
5418aa84ee
socks5 unit tests: add check for ipv6 address type.
2017-09-27 11:23:09 -04:00
Nick Mathewson
04f7873bab
Socks tests for bad socks5 username/passwd auth.
2017-09-27 11:16:29 -04:00
Nick Mathewson
5427365907
testing: test many possible truncated SOCKS commands
...
Many of the 'truncated command' paths in fetch_from_buf_socks() were
not reached by the tests. This new unit test tries to check them
exhaustively.
2017-09-27 10:54:56 -04:00
Nick Mathewson
a57f495c1a
Move ext_or_command tests to test_proto_misc.c
...
No other code changes.
2017-09-27 09:11:15 -04:00
Nick Mathewson
b8b016940d
Add unit tests for var_cell and control0 proto functions.
2017-09-27 09:09:00 -04:00
Nick Mathewson
1f3db0514e
Merge remote-tracking branch 'asn/ticket23645_032_01'
2017-09-26 08:55:59 -04:00
David Goulet
648d5ea67e
hs: Improve logging
...
Also demote a log message that can occur under natural causes
(if the circuit subsystem is missing descriptors/consensus etc.).
The HS subsystem will naturally retry to connect to intro points,
so no need to make that log user-facing.
2017-09-26 13:55:44 +03:00
Nick Mathewson
45530ed729
Merge branch 'bug22109'
2017-09-25 14:32:04 -04:00
Nick Mathewson
81c4793232
Make testing rend1_payload variables static
...
This fixes a clang warning.
2017-09-25 13:26:43 -04:00
Nick Mathewson
90e8d1f58f
Merge branch 'bug23539_032_01_squashed'
2017-09-25 11:12:56 -04:00
David Goulet
ef2a449cce
sched: Make KISTSchedRunInterval non negative
...
Fixes #23539 .
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-25 11:11:30 -04:00
Nick Mathewson
777e828ef3
Merge remote-tracking branch 'asn/ticket23420_032_01'
2017-09-25 09:24:36 -04:00