Commit Graph

1054 Commits

Author SHA1 Message Date
rl1987 a13f944314 Black box test for get_interface_address6_via_udp_socket_hack(). 2015-03-31 14:36:35 -04:00
teor d0759da14e Avoid calling SMARTLIST_FOREACH on a NULL smartlist in tests
Check if each smartlist is NULL before calling SMARTLIST_FOREACH on it.

Bug discovered by the clang static analyzer.
Apple clang 600.0.56 (LLVM 3.5svn) on x86_64-apple-darwin14.1.0.
2015-02-08 23:41:37 +11:00
Nick Mathewson e36faeec1d Merge remote-tracking branch 'sebastian/bug13993' 2015-02-06 15:42:53 -05:00
Sebastian Hahn e0c3de40ad Fix check-spaces complaints 2015-02-06 21:36:40 +01:00
Sebastian Hahn b3bc871214 Add unit test for #13290 2015-02-06 21:04:05 +01:00
Nick Mathewson ac8f235446 fix a unit tests memory leak (my fault) 2015-02-03 15:58:48 -05:00
Nick Mathewson d03e1da232 Merge remote-tracking branch 'public/bug9635_warnings_025'
Conflicts:
	src/test/test.c
2015-02-02 16:31:32 -05:00
rl1987 a9caeb961f Test for 13865. 2015-02-02 14:38:36 -05:00
Nick Mathewson fac8d40886 Merge remote-tracking branch 'public/prop227_v2'
Conflicts:
	src/test/test_dir.c
2015-01-30 07:36:55 -05:00
Nick Mathewson bd630a899a Correctly reject packages lines with empty entries 2015-01-29 14:09:57 -05:00
Nick Mathewson 8f9fb3e8fa Try to fix some more memory leaks in the unit tests 2015-01-23 11:35:05 -05:00
Nick Mathewson 614fbf1812 Fix some memory leaks in new address tests 2015-01-23 11:26:40 -05:00
Nick Mathewson 034e2788f8 whitespace fixes 2015-01-23 11:18:28 -05:00
Nick Mathewson 7322de15dc Split the slow unit tests into their own binary
This can run in parallel with the faster ones and the other tests.
2015-01-23 11:15:53 -05:00
Nick Mathewson 420037dcef Merge branch 'if_addr_refactoring_squashed'
Conflicts:
	src/test/include.am
	src/test/test.c
2015-01-23 10:13:37 -05:00
rl1987 3966145dff Refactor code that looks up addresses from interfaces
Now the code has separate implementation and examination functions,
uses smartlists sanely, and has relatively decent test coverage.
2015-01-23 10:07:17 -05:00
Nick Mathewson 5d4bb6f61f Merge remote-tracking branch 'public/ticket9969'
Conflicts:
	src/or/directory.c
	src/or/routerlist.c
	src/or/routerlist.h
	src/test/include.am
	src/test/test.c
2015-01-23 09:36:00 -05:00
Nick Mathewson b677ccd3ab Merge remote-tracking branch 'public/ticket13762' 2015-01-23 08:55:31 -05:00
Nick Mathewson 23fc1691b6 Merge branch 'better_workqueue_v3_squashed' 2015-01-21 14:47:16 -05:00
David Goulet f52ac5be74 Fix: change copyright year in workqueue and thread tests
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-21 14:31:02 -05:00
Nick Mathewson 2e8b8c8698 Make check-spaces happier. 2015-01-19 11:56:03 -05:00
Nick Mathewson f92b01b963 Remove a now-needless testing workaround. 2015-01-19 11:55:52 -05:00
Nick Mathewson 1053af0b9c Merge branch 'bug7555_v2_squashed'
Conflicts:
	src/or/connection_edge.c
2015-01-19 11:43:41 -05:00
Nick Mathewson 4b23b398a3 Merge branch 'bug8546_squashed'
Conflicts:
	src/or/connection.c
	src/or/or.h
	src/or/relay.c
2015-01-16 09:31:50 -05:00
Nick Mathewson 13dac5e463 Move entry_port_cfg_t fields in entry_connection_t
Also rename some options for uniformity, and apply this script:

@@
entry_connection_t *conn;
@@
 conn->
