Nick Mathewson
8362f8854a
Merge branch 'less_charbuf_rebased' into maint-0.2.4
...
Conflicts:
src/or/dirserv.c
src/or/dirserv.h
src/test/test_dir.c
2013-04-18 11:13:36 -04:00
Nick Mathewson
4b15606fa2
Add unit test for encoding ntor key in routerinfo
2013-04-18 11:04:58 -04:00
Nick Mathewson
cb74b5a152
Remove the unused pk3 variable from test_dir_formats
2013-04-18 11:04:58 -04:00
Nick Mathewson
992bbd02f9
Re-enable test for parsing and generating descriptor with exit policy
...
Looks like I turned this off in 6ac42f5e
back in 2003 and never got
around to making it work again. There has been no small amount of
code drift.
2013-04-18 11:04:58 -04:00
Nick Mathewson
4d672f3ae3
Test networkstatus_getinfo_helper_single
2013-04-18 11:04:58 -04:00
Nick Mathewson
0f83fcc5c2
Add a quick-and-dirty-test for generate_v2_networkstatus.
...
It sure is a good thing we can run each test in its own process, or
else the amount of setup I needed to do to make this thing work
would have broken all the other tests.
Test mocking would have made this easier to write too.
2013-04-18 11:04:58 -04:00
Nick Mathewson
c35ef8e6e9
Test improvement: include microdesc lines in our synthetic microdesc consensuses.
2013-04-18 11:04:57 -04:00
Nick Mathewson
fd93622cc8
Use chunks, not buffers, for router descriptors
2013-04-18 11:04:56 -04:00
Nick Mathewson
cd1cdae0fa
Fix some wide lines
2013-04-18 10:30:14 -04:00
Nick Mathewson
a6545d6335
Merge branch 'bug8683_rebased' into maint-0.2.4
2013-04-14 21:48:44 -04:00
Nick Mathewson
52cadff0d6
Rename all fields which measure bw in kb to end with _kb
2013-04-14 21:45:05 -04:00
Roger Dingledine
d028c005da
socks5 will ask for username/password if we offer it
...
Commit a264c4fe
made the socks5 server prefer auth 2 if it's offered,
but it didn't update the unit test to expect it.
2013-04-11 10:37:41 -04:00
Peter Palfrader
d1dc23c938
test.c: Try to create a more random temporary directory for our workspace (re: Bug#8638)
2013-04-05 16:51:48 -04:00
Nick Mathewson
8b6a952c94
Avoid clang warnings from implicit off_t->size_t cast
2013-03-23 18:50:21 -04:00
Nick Mathewson
1b6b8b0564
Fix an uninitialized-var warning in unit tests
...
Found by formorer; fix on 42fb61d172
, not in any released Tor.
2013-03-22 12:38:55 -04:00
Nick Mathewson
42fb61d172
Fix a small memory leak in the unit tests
...
Found by coverity; this is CID 992692.
2013-03-21 07:52:36 -04:00
Nick Mathewson
2ac66e59f7
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
...
Conflicts:
src/test/test_addr.c
2013-03-18 15:28:39 -04:00
Nick Mathewson
5959d1c105
Merge remote-tracking branch 'andrea/bug8435' into maint-0.2.4
2013-03-18 15:17:11 -04:00
Andrea Shepard
6e978ab829
Add unit test for dirserv measured bandwidth cache
2013-03-07 15:41:22 -08:00
Nick Mathewson
165b2c0123
Add unit test for tor_addr_is_loopback
2013-03-01 12:40:41 -05:00
Nick Mathewson
a4e9d67292
Remove some functions which were unused except for their tests
2013-02-23 23:38:43 -05:00
Nick Mathewson
365e302f61
Remove a bunch of unused macro definitions
2013-02-23 23:05:25 -05:00
Nick Mathewson
804be10b09
Fix a may-be-used-uninitialized warning.
2013-02-19 15:00:08 -05:00
Nick Mathewson
b0b0d6af63
Merge branch 'bug2286_unit_test_squashed'
2013-02-19 14:54:05 -05:00
Andrea Shepard
699c39dada
Test alternate values of maxunmeasuredbw too
2013-02-19 14:53:31 -05:00
Andrea Shepard
f445aae2e3
Update unmeasured bandwidth clipping unit test per NickM's bugfix for the Unmeasured=1 issue
2013-02-19 11:06:24 -05:00
Andrea Shepard
4c45b3d845
Add unit test for unmeasured bandwidth clipping in consensus
2013-02-19 11:06:24 -05:00
Andrea Shepard
f4d5ca9b5e
Refactor v3_networkstatus test to allow reuse of test for measuredbw
2013-02-19 11:06:24 -05:00
Nick Mathewson
6c8b6e9e78
Fix unreachable use-before-assign in test_util_join_win_cmdline
...
Apparently there is a compiler that believes this is something to
warn about.
2013-02-15 15:57:47 -05:00
Nick Mathewson
9b2bb901d7
Fix a null-deref-on-fail in unit tests
...
If geoip_format_bridge_stats() returned NULL when it should have
returned a string, we would have tried to deref NULL, and died. Not
a big deal in the unit tests, but still worth fixing.
Found by coverity; This is CID 743384.
2013-02-11 16:32:13 -05:00
Nick Mathewson
52263b0dda
Fix even more dead code and resource leaks in the unit tests
...
Found by coverity
2013-02-11 15:20:20 -05:00
Nick Mathewson
717946089b
Resolve memory leaks in the unit tests and benchmarks (found by coverity)
...
These shouldn't really matter, but it's nice to be leak-free.
2013-02-11 14:57:10 -05:00
Nick Mathewson
ffd6e557cb
Speed up the curve25519 unit test by doing fewer iterations
...
This test was accounting for about 2/3 of our unit tests' runtime,
even on systems with a fast curve25519. No test should take so long.
2013-02-11 13:55:42 -05:00
Nick Mathewson
029d2c6587
Unit test for tor_weak_random_range
2013-02-08 16:46:35 -05:00
Nick Mathewson
522b312a51
whitespace fix
2013-02-07 14:31:51 -05:00
Nick Mathewson
266419d244
Tolerate curve25519 backends where the high bit of the pk isn't ignored
...
Right now, all our curve25519 backends ignore the high bit of the
public key. But possibly, others could treat the high bit of the
public key as encoding out-of-bounds values, or as something to be
preserved. This could be used to distinguish clients with different
backends, at the cost of killing a circuit.
As a workaround, let's just clear the high bit of each public key
indiscriminately before we use it. Fix for bug 8121, reported by
rransom. Bugfix on 0.2.4.8-alpha.
2013-02-07 14:09:01 -05:00
Nick Mathewson
1dd03fbc77
Fix a silly mistake in the tor_mathlog() documentation. Give it a unit test.
2013-02-01 16:09:16 -05:00
Nick Mathewson
a0351311ae
Fix unit test to not expect v2 directory request geoip info
...
When we implemented #5823 and removed v2 directory request info, we
never actually changed the unit tests not to expect it.
Fixes bug 8084; bug not in any released version of Tor.
2013-01-29 12:01:41 -05:00
Nick Mathewson
c71b7db8f3
Merge remote-tracking branch 'karsten/bug5823'
2013-01-19 09:36:55 -05:00
Nick Mathewson
2386a98d46
Add a missing part of bug 7311's makefile.nmake tweaks
...
Fix by "ultramage".
This already has a changes entry.
2013-01-17 10:01:22 -05:00
Karsten Loesing
da1e44ee51
Remove dirreq-v2-* lines from extra-info descriptors.
...
Implements the rest of #5823 .
2013-01-17 10:46:34 +01:00
Jérémy Bobbio
aa01d0a183
Implement proposal 204: ignore subdomains in hidden service addresses
...
The implementation is pretty straightforward: parse_extended_hostname() is
modified to drop any leading components from an address like
'foo.aaaaaaaaaaaaaaaa.onion'.
2013-01-16 23:29:59 -05:00
Nick Mathewson
b998431a33
Merge branch '024_msvc_squashed'
...
Conflicts:
src/or/or.h
srcwin32/orconfig.h
2013-01-16 22:32:12 -05:00
Nick Mathewson
3b2abd8a40
Add more test modules for nmake makefiles
2013-01-16 22:29:39 -05:00
Nick Mathewson
aa8f30a487
Try to build tinytest.obj from the right sources
2013-01-16 22:29:39 -05:00
Nick Mathewson
ca3bc8973b
use the /Fe flag with msvc
...
Fixes 7309
2013-01-16 22:29:39 -05:00
Nick Mathewson
9ddcd96149
Add missing targets to src/test/Makefile.nmake. Fix for 7316
2013-01-16 22:29:39 -05:00
Nick Mathewson
b7dd716195
Add missing includes and libs to makefile.nmake
...
Fixes bugs 7312 and 7310.
2013-01-16 22:29:38 -05:00
Nick Mathewson
ca18768fb2
Aftermath of isin->contains renaming
...
Fix wide lines and comments, and add a changes file
2013-01-16 16:57:32 -05:00
Nick Mathewson
49e619c1cf
Rename *_isin to *_contains
...
This is an automatically generated commit, from the following perl script,
run with the options "-w -i -p".
s/smartlist_string_num_isin/smartlist_contains_int_as_string/g;
s/smartlist_string_isin((?:_case)?)/smartlist_contains_string$1/g;
s/smartlist_digest_isin/smartlist_contains_digest/g;
s/smartlist_isin/smartlist_contains/g;
s/digestset_isin/digestset_contains/g;
2013-01-16 16:57:11 -05:00