summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2017-09-18Merge branch 'maint-0.3.1'Nick Mathewson
2017-09-18Make hs_ntor_ref.py work with python3Nick Mathewson
2017-09-15Replace accumulated C ;;s with ;sNick Mathewson
I don't know where these came from.
2017-09-15Merge branch 'scan-build-032'Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-15Merge branch 'remove_allow_dotexit_v2'Nick Mathewson
2017-09-15Remove AllowDotExit.Nick Mathewson
It's been deprecated since 0.2.9.2-alpha. Closes ticket 23426.
2017-09-15Merge remote-tracking branch 'dgoulet/ticket12541_032_02'Nick Mathewson
2017-09-15sched: Define SCHEDULER_KIST_PRIVATE for more encapsulationDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15test: Fix unit tests with latest scheduler changesDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Make the scheduler object staticDavid Goulet
Each type of scheduler implements its own static scheduler_t object and returns a reference to it. This commit also makes it a const pointer that is it can only change inside the scheduler type subsystem but not outside for extra protection. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Add Schedulers torrc optionDavid Goulet
This option is a list of possible scheduler type tor can use ordered by priority. Its default value is "KIST,KISTLite,Vanilla" which means that KIST will be used first and if unavailable will fallback to KISTLite and so on. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: revisist compatibility on non-linux systemsMatt Traudt
Wrap things in HAVE_KIST_SUPPORT until Tor compiles and tests cleanly on my OS X machine.
2017-09-15sched: rename scheduler to the_schedulerMatt Traudt
2017-09-15sched: Implement the KIST schedulerMatt Traudt
Closes #12541 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Remove vanilla sched options that will be going awayMatt Traudt
- massive change to src/tgest/test_options.c since the sched options were added all over the place in it - removing the sched options caused some tests to pass/fail in new ways so I assumed current behavior is correct and made them pass again - ex: "ConnLimit must be greater" lines - ex: "Authoritative directory servers must" line - remove test_options_validate__scheduler in prep for new sched tests Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15repair test_key_expiration.shNick Mathewson
2017-09-15test: Make check-spaces happyDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15fixup! test: Add HS v3 client-side test for picking intro pointsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15test: Add HS v3 client-side test for picking intro pointsGeorge Kadianakis
This commit adds a pretty advanced test for the client-side making sure that picking intro is done properly. This unittest also reveals a memleak on the client_pick_intro() function which is fixed by the subsequent commit. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15test: Improve HS v3 helper for building intro points.George Kadianakis
Valid intro points need both legacy key and ipv4. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15test: Unit test for the hs indexesDavid Goulet
Using a test vector in python, test both hs_build_hsdir_index() and hs_build_hs_index(). This commit also adds the hs_build_address.py to EXTRA_DIST which was missing. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15prop224 test: Enrich the client_service_hsdir_set_sync() test.George Kadianakis
Do two major improvements: a) Make the client pick 6 HSDirs instead of just 1 and make sure they all match the service's HSDirs. b) Test two additional missing scenarios borrowed from the test_reachability() test.
2017-09-14Merge remote-tracking branch 'catalyst-oniongit/skew'Nick Mathewson
2017-09-14Refactor control_event_bootstrap_problemTaylor Yu
Change the contract of control_event_bootstrap_problem() to be more general and to take a connection_t. New function control_event_bootstrap_prob_or() has the specific or_connection_t funcionality previously used.
2017-09-14Merge branch 'bug23019_squashed'Nick Mathewson
2017-09-14prop224 client-side: Start validating onion address pubkeys.George Kadianakis
Fix the test_build_address() test and its test vectors python script. They were both using a bogus pubkey for building an HS address which does not validate anymore. Also fix a few more unittests that were using bogus onion addresses and were failing the validation. I replaced the bogus address with the one generated from the test vector script.
2017-09-14Merge branch 'maint-0.3.1'Nick Mathewson
2017-09-14Merge remote-tracking branch 'mikeperry/bug23077' into maint-0.3.1Nick Mathewson
2017-09-14Bug 23077: Make channelpadding tests use mocked time.Mike Perry
2017-09-13Merge branch 'bug23466_squashed'Nick Mathewson
2017-09-13prop224 test: Test client desc expiration in tests.George Kadianakis
We enrich the test_client_cache() test in two ways: a) We check that transitioning time periods also cleans up expired descriptors in client memory. b) We test hs_cache_lookup_as_client() instead of lookup_v3_desc_as_client(). The former is a higher level function which calls the latter and allows us to test deeper into the subsystem.
2017-09-12Fix warnings about passing uninitialized buffers into functionsNick Mathewson
Most of these buffers were never actually inspected, but it's still bad style.
2017-09-12Do not cast junk to an ed25519 key in test.Nick Mathewson
2017-09-12Fix unit test that likes to cast integers to void*Nick Mathewson
2017-09-12Clear up dead-assignment warnings from scan-buildNick Mathewson
2017-09-12clang scan-build: Fix "dead increment" warnings.Nick Mathewson
For the most part, these indicated a spot where the code could have been better.
2017-09-12clang scan-build: Fix "dereference of null pointer" warningsNick Mathewson
These warnings are all in the tests, and happen because something that one part of the code checks for null-ness is later dereferenced.
2017-09-12Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-09-12Merge branch 'maint-0.3.1'Nick Mathewson
2017-09-12Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-09-12Avoid sscanf() warnings from openbsd in the unit testsNick Mathewson
OpenBSD doesn't like tricks where you use a too-wide sscanf argument for a too-narrow array, even when you know the input string statically. The fix here is just to use bigger buffers. Fixes 15582; bugfix on a3dafd3f58bb312 in 0.2.6.2-alpha.
2017-09-12hs-v3: Stall SOCKS connection when no live consensus availableDavid Goulet
Fixes #23481 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-12Merge branch 'ticket21031'Nick Mathewson
2017-09-12Merge branch 'bug23347_squashed'Nick Mathewson
2017-09-12Add a missing bridge download status resetteor
17750 made unused download schedules automatically reset. But we should make that explicit.
2017-09-12Make clients wait to refresh bridges when they have a recent descriptorteor
But when clients are just starting, make them try each bridge a few times before giving up on it. These changes make the bridge download schedules more explicit: before 17750, they relied on undocumented behaviour and specific schedule entries. (And between 17750 and this fix, they were broken.) Fixes 23347, not in any released version of tor.
2017-09-12Merge branch 'maint-0.3.1'Nick Mathewson
2017-09-12Merge branch 'ticket17857_squashed' into maint-0.3.1Nick Mathewson
2017-09-12Ticket #17857: Apply padding off-switch to existing connections.Mike Perry