aboutsummaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAge
* Add unit test for crypto_pk_cmp_keys and NULLNick Mathewson2012-09-17
|
* Merge branch '6044_nm_squashed'Nick Mathewson2012-09-17
|\
| * Turn the read_file_until_eof tests into a single implementationNick Mathewson2012-09-17
| |
| * Handle FIFOs in read_file_to_strmeejah2012-09-17
| | | | | | | | | | | | | | | | add read_file_to_str_until_eof which is used by read_file_to_str if the file happens to be a FIFO. change file_status() to return FN_FILE if st_mode matches S_IFIFO (on not-windows) so that init_key_from_file() will read from a FIFO.
* | Remove a duplicate test in test_util_pow2Nick Mathewson2012-09-14
| |
* | Merge branch 'bug6831_v2'Nick Mathewson2012-09-14
|\ \
| * | Don't compute ((uint64_t)1)<<64 in round_to_power_of_2Nick Mathewson2012-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This would be undefined behavior if it happened. (It can't actually happen as we're using round_to_power_of_2, since we would have to be trying to allocate exabytes of data.) While we're at it, fix the behavior of round_to_power_of_2(0), and document the function better. Fix for bug 6831.
* | | Split the generic config_fmt_t code into a new confparse.c fileNick Mathewson2012-09-13
|/ / | | | | | | | | This helps us split up one of our larger files, and sets the stage for refactoring the configuration backend a little
* | Merge remote-tracking branch 'public/bug6538'Nick Mathewson2012-09-11
|\ \ | | | | | | | | | | | | Conflicts: configure.ac
| * | In choose-by-bw, scale to better use the range of uint64Nick Mathewson2012-08-27
| | | | | | | | | | | | | | | The smart part of this is based on an approach and a suggestion by rransom. The unsmart part is my own fault.
| * | Refactor the core of choosing by weights into a functionNick Mathewson2012-08-09
| | | | | | | | | | | | | | | This eliminates duplicated code, and lets us test a hairy piece of functionality.
* | | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-09-11
|\ \ \ | |_|/ |/| |
| * | Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3Nick Mathewson2012-09-11
| |\ \ | | |/ | |/| | | | | | | Conflicts: src/test/test_util.c
| | * Fix assertion failure in tor_timegm.Nick Mathewson2012-09-11
| | | | | | | | | | | | Fixes bug 6811.
* | | Have directory authorities vote on IPv6 OR ports according to the specLinus Nordberg2012-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define new new consensus method 14 adding "a" lines to vote and consensus documents. From proposal 186: As with other data in the vote derived from the descriptor, the consensus will include whichever set of "a" lines are given by the most authorities who voted for the descriptor digest that will be used for the router. This patch implements this.
* | | Merge branch 'bug6524_nm'Nick Mathewson2012-08-27
|\ \ \
| * | | fix TESTS to include full path to src/test/testStewart Smith2012-08-09
| | | |
| * | | Move to non-recursive makeStewart Smith2012-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives us a few benefits: 1) make -j clean all this will start working, as it should. It currently doesn't. 2) increased parallel build recursive make will max out at number of files in a directory, non-recursive make doesn't have such a limitation 3) Removal of duplicate information in make files, less error prone I've also slightly updated how we call AM_INIT_AUTOMAKE, as the way that was used was not only deprecated but will be *removed* in the next major automake release (1.13).... so probably best that we can continue to bulid tor without requiring old automake. (see http://www.gnu.org/software/automake/manual/html_node/Public-Macros.html ) For more reasons why, see resources such as: http://miller.emu.id.au/pmiller/books/rmch/
* | | | Merge remote-tracking branch 'public/bug5124'Nick Mathewson2012-08-17
|\ \ \ \ | |/ / / |/| | |
| * | | Never emit the "opt" prefix in any directory stuffNick Mathewson2012-06-28
| | | | | | | | | | | | | | | | Fix for bug 5124.
* | | | Speak not the name of INT_MIN; it can upset older compilersNick Mathewson2012-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And more to the point, some GCCs will warn that you can't say it before C90. Bug not in any released version of Tor.
* | | | Fix a bunch of "implicit 64->32" warnings from introduce refactoringNick Mathewson2012-08-03
| | | |
* | | | test_assert is always in affect: no need for extra gotosNick Mathewson2012-07-31
| | | |
* | | | Remove duplicate code in test_introduce.cNick Mathewson2012-07-31
| | | | | | | | | | | | | | | | | | | | Two of the do_*_test functions were actually prefixes of the third, which suggests a trivial code elimination step
* | | | Unit tests for new rend_intro_cell_t parserAndrea Shepard2012-07-31
| | | |
* | | | Implement replaycache_t for bug 6177, and unit tests for the precedingAndrea Shepard2012-07-31
| | | |
* | | | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-07-18
|\ \ \ \ | | |/ / | |/| |
| * | | Change all SMARTLIST_FOREACH loops of >=10 lines to use BEGIN/ENDNick Mathewson2012-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SMARTLIST_FOREACH macro is more convenient than BEGIN/END when you have a nice short loop body, but using it for long bodies makes your preprocessor tell the compiler that all the code is on the same line. That causes grief, since compiler warnings and debugger lines will all refer to that one line. So, here's a new style rule: SMARTLIST_FOREACH blocks need to be short.
* | | | Fix compilation on 32-bit. Fix for bug 6277, not in any released tor.Nick Mathewson2012-07-05
| |/ / |/| |
* | | Make check-spaces happy againNick Mathewson2012-06-28
| | |
* | | Extend tor_sscanf so it can replace sscanf in rephist.cNick Mathewson2012-06-28
|/ / | | | | | | Fixes bug 4195 and Coverity CID 448
* | Merge remote-tracking branch 'public/bug6227' into maint-0.2.3Nick Mathewson2012-06-26
|\ \
| * | Bump the test util/threads timeout up to 150 secNick Mathewson2012-06-25
| | | | | | | | | | | | | | | | | | This should make some debian build systems happier. Also, increase the select() timeout to a more reasonable 100 msec.
* | | Add a unit test for environment_variable_names_equalNick Mathewson2012-06-26
|/ / | | | | | | | | I need this because I'm about to frob that function to stop using strcspn() in order to get rid of a clang warning.
* | Resolve crash caused by format_helper_exit_status changes in #5557Nick Mathewson2012-06-23
| | | | | | | | | | | | | | | | | | Because the string output was no longer equal in length to HEX_ERRNO_SIZE, the write() call would add some extra spaces and maybe a NUL, and the NUL would trigger an assert in get_string_from_pipe. Fixes bug 6225; bug not in any released version of Tor.
* | Add unit test for format_hex_number_for_helper_exit_status()Andrea Shepard2012-06-22
| |
* | Make format_helper_exit_status() avoid unnecessary spacesAndrea Shepard2012-06-22
| |
* | Merge remote-tracking branch 'public/bug3940_redux'Nick Mathewson2012-06-13
|\ \
| * | An attempt at bug3940 and making AllowDotExit 0 work with MapAddressNick Mathewson2012-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This time, I follow grarpamp's suggestion and move the check for .exit+AllowDotExit 0 to the top of connection_ap_rewrite_and_attach, before any rewriting occurs. This way, .exit addresses are forbidden as they arrive from a socks connection or a DNSPort request, and not otherwise. It _is_ a little more complicated than that, though. We need to treat any .exit addresses whose source is TrackHostExits as meaning that we can retry without that exit. We also need to treat any .exit address that comes from an AutomapHostsOnResolve operation as user-provided (and thus forbidden if AllowDotExits==0), so that transitioning from AllowDotExits==1 to AllowDotExits==0 will actually turn off automapped .exit addresses.
* | | Fix mingw build with -DUNICODE -D_UNICODENick Mathewson2012-06-07
| | | | | | | | | | | | | | | This is a very blunt fix, and mostly just turns some func() calls into FuncA() to make things build again. Fixes bug 6097.
* | | Fix some mingw build warningsNick Mathewson2012-06-05
| | | | | | | | | | | | | | | | | | | | | | | | These include: - Having a weird in_addr that can't be initialized with {0} - Needing INVALID_HANDLE_VALUE instead of -1 for file handles. - Having a weird dependent definition for struct stat. - pid is signed, not unsigned.
* | | Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
| | |
* | | Fix build warning on Lenny about strtok_r unit testNick Mathewson2012-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a warning in efb8a09f, where Debain Lenny's GCC doesn't get that for (i=0; i<3; ++i) { const char *p; switch(i) { case 0: p="X"; break; case 1: p="Y"; break; case 2: p="Z"; break; } printf("%s\n", p); } will never try to print an uninitialezed value. Found by buildbots. Bug in no released versions of Tor.
* | | Merge remote-tracking branch 'public/bug5089'Nick Mathewson2012-05-31
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/test/test_util.c Merge the unit tests; I added some when I did this branch against 0.2.2, and then the test format changed and master added more tests.
| * | | A few more get_parent_directory tests.Nick Mathewson2012-05-31
| | | |
| * | | Have get_parent_directory() handle "/foo" and "/" correctly.Nick Mathewson2012-05-24
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | The parent of "/foo" is "/"; and "/" is its own parent. This would cause Tor to fail if you tried to have a PF_UNIX control socket in the root directory. That would be a stupid thing to do for other reasons, but there's no reason to fail like _this_. Bug found by Esteban Manchado Velázquez. Fix for bug 5089; bugfix on Tor 0.2.2.26-beta. Unit test included.
* | | Fix the unittest breakage introduced by a8a862c.George Kadianakis2012-05-18
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2012-05-16
|\| |
| * | Make the succeeding parse_http_time tests more obviously rightNick Mathewson2012-05-16
| | | | | | | | | | | | | | | | | | (When the correct answer is given in terms of seconds since the epoch, it's hard to be sure that it really is the right answer just by reading the code.)
| * | Fix month check in parse_http_time, add testSebastian Hahn2012-05-16
| | |