summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2016-07-28Fix a huge pile of -Wshadow warnings.Nick Mathewson
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
2016-07-28Merge branch 'bug18902_squashed'Nick Mathewson
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.
2016-07-26Merge branch 'feature19116_squashed'Nick Mathewson
2016-07-26We fixed #15937, update a commentteor (Tim Wilson-Brown)
2016-07-26Call chutney's test-network.sh when it is availableteor (Tim Wilson-Brown)
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-26Add a dry run mode to test-network.shteor (Tim Wilson-Brown)
2016-07-26Add a function to simplify a fraction.Nick Mathewson
Apparently remembering euclid's algorithm does pay off sooner or later.
2016-07-26Remove windows debugging prints: it was an integer overflow hitting ftrapvNick Mathewson
2016-07-26Redux: Temporarily add windows verbosity to track down jenkins failuresNick Mathewson
2016-07-21Make monotime test mocking work with oom tests.Nick Mathewson
2016-07-21Use new mock functions in buffer/time_tracking testNick Mathewson
2016-07-19Merge branch 'monotonic_v2_squashed'Nick Mathewson
2016-07-19Unit tests for monotonic timeNick Mathewson
2016-07-19convert timers.c to use real monotonic time.Nick Mathewson
2016-07-18Rewrite test-network.sh so out-of-tree and $PATH binaries workteor (Tim Wilson-Brown)
2016-07-17Keep make check-spaces happyAndrea Shepard
2016-07-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-07-17Fix warnings in test_util_formats.Nick Mathewson
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-08Merge remote-tracking branch 'sebastian/libevent2'Nick Mathewson
2016-07-06test coverage on onion_fast: 0%->100%Nick Mathewson
2016-07-06Capture the LOG_ERR messages in our tests that had logged errors.Nick Mathewson
(It's confusing for the test to write an expected error to stdout, and then tell the user "OK".)
2016-07-06When saving mocked log messages, always create the list.Nick Mathewson
Otherwise, our code needs to check "list && smarlist_len(list)..."
2016-07-06Improve test coverage a little on onion*.cNick Mathewson
2016-07-06Fix sign in test-timersNick Mathewson
2016-07-05Merge remote-tracking branch 'teor/bug18456'Nick Mathewson
2016-07-05Test: fix shared random test checking bad errnoDavid Goulet
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-05Fix shared-random testNick Mathewson
2016-07-05Merge branch 'maint-0.2.8'Nick Mathewson
2016-07-05Repair unit test that assumed we have 9 dirauths.Nick Mathewson
2016-07-05Merge remote-tracking branch 'dgoulet/bug19567_029_01'Nick Mathewson
2016-07-05Merge remote-tracking branch 'asn/bug19551'Nick Mathewson
2016-07-04sr: add the base16 RSA identity digest to commitDavid Goulet
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-04test: Fix shared random buffer overrunDavid Goulet
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-04Raise libevent dependency to 2.0.10-stable or newerSebastian Hahn
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-02Fix edge case fail of shared random unittest.George Kadianakis
The test_state_update() test would fail if you run it between 23:30 and 00:00UTC in the following line because n_protocol_runs was 2: tt_u64_op(state->n_protocol_runs, ==, 1); The problem is that when you launch the test at 23:30UTC (reveal phase), sr_state_update() gets called from sr_state_init() and it will prepare the state for the voting round at 00:00UTC (commit phase). Since we transition from reveal to commit phase, this would trigger a phase transition and increment the n_protocol_runs counter. The solution is to initialize the n_protocol_runs to 0 explicitly in the beginning of the test, as we do for n_reveal_rounds, n_commit_rounds etc.
2016-07-01Keep make check-spaces happyAndrea Shepard
2016-07-01Windows open() returns eacces when eisdir would be saneNick Mathewson
2016-07-01Fix i386 conversion warningsNick Mathewson
2016-07-01Fix a -Wmissing-variable-declarations warningNick Mathewson
2016-07-01Merge remote-tracking branch 'dgoulet/ticket16943_029_05-squashed'Nick Mathewson
Trivial Conflicts: src/or/or.h src/or/routerparse.c
2016-07-01prop250: Add a DEL state action and return const SRVsDavid Goulet
The *get* state query functions for the SRVs now only return const pointers and the DEL action needs to be used to delete the SRVs from the state. Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-01prop250: Use the new dirvote_get_intermediate_param_value for ↵David Goulet
AuthDirNumSRVAgreements Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-01Refactor parameter computation and add a helper functionNick Mathewson
This patch makes us retain the intermediate list of K=V entries for the duration of computing our vote, and lets us use that list with a new function in order to look up parameters before the consensus is published. We can't actually use this function yet because of #19011: our existing code to do this doesn't actually work, and we'll need a new consensus method to start using it. Closes ticket #19012.
2016-07-01prop250: Change reveal_num to uint64_t and version to uint32_tDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-01prop250: Don't reject votes containing commits of unknown dirauths.George Kadianakis
Instead just ignore those commits. Squash this commit with 33b2ade.
2016-07-01prop250: Fix unit tests about the RSA fingerprint checkDavid Goulet
Code has been changed so every RSA fingerprint for a commit in our state is validated before being used. This fixes the unit tests by mocking one of the key function and updating the hardcoded state string. Also, fix a time parsing overflow on platforms with 32bit time_t Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-07-01prop250: Sort smartlist before you get most frequent SRV.George Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-01prop250: Use RSA identity digest instead of fingerprintDavid Goulet
The prop250 code used the RSA identity key fingerprint to index commit in a digestmap instead of using the digest. To behavior change except the fact that we are actually using digestmap correctly. Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-01prop250: Add unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>