Commit Graph
604 Commits
Author SHA1 Message Date
Nick Mathewson a0a855d586 Fix unit tests with --disable-curve25519 2013-09-08 17:14:07 -04:00
Roger Dingledine 6156887adf Merge branch 'maint-0.2.4'
Conflicts:
	src/test/test.c
2013-09-04 23:44:39 -04:00
Roger Dingledine bb32bfa2f2 refactor and give it unit tests 2013-09-04 23:21:45 -04:00
Nick Mathewson 5c9008e0b0 Fix some "ISO C90 forbids mixed declarations and code" warnings 2013-09-03 13:39:31 -04:00
Nick Mathewson 3753488011 Fix warnings in test_config_fix_my_family 2013-09-03 13:35:44 -04:00
Nick Mathewson eb5f22eff2 Merge remote-tracking branch 'Ryman/bug4341' 2013-09-03 13:16:22 -04:00
Nick Mathewson 270b4f030a Handle HTTP minor versions greater than 9
(In practice they don't exist, but so long as we're making changes for
standards compliance...)

Also add several more unit tests for good and bad URL types.
2013-09-03 11:38:15 -04:00
Kevin Butler 5327605caa Tougher validation for parsing urls from HTTP headers. Fixes #2767. 2013-09-03 01:14:43 +01:00
Kevin Butler 0513643317 MyFamily option will now fix fingerprints missing their leading instead of complaining. Should fix #4341. 2013-08-31 04:49:04 +01:00
Nick Mathewson 078d6bcda5 Basic unit test for EVENT_TRANSPORT_LAUNCHED 2013-08-25 11:29:03 -04:00
Nick Mathewson 172a55d9d6 Fix a wide line in test_geoip_with_pt 2013-08-15 12:10:10 -04:00
Nick Mathewson 74262f1571 Merge branch 'bug5040_4773_rebase_3' 2013-08-15 12:04:56 -04:00
George Kadianakis c5269a59b0 Test ExtORPort cookie initialization when file writing is broken. 2013-08-15 12:03:38 -04:00
George Kadianakis 94db455472 Test some fail conditions of ext_orport.c USERADDR/TRANSPORT parsing. 2013-08-15 12:03:38 -04:00
George Kadianakis 794447d03d Fix some #5040 bugs found by Nick's tests.
- Set conn->address when we receive a USERADDR command.
- Set conn->state to a sane value when we transition from Extended
  ORPort to ORPort.
2013-08-15 12:03:38 -04:00
George Kadianakis 33c3e60a37 Implement and use a generic auth. cookie initialization function.
Use the generic function for both the ControlPort cookie and the
ExtORPort cookie.

Also, place the global cookie variables in the heap so that we can
pass them around more easily as pointers.

Also also, fix the unit tests that broke by this change.

Conflicts:
	src/or/config.h
	src/or/ext_orport.c
2013-08-15 12:03:37 -04:00
Nick Mathewson 28bb673584 White-box tests for the succeeding case of ext_or_port handshake.
(Okay, white-box plus mocking enough other functions so they don't
crash.)
2013-08-15 12:03:37 -04:00
Nick Mathewson 636aeb1f24 Test for initializing ext_or_auth_cookie file 2013-08-15 12:03:37 -04:00
Nick Mathewson 4e868a9bc3 Unit test for the ext_orport safe_cookie handshake 2013-08-15 12:03:37 -04:00
Nick Mathewson fd6749203e More unit tests for handle_client_auth_nonce
Incidentally, this business here where I make crypto_rand mockable:
this is exactly the kind of thing that would make me never want to
include test-support stuff in production builds.
2013-08-15 12:03:37 -04:00
Nick Mathewson 4526c3e0b6 Unit test for basic ext_or_cookie authentication backend 2013-08-15 12:03:37 -04:00
Nick Mathewson 03e3881043 Tests for connection_write_ext_or_command. 2013-08-15 12:03:36 -04:00
Nick Mathewson c342ea9879 Unit tests for ext_or_id_map. 2013-08-15 12:03:36 -04:00
Nick Mathewson 7da59721a9 Unit tests for fetch_ext_or_cmd 2013-08-15 12:03:36 -04:00
Nick Mathewson 7a12cbc03d Split out buffers and socks tests into separate modules.
No other changes were made here.  Keeping everything in
src/test/test.c was a legacy of back when we had all our unit tests in
one big file.

