aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
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>
2016-07-01Add an extra check to test_dir to try to debug windows jenkins issueNick Mathewson
2016-06-30Make sure that our tests expect the windows path separator as neededNick Mathewson
2016-06-30One more tt_u64_opNick Mathewson
2016-06-30use tt_u64_op for comparing len_descs_dumpedNick Mathewson
2016-06-30Fix more naked strdup/malloc/free instancesNick Mathewson
2016-06-30Avoid naked strdups in test_dir.cNick Mathewson
2016-06-30Fix a memory leak in test_dir_populate_dump_desc_fifoNick Mathewson
2016-06-30Merge remote-tracking branch 'andrea/ticket19323_squashed'Nick Mathewson
2016-06-30Merge remote-tracking branch 'andrea/bug18322_v3_squashed'Nick Mathewson
2016-06-30Add unit test for dump_desc_populate_fifo_from_directory()Andrea Shepard
2016-06-30Unit test for dump_desc_populate_one_file()Andrea Shepard
2016-06-30Move unparseable descriptor dumps into subdirectory of DataDirAndrea Shepard
2016-06-30Add dir/dump_unparseable_descriptors unit testAndrea Shepard
2016-06-30Add tv_udiff and tv_mdiff unit tests with negative valuesteor (Tim Wilson-Brown)
2016-06-29Add more unit tests for tv_udiff and tv_mdiffteor (Tim Wilson-Brown)
2016-06-29Unit tests for GETINFO download/desc and download/bridge casesAndrea Shepard
2016-06-29Unit test for GETINFO download/cert caseAndrea Shepard
2016-06-29Unit test for GETINFO download/networkstatus caseAndrea Shepard
2016-06-23Merge remote-tracking branch 'public/bug15942_v2_alternative'Nick Mathewson
2016-06-20Coverage hack for test_switch_id.shNick Mathewson
This hack provides a way to make sure we can see coverage from test-switch-id. If you set OVERRIDE_GCDA_PERMISSIONS_HACK, we temporarily make the .gcda files mode 0666 before we run the test scripts, and then we set them to 0644 again afterwards. That's necessary because the test_switch_id.sh script does a setuid() to 'nobody' part way through, and drops the ability to change its mind back.
2016-06-20Small coverage improvements on compat.cNick Mathewson
2016-06-20More coverage in backtrace.cNick Mathewson
2016-06-20Merge remote-tracking branch 'dgoulet/bug19465_029_01'Nick Mathewson
2016-06-20Fix unit test crash on 32-bit.Nick Mathewson
2016-06-20test: Increase offset to rendcache descriptor timeDavid Goulet
Slow system can sometime take more than 10 seconds to reach the test callsite resulting in the unit test failing when using time in the future or in the past. Fixes #19465 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-20Merge branch 'bug14013_029_01_squashed'Nick Mathewson
2016-06-20Make base16_decodes return number of decoded bytesnikkolasg
base16_decodes() now returns the number of decoded bytes. It's interface changes from returning a "int" to a "ssize_t". Every callsite now checks the returned value. Fixes #14013 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-19Fix #19063: Add check in utility macroU+039b
2016-06-19Merge branch 'zlib_coverage_squashed'Nick Mathewson
2016-06-19Unindent blockNick Mathewson
2016-06-19Remove support for zlib <= 1.1Nick Mathewson
zlib 1.2 came out in 2003; earlier versions should be dead by now. Our workaround code was only preventing us from using the gzip encoding (if we decide to do so), and having some dead code linger around in torgzip.c
2016-06-19Merge remote-tracking branch 'public/thread_coverage'Nick Mathewson
2016-06-18Unit test for DL_SCHED_RANDOM_EXPONENTIALAndrea Shepard
2016-06-18Keep make check-spaces happyAndrea Shepard
2016-06-17Merge branch 'bug18280_029_03_nm_squashed'Nick Mathewson
2016-06-17test: Add base32_encode/decode unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-16Coverage on parse_config_line_from_str_verbose.Nick Mathewson
2016-06-16Remove parse_config_line_from_str aliasNick Mathewson
All of our code just uses parse_config_line_from_str_verbose.
2016-06-16Mark code unreachable in unescape_string()Nick Mathewson
Also, add tests for it in case someday it does become reachable.
2016-06-16On Windows, tv_sec is long, not time_t.Nick Mathewson
I'm not angry, Windows: just very disappointed.