Nick Mathewson
12cf73c451
Merge remote-tracking branch 'andrea/ticket19858_v2'
...
Conflict in entrynodes.c: any_bridge_supports_microdescriptors was
removed in master, and modified in 19858_v2
2016-10-19 17:11:47 -04:00
Chelsea H. Komlo
471b0c5175
Refactor purpose_needs_anonymity to use switch statement
2016-10-19 12:25:50 -05:00
Chelsea H. Komlo
195ccce94e
Refactor to use purpose_needs_anonymity and remove is_sensitive_dir_purpose
2016-10-18 18:40:50 -05:00
Nick Mathewson
55c468c521
Whitespace cleaning
2016-10-14 10:40:31 -04:00
Nick Mathewson
af70e43131
Merge remote-tracking branch 'public/spaces_in_unix_addrs'
2016-10-14 10:21:41 -04:00
Nick Mathewson
9615ad338f
Make the FreeBSD ersatz_socketpair test even more skippable.
...
(This is safe, since only windows actually -uses- erstaz_socketpair.)
2016-10-14 09:14:07 -04:00
Nick Mathewson
07f2e5748e
ersatz socketpair tests: work around freebsd jails.
2016-10-13 09:47:28 -04:00
Nick Mathewson
0e1b228aa6
Fix a bug in displaying IPv6 addrs in test_op_ipv6_ with --verbose
...
The test code, if it failed, or if it was run in verbose mode, would
use the wrong variable for its loop. Patch from rubiate uploaded to
19999.
2016-10-11 20:09:24 -04:00
paolo.ingls@gmail.com
ab78a4df93
torrc parsing b0rks on carriage-return
...
(Specifically, carriage return after a quoted value in a config
line. Fixes bug 19167; bugfix on 0.2.0.16-alpha when we introduced
support for quoted values. Unit tests, changes file, and this
parenthetical by nickm.)
2016-10-11 09:25:22 -04:00
Nick Mathewson
05aed5b635
Allow a unix: address to contain a C-style quoted string.
...
Feature 18753 -- all this to allow spaces.
2016-10-04 15:43:20 -04:00
Nick Mathewson
ed5d2daba1
Merge remote-tracking branch 'public/ticket20001_v2'
2016-09-26 11:01:10 -07:00
Nick Mathewson
97337844b7
Merge branch 'protover_v2_squashed'
2016-09-26 11:00:08 -07:00
Nick Mathewson
3a3120819c
Rename compute_protover_vote to protover_compute_vote
2016-09-26 10:56:53 -07:00
Nick Mathewson
e402cddefe
Clean whitespace, add missing documentation
2016-09-26 10:56:52 -07:00
Nick Mathewson
a232161f7b
Cover the error cases of parsing protocol versions
...
Also, detect an additional failure type. Thanks, tests!
(How distinctly I recall thee)
2016-09-26 10:56:50 -07:00
Nick Mathewson
0697e413ef
Unit tests for protover_all_supported
2016-09-26 10:56:49 -07:00
Nick Mathewson
c1be8f9d57
Basic backend for the protocol-versions voting algorithm.
...
[This is a brute-force method that potentially uses way too much
RAM. Need to rethink this a little. Right now you can DOS an
authority by saying "Foo=1-4294967295".]
2016-09-26 10:56:49 -07:00
Nick Mathewson
4df12239f6
Emit and parse protocol lists in router descriptors
2016-09-26 10:56:49 -07:00
Nick Mathewson
b2b2e1c7f2
checkpoint basic protover backend
2016-09-26 10:56:48 -07:00
Andrea Shepard
006c26f54f
Abolish globals in entrynodes.c; relativize guard context to new guard_selection_t structure
2016-09-25 02:11:44 +00:00
Nick Mathewson
0baa276ea9
Coverity warning fix: let coverity tell we're closing sockets
...
Our use of the (mockable) tor_close_socket() in the util/socket_..
tests confused coverity, which could no longer tell that we were
actually closing the sockets.
2016-09-22 09:24:56 -04:00
Nick Mathewson
6cb9c2cf77
Add support for AES256 and AES192
...
(This will be used by prop224)
2016-09-16 11:21:33 -04:00
Nick Mathewson
ff116b7808
Simplify the crypto_cipher_t interface and structure
...
Previously, the IV and key were stored in the structure, even though
they mostly weren't needed. The only purpose they had was to
support a seldom-used API where you could pass NULL when creating
a cipher in order to get a random key/IV, and then pull that key/IV
back out.
This saves 32 bytes per AES instance, and makes it easier to support
different key lengths.
2016-09-16 10:12:30 -04:00
Nick Mathewson
b08ddb60c9
Ensure that dir1 and dir2 are freed at the end of poisoning test
...
Found by coverity.
2016-09-14 11:01:21 -04:00
Nick Mathewson
8b7922b282
Merge remote-tracking branch 'teor/feature20072'
2016-09-14 10:18:41 -04:00
Nick Mathewson
4f4e995d42
Merge branch 'bug20081'
2016-09-14 10:17:04 -04:00
teor
16085a8421
Add some chutney single onion networks to make test-network-all
...
This requires a recent version of chutney, with the single onion
network flavours (git c72a652 or later).
Closes ticket #20072 .
2016-09-14 12:17:10 +10:00
Nick Mathewson
831649f56e
Fix a memory leak in options/validate__single_onion
2016-09-13 10:40:42 -04:00
Nick Mathewson
2237478045
options/validate__single_onion test: use new log capture api
...
I changed the API here in deb294ff53
, to be less annoying
to use.
2016-09-13 10:22:34 -04:00
Nick Mathewson
9f0cb5af15
Merge branch 'feature-17178-v7-squashed-v2'
2016-09-13 10:20:08 -04:00
teor
f311c9ffa2
Replace OnionService* with HiddenService* in option names
...
And make consequential line-length adjustments.
2016-09-13 10:13:57 -04:00
teor
365ca3ca0f
Refactor Single Onion code to improve consistency
...
* Check consistency between the two single onion torrc options
* Use the more relevant option each time we check for single onion mode
* Clarify log messages
* Clarify comments
* Otherwise, no behaviour change
2016-09-13 10:13:57 -04:00
teor (Tim Wilson-Brown)
b560f852f2
Implement Prop #260 : Single Onion Services
...
Add experimental OnionServiceSingleHopMode and
OnionServiceNonAnonymousMode options. When both are set to 1, every
hidden service on a tor instance becomes a non-anonymous Single Onion
Service. Single Onions make one-hop (direct) connections to their
introduction and renzedvous points. One-hop circuits make Single Onion
servers easily locatable, but clients remain location-anonymous.
This is compatible with the existing hidden service implementation, and
works on the current tor network without any changes to older relays or
clients.
Implements proposal #260 , completes ticket #17178 . Patch by teor & asn.
squash! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Implement Prop #260 : Single Onion Services
Redesign single onion service poisoning.
When in OnionServiceSingleHopMode, each hidden service key is poisoned
(marked as non-anonymous) on creation by creating a poison file in the
hidden service directory.
Existing keys are considered non-anonymous if this file exists, and
anonymous if it does not.
Tor refuses to launch in OnionServiceSingleHopMode if any existing keys
are anonymous. Similarly, it refuses to launch in anonymous client mode
if any existing keys are non-anonymous.
Rewrite the unit tests to match and be more comprehensive.
Adds a bonus unit test for rend_service_load_all_keys().
2016-09-13 10:10:54 -04:00
Nick Mathewson
8fdf2f583c
Unit tests for proposal 271 client-side implementation
2016-09-13 09:45:55 -04:00
Nick Mathewson
20c4b01694
Make preferred_chunk_size avoid overflow, handle big inputs better
...
Also, add tests for the function.
Closes 20081; bugfix on 0.2.0.16-alpha. This is a Guido Vranken
issue. Thanks, Guido!
2016-09-13 09:07:12 -04:00
Nick Mathewson
d5d29cd5a2
Whoops. Cant call sockaddr_in a "sin", since sin() is a thing.
2016-09-11 17:59:25 -04:00
Nick Mathewson
ccea2a5aa9
Fix gmtime unit test on openbsd
...
openbsd helpfully handles gmtime() of INT64_MIN. Good job!
Our tests didn't handle that so well.
2016-09-11 17:43:20 -04:00
Nick Mathewson
c6e70dacb8
Try to make our ersatz-socketpair test work better on FreeBSD jails
2016-09-11 17:28:29 -04:00
Nick Mathewson
a671a1c9d6
Tweak tor_gmtime_r test.
...
On openbsd64, I'm seeing a warning that the log isn't saying what
I'd expect, but I'm not seeing what the answer actually _is_ here.
2016-09-11 17:13:51 -04:00
Nick Mathewson
64521a9d35
Merge remote-tracking branch 'public/solaris_warnings_028'
2016-09-11 16:52:24 -04:00
Nick Mathewson
77e2be06f6
make check-spaces
2016-09-09 15:38:46 -04:00
Nick Mathewson
75a7997148
Fix a coupole of coverity complaints.
2016-09-09 15:29:57 -04:00
Nick Mathewson
4c55e8a58f
Fix cases where the tests were doing closesocket() on a non-socket
...
These seem to have caused warnings on windows. Hmmm.
2016-09-09 10:28:12 -04:00
Nick Mathewson
2fe7e3d9d2
Oh dear, I was missing an extern.
2016-09-09 10:20:34 -04:00
Nick Mathewson
373bfd9630
Make a couple more tests run faster.
...
The point of diminishing returns has been reached.
2016-09-09 10:08:27 -04:00
Nick Mathewson
7c52109641
Disable a single pbkdf2 test vector
...
The other test vectors are pretty complete, and get full coverage, I
believe.
This one test vector accounted for half the time spent in
test-slow. "Now that's slow!"
2016-09-09 09:57:15 -04:00
Nick Mathewson
5e30e26c6d
Chop another ~93 RSA key generations out of the unit tests
...
We have a mock for our RSA key generation function, so we now wire
it to pk_generate(). This covers all the cases that were not using
pk_generate() before -- all ~93 of them.
2016-09-09 09:45:50 -04:00
Nick Mathewson
05110c9294
Move the donna-fuzzing tests into test_slow.
...
This shaves another 3-4 seconds off the main-path tests for me,
which is again worth it, according to XKCD#1204.
2016-09-09 08:58:42 -04:00
Nick Mathewson
5ec395b27f
Re-enable RSA cacheing in tests, with a better design.
...
This makes tests faster and saves about 6 seconds for me, which
makes it worth it, according to https://xkcd.com/1205 .
2016-09-09 08:58:42 -04:00
Nick Mathewson
63e34e9e49
Reinstate a couple of teardown_capture_of_logs that I missed
...
Patch from rubiate. See #19999
2016-09-08 19:49:21 -04:00
Nick Mathewson
55713f0d79
Placate "make check-spaces"
2016-09-08 15:43:56 -04:00
Nick Mathewson
d860b99dbf
Fix remaining test warnings. (in test_relay.c)
2016-09-08 15:25:56 -04:00
Nick Mathewson
e9fdec2b1d
capture and detect expected BUG messages in shared-random tests
2016-09-08 15:13:53 -04:00
Nick Mathewson
deb294ff53
Simplify log_test_helpers interface
...
Previously, you needed to store the previous log severity in a local
variable, and it wasn't clear if you were allowed to call these
functions more than once.
2016-09-08 15:03:11 -04:00
Nick Mathewson
b0a9e54705
Resolve more BUG warnings in the unit tests
2016-09-08 14:39:20 -04:00
Nick Mathewson
d0fe86f39e
Fix bug warnings in test_circuitlist.
2016-09-08 14:04:55 -04:00
Nick Mathewson
3269307daf
Treat all nonfatal assertion failures as unit test failures.
...
Part of 19999.
2016-09-08 13:27:30 -04:00
Nick Mathewson
6a1454aa46
Tolerate another failure mode of get_if_addres6_list in tests
2016-09-08 11:47:16 -04:00
Nick Mathewson
f9cb9d8990
more consistent use of expect_log_msg_containing
2016-09-08 11:16:09 -04:00
Nick Mathewson
f64f293c48
Suppress a really impressive pile of warnings in conection/.. tests
2016-09-08 10:56:51 -04:00
Nick Mathewson
d626ffe29c
Fix a bug in connection/download_status.. tests
2016-09-08 10:48:22 -04:00
Nick Mathewson
3705ee8fe4
Revise log-testing macros to dump the actual log contents on failure
2016-09-08 10:33:01 -04:00
Nick Mathewson
ae3ea9a7a1
Remove redundant definitions of expect_{no_,}log_msg()
2016-09-08 10:32:59 -04:00
Nick Mathewson
8acb951fc8
Unit test fix: windows should be able to handle DNSPort just fine.
2016-09-08 09:23:20 -04:00
Nick Mathewson
08d1ac4f2a
Patch from rubiate: disable openbsd memory protections in test-memwipe
...
Test-memwipe is *supposed* to invoke undefined behavior, alas.
Closes 20066.
2016-09-08 09:00:24 -04:00
Nick Mathewson
bee5f38e39
set the "addr" field in the dir_handle_get tests, to resolve bug warnings.
2016-09-07 14:30:51 -04:00
Nick Mathewson
ab4485e281
Remove the useless (and uninitialized) MOCK_TOR_ADDR in test_dir_handle_get.c
2016-09-07 14:26:43 -04:00
Nick Mathewson
9d933bbacf
Capture and enforce BUG warnings in dir/param_voting_lookup
2016-09-07 13:49:18 -04:00
Nick Mathewson
075c52084d
Fix unit test failure introduced by #20002
...
Updating the consensus algorithm made a non-valid node never get
listed, which messed up some other tests.
2016-09-07 13:40:38 -04:00
Nick Mathewson
a49fee1c29
Capture and enforce bug warnings in util/time test
2016-09-07 12:15:46 -04:00
Nick Mathewson
e9b1d0619f
Merge remote-tracking branch 'dgoulet/ticket18693_029_01'
2016-09-07 11:46:00 -04:00
Nick Mathewson
3823d0aa7d
Capture and detect the BUG() warnings in test_util_parse_integer.
2016-09-06 21:01:52 -04:00
Nick Mathewson
2a4a815f58
Fix a unit test bug for passing arguments to tor_parse_ulong.
...
We wanted to make sure -50 was a bad input, but instead we were
passing a 'min' that was greater than 'max'.
2016-09-06 20:29:55 -04:00
Nick Mathewson
7ba47ca1fd
Split tor_parse_{some_int} testing into separate fn. Code movement only.
2016-09-06 20:25:54 -04:00
Nick Mathewson
43092e21c1
Merge remote-tracking branch 'teor/feature20069'
2016-09-06 19:06:32 -04:00
Nick Mathewson
5927ed8d33
checkSpace.pl now forbids more identifiers.
...
The functions it warns about are:
assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc,
strdup, strndup, calloc.
Also, fix a few lingering instances of these in the code. Use other
conventions to indicate _intended_ use of assert and
malloc/realloc/etc.
2016-09-06 12:35:37 -04:00
teor
26b47f80dd
Add hs-ipv6 to the chutney IPv6 tests
...
Requires a recent version of chutney.
Also remove bridges+hs, as it's somewhat redundant.
2016-09-06 13:45:09 +10:00
Andrea Shepard
341a159ab4
Appease make check-spaces
2016-09-05 17:47:39 +00:00
Nick Mathewson
6abce601f2
Fix BUG warning with stack trace from config/parse_port_config__listenaddress
2016-09-05 13:30:50 -04:00
Nick Mathewson
6c1d1127a8
Fix memory leaks in the shared random tests.
...
Please remember to test your code with
--enable-expensive-hardening. :)
2016-09-01 09:10:27 -04:00
Nick Mathewson
7ef4eef764
Actually, always monotime_init() in the unit tests.
2016-08-31 14:38:17 -04:00
Nick Mathewson
cfc62e2374
Initialize monotonic timer code before using it in the tests
2016-08-31 14:34:49 -04:00
Nick Mathewson
d4f05dcd0e
Detect and suppress bug message from zlib compression bomb test
2016-08-31 14:30:34 -04:00
Nick Mathewson
d299c043d4
Require specific messages for remaining link-handshake failure cases
2016-08-31 14:10:15 -04:00
Nick Mathewson
273290d4fe
Always log [bug] warnings from the unit tests.
...
We should consider them bugs. If they are happening intentionally,
we should use the log_test_helpers code to capture and suppress
them. But having them off-by-default has potential to cause
programming errors.
2016-08-31 13:22:07 -04:00
Nick Mathewson
69dce09031
Do not call tor_tls_server_info_callback(NULL) from tests.
...
This isn't valid behavior, and it causes a crash when you run
the unit tests at --debug.
I've added an IF_BUG_ONCE() check for this case.
2016-08-31 13:18:13 -04:00
Nick Mathewson
871b711f10
Work even harder not to suppress logging messages unless we mean to.
2016-08-31 13:12:36 -04:00
Nick Mathewson
2df6cdc9f9
Document and clean log_test_helpers.c a bit
...
In addition to documentation, this commit makes a function static,
and removes a weird single-point-of-return-ism, and notes a thing I
should fix.
2016-08-31 13:11:26 -04:00
Nick Mathewson
d5614b2102
Use setup_full_capture_of_logs() where appropriate.
2016-08-31 12:53:18 -04:00
Nick Mathewson
f74916a98f
setup_capture_of_logs: no longer suppress log messages
...
Previously setup_capture_of_logs would prevent log messages from
going to the console entirely. That's a problem, since sometimes
log messages are bugs! Now setup_capture_of_logs() acts sensibly.
If you really do need to keep a message from going to the console
entirely, there is setup_full_capture_of_logs(). But only use that
if you're prepared to make sure that there are no extraneous
messages generated at all.
2016-08-31 12:51:22 -04:00
Nick Mathewson
1f7dc823c5
Improvements to test_link_handshake: check specific error messages
...
Otherwise it's too easy to lose our test coverage.
2016-08-31 12:11:01 -04:00
Nick Mathewson
26a63a9303
Fix all "BUG" warnings created from link-handshake tests.
2016-08-31 11:37:18 -04:00
Nick Mathewson
14c07f3f21
Another log testing helper helper, for matching partial strings.
2016-08-31 11:35:12 -04:00
Nick Mathewson
bbaa7d09a0
Merge remote-tracking branch 'teor/reject-tap-v6'
2016-08-29 15:02:11 -04:00
David Goulet
f46ce6e3d8
test: Fix shared random unit test for big endian
...
Copying the integer 42 in a char buffer has a different representation
depending on the endianess of the system thus that unit test was failing on
big endian system.
This commit introduces a python script, like the one we have for SRV, that
computes a COMMIT/REVEAL from scratch so we can use it as a test vector for
our encoding unit tests.
With this, we use a random value of bytes instead of a number fixing the
endianess issue and making the whole test case more solid with an external
tool that builds the COMMIT and REVEAL according to the spec.
Fixes #19977
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-08-26 14:46:29 -04:00
Andrea Shepard
33a3e6f718
Avoid asserts in oos/kill_conn_list unit test
2016-08-26 00:02:00 +00:00
David Goulet
9e1cb3660b
Fix duplicated if condition in connection.c
...
Furthermore, fix a test that could returned an uninitialized value.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-08-25 14:52:28 -04:00
Nick Mathewson
1dfa2213a4
Merge remote-tracking branch 'andrea/ticket18640_v3'
2016-08-25 14:29:06 -04:00
teor (Tim Wilson-Brown)
ce747f01aa
Make port names and types consistent in the port unit tests
...
String constant changes only, and only in the unit tests.
These strings are used in log messages only.
2016-08-24 14:40:53 -04:00
teor (Tim Wilson-Brown)
41cc1f612b
Parse *Port flags NoDNSRequest, NoOnionTraffic & OnionTrafficOnly
...
OnionTrafficOnly is equivalent to NoDNSRequest, NoIPv4Traffic,
and NoIPv6Traffic.
Add unit tests for parsing and checking option validity.
Add documentation for each flag to the man page.
Add changes file for all of #18693 .
Parsing only: the flags do not change client behaviour (yet!)
2016-08-24 14:40:53 -04:00
Nick Mathewson
a3d419634b
Merge remote-tracking branch 'asn/bug19872_v2'
2016-08-23 08:50:32 -04:00
George Kadianakis
b8bfdf638e
Introduce ed25519_{sign,checksig}_prefixed functions().
2016-08-23 14:53:01 +03:00
Andrea Shepard
dbdac1dc27
s/connection_handle_oos/connection_check_oos/g per code review
2016-08-20 02:44:33 +00:00
Andrea Shepard
d65f030915
Unit test for pick_oos_victims()
2016-08-20 01:43:52 +00:00
Andrea Shepard
e17083b432
Unit test for kill_conn_list_for_oos()
2016-08-20 01:43:52 +00:00
Andrea Shepard
26c2ded00c
Unit test for connection_handle_oos()
2016-08-20 01:43:51 +00:00
Nick Mathewson
507f07de09
Merge remote-tracking branch 'public/deprecation_v2'
2016-08-19 19:58:51 -04:00
Nick Mathewson
7f145b54af
Merge remote-tracking branch 'public/Fix_19450'
2016-08-12 16:11:28 -04:00
Nick Mathewson
f5dcab8072
Add new warn_deprecated option to config_assign*().
...
Also, collapse all the config_assign*() options into a flags
argument, since having two boolean arguments was already confusing.
2016-08-03 12:52:26 -04:00
Nick Mathewson
4d4ccc505b
Search for remaining references to 'bufferevent'.
...
Remove or adjust as appropriate.
2016-08-02 13:59:47 -04:00
Nick Mathewson
46ef4487d3
Remove generic_buffer_*() functions as needless.
...
These functions were there so that we could abstract the differences
between evbuffer and buf_t. But with the bufferevent removal, this
no longer serves a purpose.
2016-08-02 13:50:00 -04:00
Nick Mathewson
cd9d39d54b
Rename generic_buffer_set_to_copy, since generic buffers are not a thing
2016-08-02 13:33:41 -04:00
Nick Mathewson
8fd6b0fc46
Remove USE_BUFFEREVENTS code outside src/or
2016-08-02 13:22:06 -04:00
Nick Mathewson
94bff894f9
Fix a large pile of solaris warnings for bug 19767.
...
In nearly all cases, this is a matter of making sure that we include
orconfig.h before we include any standard c headers.
2016-07-28 10:47:46 -04:00
Nick Mathewson
9fe6fea1cc
Fix a huge pile of -Wshadow warnings.
...
These appeared on some of the Jenkins platforms. Apparently some
GCCs care when you shadow globals, and some don't.
2016-07-28 10:22:10 -04:00
Nick Mathewson
a8676b1ede
Merge branch 'bug18902_squashed'
2016-07-28 06:59:03 -04:00
Nick Mathewson
4757303873
Fix all -Wshadow warnings on Linux
...
This is a partial fix for 18902.
2016-07-28 06:58:44 -04:00
Nick Mathewson
9de9f2d48b
Merge branch 'feature19116_squashed'
2016-07-26 19:21:04 -04:00
teor (Tim Wilson-Brown)
bf2f7c265c
We fixed #15937 , update a comment
2016-07-26 19:20:53 -04:00
teor (Tim Wilson-Brown)
64b5140256
Call chutney's test-network.sh when it is available
...
Also mark the parts of tor's test-network.sh that can be deleted
once everyone has updated to chutney's test-network.sh.
2016-07-26 19:20:53 -04:00
teor (Tim Wilson-Brown)
bb4506da6f
Add a dry run mode to test-network.sh
2016-07-26 19:20:53 -04:00
Nick Mathewson
09c25697d7
Add a function to simplify a fraction.
...
Apparently remembering euclid's algorithm does pay off sooner or later.
2016-07-26 11:23:34 -04:00
Nick Mathewson
90ca446048
Remove windows debugging prints: it was an integer overflow hitting ftrapv
2016-07-26 11:07:53 -04:00
Nick Mathewson
e77c23e455
Redux: Temporarily add windows verbosity to track down jenkins failures
2016-07-26 09:24:53 -04:00
Nick Mathewson
61ce6dcb40
Make monotime test mocking work with oom tests.
2016-07-21 07:02:34 -04:00
Nick Mathewson
50463524a9
Use new mock functions in buffer/time_tracking test
2016-07-21 07:02:33 -04:00
Nick Mathewson
558f7d3701
Merge branch 'monotonic_v2_squashed'
2016-07-19 11:42:26 +02:00
Nick Mathewson
abcb8ce25d
Unit tests for monotonic time
2016-07-19 11:40:47 +02:00
Nick Mathewson
6a2002fc09
convert timers.c to use real monotonic time.
2016-07-19 11:40:46 +02:00
teor (Tim Wilson-Brown)
6afd5506e9
Rewrite test-network.sh so out-of-tree and $PATH binaries work
2016-07-18 12:15:49 +10:00
Andrea Shepard
94c27d4e8f
Keep make check-spaces happy
2016-07-17 23:22:29 +00:00
Nick Mathewson
c138c9a2be
Merge branch 'maint-0.2.8'
2016-07-17 13:55:04 -04:00
Nick Mathewson
bec4e41f4b
Fix warnings in test_util_formats.
...
Storing 255 into a char gives a warning when char is signed.
Fixes bug 19682; bugfix on 0.2.8.1-alpha, where these tests were added.
2016-07-17 13:51:45 -04:00
teor (Tim Wilson-Brown)
24e8bb2d83
Relays make sure their own descriptor has an ntor key
2016-07-15 09:55:49 +10:00
Nick Mathewson
466259eb50
Merge remote-tracking branch 'sebastian/libevent2'
2016-07-08 09:57:31 -04:00
Nick Mathewson
acba4cc954
test coverage on onion_fast: 0%->100%
2016-07-06 13:43:12 -04:00
Nick Mathewson
08cc0ef832
Capture the LOG_ERR messages in our tests that had logged errors.
...
(It's confusing for the test to write an expected error to stdout,
and then tell the user "OK".)
2016-07-06 13:01:08 -04:00
Nick Mathewson
96d32f02f2
When saving mocked log messages, always create the list.
...
Otherwise, our code needs to check "list && smarlist_len(list)..."
2016-07-06 12:59:43 -04:00
Nick Mathewson
ae22c249c3
Improve test coverage a little on onion*.c
2016-07-06 12:37:52 -04:00
Nick Mathewson
3252550fc5
Fix sign in test-timers
2016-07-06 10:07:02 -04:00
Nick Mathewson
78196c8822
Merge remote-tracking branch 'teor/bug18456'
2016-07-05 19:10:08 -04:00
David Goulet
245c10de07
Test: fix shared random test checking bad errno
...
The test was checking for EISDIR which is a Linux-ism making other OSes
unhappy. Instead of checking for a negative specific errno value, just make
sure it's negative indicating an error. We don't need more for this test.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-05 14:00:06 -04:00
Nick Mathewson
5a047cdc5f
Fix shared-random test
2016-07-05 13:31:18 -04:00
Nick Mathewson
5c97b42cac
Merge branch 'maint-0.2.8'
2016-07-05 12:52:30 -04:00
Nick Mathewson
e99cc8740f
Repair unit test that assumed we have 9 dirauths.
2016-07-05 12:52:19 -04:00
Nick Mathewson
87758dbebc
Merge remote-tracking branch 'dgoulet/bug19567_029_01'
2016-07-05 12:14:04 -04:00
Nick Mathewson
e889da1d7f
Merge remote-tracking branch 'asn/bug19551'
2016-07-05 12:12:09 -04:00
David Goulet
267e16ea61
sr: add the base16 RSA identity digest to commit
...
Keep the base16 representation of the RSA identity digest in the commit object
so we can use it without using hex_str() or dynamically encoding it everytime
we need it. It's used extensively in the logs for instance.
Fixes #19561
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-04 12:05:48 -04:00
David Goulet
7d04638a60
test: Fix shared random buffer overrun
...
Encoded commit has an extra byte at the end for the NUL terminated byte and
the test was overrunning the payload buffer by one byte.
Found by Coverity issue 1362984.
Fixes #19567
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-04 11:40:06 -04:00
Sebastian Hahn
265e40b481
Raise libevent dependency to 2.0.10-stable or newer
...
Only some very ancient distributions don't ship with Libevent 2 anymore,
even the oldest supported Ubuntu LTS version has it. This allows us to
get rid of a lot of compat code.
2016-07-04 12:40:09 +02:00