Doing this now because I'm adding an ext_or_command test.
2013-08-15 12:03:36 -04:00
George Kadianakis 6ad535e6dc If a single client connects with multiple transports, note all transports. 2013-08-15 12:03:34 -04:00
George Kadianakis 85c556a4c2 Trivially change unittests to make them more readable.
Pluggable transport names are now in alphabetical order like they
appear in the bridge-ip-transports string.
2013-08-15 12:03:34 -04:00
George Kadianakis b2c7379aec Make check-spaces happy. 2013-08-15 12:03:34 -04:00
George Kadianakis f8a9591d31 Fix some unittests that broke when we added bridge-ip-transports. 2013-08-15 12:03:33 -04:00
George Kadianakis f4b36bee7e Add a unittest for the bridge-ip-transports extra-info line. 2013-08-15 12:03:33 -04:00
George Kadianakis 0c4baa016f Also test that server transports get written to Tor's state. 2013-08-05 21:05:39 +03:00
George Kadianakis 00a7d1af9f test_pt_configure_proxy(): verify the internals of the managed proxy. 2013-08-05 21:05:35 +03:00
Arlo Breault 506a01bda8 Use size_t for length in replaycache_add_test_and_elapsed()
For consistency with the rest of buffer lengths in Tor.

See #8960
2013-08-04 09:29:22 -04:00
Nick Mathewson 9ac0a681ce Unit test for smartlist_ints_eq
(This was the only wholly untested function in containers.c)
2013-08-02 13:45:25 -04:00
Nick Mathewson 362f60e2d4 Try to make the win32 ersatz_socketpair pass. 2013-08-02 11:04:30 -04:00
Nick Mathewson bcc39c4666 Unit test for tor_{ersatz_,}socketpair.
This catches tor_accept as well.
2013-08-02 10:36:36 -04:00
Nick Mathewson b8d9c84037 Simple unit test for tor_open_socket_with_extensions 2013-08-02 10:05:17 -04:00
Nick Mathewson 904a58d10f Merge branch 'bug9288_rebased'
Conflicts:
	src/test/test_pt.c
2013-07-31 13:51:15 -04:00
Nick Mathewson 8a0eedbbb0 Fix mixed declaration/statement warning 2013-07-31 13:36:17 -04:00
Nick Mathewson 22a074caa7 Update pt/configure_proxy until it stops segfaulting 2013-07-31 13:34:16 -04:00
George Kadianakis aaf79eb4d3 Write unit tests for configure_proxy(). 2013-07-31 13:34:16 -04:00
Nick Mathewson 8f0755fa85 Whoops; check in test_circuitmux.c 2013-07-19 12:05:38 -04:00
Nick Mathewson 34ad7642c8 Regression test for destroy cell queue
This exercises the code that crashed and caused #9296.
2013-07-19 10:17:00 -04:00
George Kadianakis 0ec4e5a698 Add transport information to the GeoIP database. 2013-07-18 14:59:57 -04:00
Nick Mathewson f45e1fbd5b Start of a unit test for options_validate.
I added this so I could write a unit test for ServerTransportOptions,
but it incidentally exercises the succeed-on-defaults case of
options_validate too.
2013-07-18 14:40:12 -04:00
Nick Mathewson 1e78100b25 Add a test for n_cells_in_circuit_queues 2013-07-18 11:23:45 -04:00
Nick Mathewson ae64197195 Unit tests for cell queues.
This removes some INLINE markers from functions that probably didn't
need them.
2013-07-18 11:23:45 -04:00
Nick Mathewson e6c0fb2b6d Fix a wide line in test_pt.c 2013-07-18 08:49:52 -04:00
Nick Mathewson d7ccb6a3b1 Merge branch 'bug8978_rebase_2'
Conflicts:
	src/test/test_pt.c
2013-07-18 08:48:20 -04:00
Nick Mathewson b551988ef4 Merge branch 'bug8929_rebase_2' 2013-07-18 08:45:13 -04:00