+entry_cfg.
\(
 isolation_flags
\|
 session_group
\|
 socks_prefer_no_auth
\|
 ipv4_traffic
\|
 ipv6_traffic
\|
 prefer_ipv6
\|
 cache_ipv4_answers
\|
 cache_ipv6_answers
\|
 use_cached_ipv4_answers
\|
 use_cached_ipv6_answers
\|
 prefer_ipv6_virtaddr
\)
2015-01-16 09:22:58 -05:00
George Kadianakis bb56fd1f8f unittests: use tt_i64_op() instead of tt_int_op() in laplace tests.
Do this in even more places to try to fix the build.
2015-01-15 11:08:22 -05:00
Nick Mathewson a52e549124 Update workqueue implementation to use a single queue for the work
Previously I used one queue per worker; now I use one queue for
everyone.  The "broadcast" code is gone, replaced with an idempotent
'update' operation.
2015-01-15 11:05:22 -05:00
Nick Mathewson 88e36eaf0e Fix the checkdir/perms test when umask==077
Fixes 14215; bugfix on 0.2.6.2-alpha.  Reported by "cypherpunks".
2015-01-15 10:24:27 -05:00
George Kadianakis 354ddf8712 unittests: use tt_i64_op() instead of tt_int_op() in laplace tests. 2015-01-15 15:14:33 +00:00
George Kadianakis 25e7821bb1 unittests: Change some tt_assert()s to tt_int_op()s. 2015-01-15 14:43:58 +00:00
George Kadianakis 45bc5a0743 Restrict sample values of the Laplace distribution to int64_t.
This helps avoid undefined behavior from casting big double values to
int64_t. Fixes #14090.
2015-01-15 14:43:58 +00:00
Nick Mathewson cc6529e9bb Fix check-spaces 2015-01-14 11:19:35 -05:00
Nick Mathewson e5f8c772f4 Test and fix workqueue_entry_cancel(). 2015-01-14 11:17:46 -05:00
Nick Mathewson ebbc177005 Add shutdown and broadcast support to test_workqueue. 2015-01-14 11:17:46 -05:00
Nick Mathewson 81354b081b Add unit test for thread IDs. 2015-01-14 11:17:43 -05:00
Nick Mathewson 7a63005220 Basic unit test for condition variables. 2015-01-14 11:17:09 -05:00
Nick Mathewson 74b782645a Move thread tests into their own module 2015-01-14 11:09:47 -05:00
Nick Mathewson c51f7c23e3 Test a little more of compat_threads.c 2015-01-14 11:05:56 -05:00
Nick Mathewson 93ad89e9d2 Rename bench_workqueue -> test_workqueue and make it a unit test. 2015-01-14 11:05:56 -05:00
Nick Mathewson c7eebe237d Make pending work cancellable. 2015-01-14 10:56:27 -05:00
Nick Mathewson a82604b526 Initial workqueue implemention, with a simple test.
It seems to be working, but more tuning is needed.
2015-01-14 10:56:24 -05:00
Nick Mathewson b72acd725a More tests as suggested by rl1987 2015-01-14 09:10:35 -05:00
Nick Mathewson 03f783c045 remove a bogus comment 2015-01-13 13:59:39 -05:00
Nick Mathewson 73d1d153dc remove needless AllowDotExit in test_entryconn_rewrite_mapaddress_automap_onion2 2015-01-13 13:56:59 -05:00
Nick Mathewson 73ccf0b33f Uncomment a test 2015-01-13 13:42:20 -05:00
Nick Mathewson 9d0fab9872 Allow MapAddress and Automap to work together
The trick here is to apply mapaddress first, and only then apply
automapping.  Otherwise, the automap checks don't get done.

Fix for bug 7555; bugfix on all versions of Tor supporting both
MapAddress and AutoMap.
2015-01-13 12:41:15 -05:00
Nick Mathewson ab6bd78eca (Disabled, failing) test for the bug in 7555. 2015-01-13 12:26:04 -05:00
Nick Mathewson 6cbe016cb1 Fix memory leaks in entryconn tests. 2015-01-13 12:13:46 -05:00
Nick Mathewson 05a80bb46c More unit tests for rewriting entry connection addresses 2015-01-13 11:08:33 -05:00
Nick Mathewson a0b4c2f1bd On jessie, we need a =, not a == 2015-01-12 22:30:40 -05:00