teor
9a2d4b6647
Stop an apparent test-network hang when used with make -j2
...
If (GNU) Make 3.81 is running processes in parallel using -j2 (or more),
it waits until all descendent processes have exited before it returns to
the shell.
When a command like "make -j2 test-network" is run, this means that
test-network.sh apparently hangs until it either make is forcibly
terminated, or all the chutney-launched tor processes have exited.
A workaround is to use make without -j, or make -j1 if there is an
existing alias to "make -jn" in the shell.
We resolve this bug in tor by using "chutney stop" after "chutney verify"
in test-network.sh.
2014-10-04 13:18:56 +10:00
Nick Mathewson
bbffd0a018
Merge remote-tracking branch 'origin/maint-0.2.5'
2014-10-03 19:58:25 -04:00
Nick Mathewson
d315b8e8bc
Merge remote-tracking branch 'public/bug13325_024' into maint-0.2.5
2014-10-03 19:57:41 -04:00
Nick Mathewson
d1fa0163e5
Run correctly on OpenBSD systems without SSL_METHOD.get_cipher_by_char
...
Also, make sure we will compile correctly on systems where they
finally rip it out.
Fixes issue #13325 . Caused by this openbsd commit:
http://marc.info/?l=openbsd-cvs&m=140768179627976&w=2
Reported by Fredzupy.
2014-10-03 12:15:09 -04:00
Yawning Angel
c8132aab92
Send back SOCKS5 errors for all of the address related failures.
...
Cases that now send errors:
* Malformed IP address (SOCKS5_GENERAL_ERROR)
* CONNECT/RESOLVE request with IP, when SafeSocks is set
(SOCKS5_NOT_ALLOWED)
* RESOLVE_PTR request with FQDN (SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED)
* Malformed FQDN (SOCKS5_GENERAL_ERROR)
* Unknown address type (SOCKS5_ADDRESS_TYPE_NOT_SUPPORTED)
Fixes bug 13314.
2014-10-01 14:16:59 +00:00
teor
bae7334390
Add test-network delay option
...
Add a --delay option to test-network.sh, which configures the delay before
the chutney network tests for data transmission. The default remains at
18 seconds if the argument isn't specified.
Apparently we should be using bootstrap status for this (eventually).
Partially implements ticket 13161.
2014-10-01 18:05:04 +10:00
teor
7c0215f8ca
test-network.sh: Use "/bin/echo -n" rather than builtin echo
...
The default shell on OS X is bash, which has a builtin echo. When called
in "sh" mode, this echo does not accept "-n". This patch uses "/bin/echo -n"
instead.
Partially fixes issue 13161.
2014-10-01 17:56:53 +10:00
teor
27f30040f6
Add TestingDirAuthVoteExit option (like TestingDirAuthVoteGuard)
...
Add the TestingDirAuthVoteExit option, a list of nodes to vote Exit for,
regardless of their uptime, bandwidth, or exit policy.
TestingTorNetwork must be set for this option to have any effect.
Works around an issue where authorities would take up to 35 minutes to
give nodes the Exit flag in a test network, despite short consensus
intervals. Partially implements ticket 13161.
2014-10-01 17:44:21 +10:00
Andrea Shepard
a28cfa128f
Update test_relay.c for recent test suite changes and --enable-mempools support
2014-09-30 23:16:11 -07:00
Andrea Shepard
4d20c427b4
Update test_relay.c for recent test suite changes and --enable-mempools support
2014-09-30 23:15:43 -07:00
Andrea Shepard
faea058baa
Update test_channeltls.c for recent test suite changes and --enable-mempools support
2014-09-30 23:15:43 -07:00
Andrea Shepard
2d171c1081
Update test_channel.c for recent test suite changes and --enable-mempools support
2014-09-30 23:15:41 -07:00
Andrea Shepard
41cf9f6260
Add scheduler/loop unit test
2014-09-30 23:14:59 -07:00
Andrea Shepard
99d312c293
Make channel_flush_some_cells() mockable
2014-09-30 23:14:59 -07:00
Andrea Shepard
684bcd886a
Add scheduler channel states unit test
2014-09-30 23:14:58 -07:00
Andrea Shepard
dc3af04ba8
Make scheduler_compare_channels() mockable
2014-09-30 23:14:58 -07:00
Andrea Shepard
f8ceb0f028
Make scheduler_run() mockable
2014-09-30 23:14:58 -07:00
Andrea Shepard
314c2f18ae
Add scheduler/compare_channels unit test
2014-09-30 23:14:58 -07:00
Andrea Shepard
b7125961de
Expose scheduler_compare_channels() to test suite
2014-09-30 23:14:58 -07:00
Andrea Shepard
c5f73e52e5
Make circuitmux_compare_muxes() and circuitmux_get_policy() mockable
2014-09-30 23:14:58 -07:00
Andrea Shepard
030608d68d
Add scheduler/queue_heuristic unit test
2014-09-30 23:14:58 -07:00
Andrea Shepard
71a9ed6feb
Make some scheduler.c static functions visible to the test suite
2014-09-30 23:14:57 -07:00
Andrea Shepard
0af88f9096
Initial test_scheduler.c
2014-09-30 23:14:56 -07:00
Andrea Shepard
9869254608
Make scheduler.c static globals visible to test suite
2014-09-30 23:14:25 -07:00
Andrea Shepard
5a07fb96f2
Make tor_libevent_get_base() mockable
2014-09-30 23:14:25 -07:00
Andrea Shepard
5e9a88e001
Add channel_tls_num_cells_writeable_method() coverage to channeltls/num_bytes_queued unit test
2014-09-30 23:14:25 -07:00
Andrea Shepard
030b0fe107
Add channeltls/num_bytes_queued unit test
2014-09-30 23:14:25 -07:00
Andrea Shepard
a2de0a1034
Make buf_datalen() mockable
2014-09-30 23:14:25 -07:00
Andrea Shepard
8719f8ff09
Implement tlschan create and overhead estimate unit tests
2014-09-30 23:14:25 -07:00
Andrea Shepard
3b080230e9
Make connection_or_connect() mockable
2014-09-30 23:14:24 -07:00
Andrea Shepard
3bc7108d2c
Make is_local_addr() mockable
2014-09-30 23:14:24 -07:00
Andrea Shepard
50d5fb87bd
Initial test_channeltls.c
2014-09-30 23:14:24 -07:00
Andrea Shepard
462eaed43e
Limited unit test for channel_dump_statistics()
2014-09-30 23:14:24 -07:00
Andrea Shepard
5ee25cc185
Add channel/dumpstats unit test
2014-09-30 23:14:24 -07:00
Andrea Shepard
452bce6c72
Make channel_dump_statistics() mockable
2014-09-30 23:14:23 -07:00
Andrea Shepard
5a24ff0563
What the hell was I on?
2014-09-30 23:14:23 -07:00
Andrea Shepard
9740a07b8c
Check queueing case in channel/flushmux unit test too
2014-09-30 23:14:23 -07:00
Andrea Shepard
f12f7159a5
Add channel/flushmux unit test
2014-09-30 23:14:22 -07:00
Andrea Shepard
9eea42f844
Make channel_flush_from_first_active_circuit() mockable
2014-09-30 23:14:02 -07:00
Andrea Shepard
5b7a58f7c4
Make circuitmux_num_cells() mockable
2014-09-30 23:14:02 -07:00
Andrea Shepard
76fcb8cb55
Add channel/incoming unit test
2014-09-30 23:14:02 -07:00
Andrea Shepard
b5d4ef18e1
Add unknown cell queue entry type case to channel/queue_impossible unit test
2014-09-30 23:14:02 -07:00
Andrea Shepard
f7951d318a
Small channel unit test improvements
2014-09-30 23:14:01 -07:00
Andrea Shepard
ae3ed185e4
Let channel unit tests mess with global queue estimate
2014-09-30 23:14:01 -07:00
Andrea Shepard
3b78667d65
Unit test for unusual channel lifecycles
2014-09-30 23:14:01 -07:00
Andrea Shepard
b6d0aaec07
Check some can't-happen cases draining channel cell queues
2014-09-30 23:13:58 -07:00
Andrea Shepard
bbb06b73cd
Expose some channel cell queue stuff to the test suite
2014-09-30 23:09:15 -07:00
Andrea Shepard
5992a69dee
Add append_cell_to_circuit_queue() unit test
2014-09-30 23:09:15 -07:00
Andrea Shepard
46ff91b6ec
Add scheduler_channel_has_waiting_cells_mock() and some mock counter queries
2014-09-30 23:09:15 -07:00
Andrea Shepard
2ee69bd5d7
Expose get_unique_circ_id_by_chan() to test suite
2014-09-30 23:09:14 -07:00