aboutsummaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAge
* Add some unit tests for smartlist_bsearch_idx() on short listsAndrea Shepard2012-10-23
| | | | | Conflicts: src/test/test_containers.c
* Fix assertion failure in tor_timegm.Nick Mathewson2012-09-11
| | | | Fixes bug 6811.
* 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
|
* Reject an additional type of bad date in parse_http_timeNick Mathewson2012-05-16
|
* Fix parse_http_time and add testsEsteban Manchado Velázquez2012-05-16
| | | | | | | | * It seems parse_http_time wasn't parsing correctly any date with commas (RFCs 1123 and 850). Fix that. * It seems parse_http_time was reporting the wrong month (they start at 0, not 1). Fix that. * Add some tests for parse_http_time, covering all three formats.
* Handle out-of-range values in tor_parse_* integer functionsNick Mathewson2012-05-07
| | | | | | | | | | | The underlying strtoX functions handle overflow by saturating and setting errno to ERANGE. If the min/max arguments to the tor_parse_* functions are equal to the minimum/maximum of the underlying type, then with the old approach, we wouldn't treat a too-large value as genuinely broken. Found this while looking at bug 5786; bugfix on 19da1f36 (in Tor 0.0.9), which introduced these functions.
* Add a sha256 hmac function, with testsNick Mathewson2012-02-22
| | | | (cherry picked from commit fdbb9cdf746bbf0c39c34188baa8872471183ff7)
* tell me who votes are actually for, not just where they're fromRoger Dingledine2012-01-08
|
* Use %f with printf-style formatting, not %lfNick Mathewson2011-08-30
| | | | | | | | | | | For printf, %f and %lf are synonymous, since floats are promoted to doubles when passed as varargs. It's only for scanf that we need to say "%lf" for doubles and "%f" for floats. Apparenly, some older compilers think it's naughty to say %lf and like to spew warnings about it. Found by grarpamp.
* Fix minor comment issuesRobert Ransom2011-06-22
|
* Fix comment typoRobert Ransom2011-06-22
|
* Check some more return values in unit testsSebastian Hahn2011-06-08
|
* Reject 128-byte keys that are not 1024-bitNick Mathewson2011-06-03
| | | | | | | | | | When we added the check for key size, we required that the keys be 128 bytes. But RSA_size (which defers to BN_num_bytes) will return 128 for keys of length 1017..1024. This patch adds a new crypto_pk_num_bits() that returns the actual number of significant bits in the modulus, and uses that to enforce key sizes. Also, credit the original bug3318 in the changes file.
* Fix GCC 4.6's new -Wunused-but-set-variable warnings.Nick Mathewson2011-05-23
| | | | | | | | | | | Most instances were dead code; for those, I removed the assignments. Some were pieces of info we don't currently plan to use, but which we might in the future. For those, I added an explicit cast-to-void to indicate that we know that the thing's unused. Finally, one was a case where we were testing the wrong variable in a unit test. That one I fixed. This resolves bug 3208.
* Add a function to pull off the final component of a pathNick Mathewson2011-05-15
|
* fwd-port test_util_di_ops into tinytest formatNick Mathewson2011-05-11
|
* Standardize our printf code on %d, not %i.Nick Mathewson2011-04-19
|
* Use GetTempDir instead of hardcoded path to c:\windows\tmp for unittestsGisle Vanem2011-04-07
|
* Clean up whitespaceNick Mathewson2011-03-16
|
* Make the DH parameter we use for TLS match the one from Apache's mod_sslNick Mathewson2011-01-24
| | | | | | Our regular DH parameters that we use for circuit and rendezvous crypto are unchanged. This is yet another small step on the path of protocol fingerprinting resistance.
* Sanity-check consensus param valuesSebastian Hahn2011-01-15
| | | | | | | | | | | | | | | We need to make sure that the worst thing that a weird consensus param can do to us is to break our Tor (and only if the other Tors are reliably broken in the same way) so that the majority of directory authorities can't pull any attacks that are worse than the DoS that they can trigger by simply shutting down. One of these worse things was the cbtnummodes parameter, which could lead to heap corruption on some systems if the value was sufficiently large. This commit fixes this particular issue and also introduces sanity checking for all consensus parameters.
* Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-15
| | | | | | Conflicts: src/or/routerparse.c src/or/test.c
* Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-15
| | | | | | | | | Conflicts: src/or/config.c src/or/networkstatus.c src/or/rendcommon.c src/or/routerparse.c src/or/test.c
* Merge remote branch 'sebastian/bug2314' into maint-0.2.2Nick Mathewson2011-01-03
|\
| * Fix compile wanrings revealed by gcc 4.5 on mingwSebastian Hahn2010-12-27
| |
* | Bump copyright statements to 2011 (0.2.2)Nick Mathewson2011-01-03
| |
* | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
|/ | | | | | Conflicts: src/common/test.h src/or/test.c
* Report only the top 10 ports in exit-port stats.Karsten Loesing2010-11-24
|
* Fix a unit test broken by fix for 2195Nick Mathewson2010-11-19
|
* Merge branch 'bug1772' into maint-0.2.2Roger Dingledine2010-09-29
|\
| * Do away with the complexity of the network liveness detection.Mike Perry2010-09-29
| | | | | | | | | | | | We really should ignore any timeouts that have *no* network activity for their entire measured lifetime, now that we have the 95th percentile measurement changes. Usually this is up to a minute, even on fast connections.
* | Merge remote branch 'public/bug1954' into maint-0.2.2Nick Mathewson2010-09-27
|\ \
| * | New function to load windows system librariesNick Mathewson2010-09-21
| |/ | | | | | | | | | | This function uses GetSystemDirectory() to make sure we load the version of the library from c:\windows\system32 (or local equivalent) rather than whatever version lives in the cwd.
* | Merge remote branch 'sebastian/continuation'Nick Mathewson2010-09-24
|\ \ | |/ |/|
| * Add new torrc line continuation unit testsSebastian Hahn2010-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to make sure that we don't break old torrc files that might have used something like this made-up example: ContactInfo UberUser <uber@user.com> # /// Fake email! \\\ Log info file /home/nick.mathewson/projects/tor-info.log And we also want to support the following style of writing your torrc: ExcludeNodes \ # Node1337 is run by the Bavarian Illuminati Node1337, \ # The operator of Node99 looked at me funny Node99 The code already handles both cases, but the unit test should help prove it.
| * Allow comments for multi-line torrc optionsSebastian Hahn2010-09-11
| |
| * Support mutli-line torrc options via the usual backslash syntaxNick Mathewson2010-09-10
| |
* | Update to the latest tinytest versionNick Mathewson2010-09-09
|/ | | | | | This cleans up some whitespace consistency issues and, more importantly, gives you the ability to skip tests from the command line.
* Make the windows build succeed with or without -DUNICODE enabled.Nick Mathewson2010-08-20
| | | | | | | | | | | | | | This should keep WinCE working (unicode always-on) and get Win98 working again (unicode never-on). There are two places where we explicitly use ASCII-only APIs, still: in ntmain.c and in the unit tests. This patch also fixes a bug in windoes tor_listdir that would cause the first file to be listed an arbitrary number of times that was also introduced with WinCE support. Should fix bug 1797.
* Add unit test for tor_listdir.Nick Mathewson2010-08-20
|
* Remove unused function declarationsSebastian Hahn2010-08-17
| | | | | | Also remove some #if 0'd code from the unit tests for buffers. The code was killed in e6794e58081af773073c266e23fe3ab2ebecdb7e (5 years ago), and is now broken anyways.
* Fix compilation with --with-dmallocKarsten Loesing2010-08-16
| | | | Fixes 1832; bugfix on 0.2.2.6-alpha
* Merge commit 'sebastian/bug1831'Nick Mathewson2010-08-15
|\
| * Fix misplaced labelsSebastian Hahn2010-08-16
| |
| * Refactor circuit_build_times_parse_stateSebastian Hahn2010-08-16
| | | | | | | | | | Remove the msg parameter to pass an error message out. This wasn't needed and made it harder to detect a memory leak.
* | Make unit tests work when tests get run in subprocesses.Nick Mathewson2010-08-15
| | | | | | | | | | | | Apparently the way we handled cleaning up temporary directories with atexit() meant that when the child process exited, it would remove the temporary directory, thus making other tests in the main process fail.
* | Rename rep_hist_exit_stats_history in test.c tooNick Mathewson2010-08-15
| |
* | Run test_stats in a subprocess.Karsten Loesing2010-08-15
| |
* | Refactor exit port statistics code and add unit tests.Karsten Loesing2010-08-11
|/