summaryrefslogtreecommitdiff
path: root/src/or/test.c
AgeCommit message (Collapse)Author
2009-09-23Move testing code into new src/test directory.Nick Mathewson
2009-09-23Refactor unit tests to use the tinytest framework.Nick Mathewson
"Tinytest" is a minimalist C unit testing framework I wrote for Libevent. It supports some generally useful features, like being able to run separate unit tests in their own processes. I tried to do the refactoring to change test.c as little as possible. Thus, we mostly don't call the tinytest macros directly. Instead, the test.h header is now a wrapper on tinytest.h to make our existing test_foo() macros work. The next step(s) here will be: - To break test.c into separate files, each with its own test group. - To look into which things we can test - To refactor the more fiddly tests to use the tinytest macros directly and/or run forked. - To see about writing unit tests for things we couldn't previously test without forking.
2009-09-20Fix build warnings on OSX 10.5.8Nick Mathewson
2009-09-20Change the condition on the nonlive timeout counting.Mike Perry
Try to clarify things in the comment too.
2009-09-20Fix typos and comments, plus two bugsRoger Dingledine
A) We were considering a circuit had timed out in the special cases where we close rendezvous circuits because the final rendezvous circuit couldn't be built in time. B) We were looking at the wrong timestamp_created when considering a timeout.
2009-09-20Implement and document new network liveness algorithm.Mike Perry
Based on irc discussion with arma.
2009-09-20Fix some precision-related asserts in unit tests.Mike Perry
Mostly by storing the timeout as milliseconds and not seconds internally.
2009-09-18disable the end of circuitbuildtimeout units testsRoger Dingledine
until mike figures out some other way to make them pass reliably
2009-09-16Clarify use of magic number 0.98 with #define.Mike Perry
2009-09-16Fix unit tests and compile issues on Snow LeopardSebastian Hahn
2009-09-16space/indent cleanups, plus point out three bugsRoger Dingledine
2009-09-16Use our variable directly for timeout.Mike Perry
Using CircuitBuildTimeout is prone to issues with SIGHUP, etc. Also, shuffle the circuit build times array after loading it in so that newer measurements don't replace chunks of similarly timed measurements.
2009-09-16Fix a couple of assert bugs.Mike Perry
2009-09-16Recover from changing network connections.Mike Perry
Also add code to keep creating circuits every minute until we hit our minimum threshhold.
2009-09-16Write unit tests and fix issues they uncovered.Mike Perry
2009-09-14Parameter access function, with unit tests.Nick Mathewson
2009-09-14Implement proposal 167: Authorities vote on network parameters.Nick Mathewson
This code adds a new field to vote on: "params". It consists of a list of sorted key=int pairs. The output is computed as the median of all the integers for any key on which anybody voted. Improved with input from Roger.
2009-09-02i couldn't break nick's tor_parse_double()Roger Dingledine
i guess that means i should call them unit tests and check them in.
2009-09-01Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-09-01Fix compile warnings on Snow LeopardSebastian Hahn
Big thanks to nickm and arma for helping me with this!
2009-08-26Merge commit 'karsten/proposal-166-impl-master'Nick Mathewson
2009-08-21Add the first 8 bytes of the git commit digest to our versions.Nick Mathewson
Note that unlike subversion revision numbers, it isn't meaningful to compare these for anything but equality. We define a sort-order anyway, in case one of these accidentally slips into a recommended-versions list.
2009-08-19Add basic support for SHA256.Nick Mathewson
This adds an openssl 0.9.8 dependency. Let's see if anybody cares.
2009-08-17Remove ./configure option for entry and dir request statistics.Karsten Loesing
2009-08-14Merge commit 'mikeperry/bandwidth-voting-final'Nick Mathewson
2009-08-09Merge commit 'nickm/strtok' into mp-voting-finalMike Perry
2009-08-09Add a new tor_strtok_r for platforms that don't have one, plus tests.Nick Mathewson
I don't think we actually use (or plan to use) strtok_r in a reentrant way anywhere in our code, but would be nice not to have to think about whether we're doing it.
2009-08-07Disable .exit notation unless AllowDotExit is 1.Roger Dingledine
2009-08-06Implement measured bw parsing + unit tests.Mike Perry
2009-07-24Fix unit tests.Karsten Loesing
Now that we require EntryStatistics to be 1 for counting connecting clients, unit tests need to set that config option, too. Reported by Sebastian Hahn.
2009-05-31Merge branch 'hardware_accel_improvements'Nick Mathewson
2009-05-27Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-05-27Fix unit tests that were broken after last fix of #932.Karsten Loesing
With the last fix of task 932 (5f03d6c), client requests are only added to the history when they happen after the start of the current history. This conflicts with the unit tests that insert current requests first (defining the start of the client request history) followed by requests in the past. The fix is to insert requests in chronological order in the unit tests.
2009-05-27Spell-check Tor.Nick Mathewson
2009-05-23Add support for dynamic OpenSSL hardware crypto acceleration engines.Martin Peck
2009-05-04Drop version 0 hidserv support on service side.Karsten Loesing
2009-05-04Update copyright to 2009.Karsten Loesing
2009-05-02Update copyright to 2009.Karsten Loesing
2009-04-01log more verbosely when we accept or decline a router descriptor,Roger Dingledine
to help track whether we received them when a relay operator claims they got sent. svn:r19213
2009-03-03Actually use tor_sscanf() to parse untrusted input.Nick Mathewson
svn:r18761
2009-03-03Add a simple locale-independent no-surprises sscanf replacement.Nick Mathewson
tor_sscanf() only handles %u and %s for now, which will make it adequate to replace sscanf() for date/time/IP parsing. We want this to prevent attackers from constructing weirdly formed descriptors, cells, addresses, HTTP responses, etc, that validate under some locales but not others. svn:r18760
2009-01-13True, 17 is greater than 0. But this applies to 4111 as well.Karsten Loesing
svn:r18097
2009-01-13Fix up (I hope) most ot the things that coverity suddenly claimed were ↵Nick Mathewson
REVERSE_INULL. This is what we get for bragging about being down to 0 issues. svn:r18096
2009-01-13Do the tor_assert hack everywhere in test_crypto_aes_iv.Nick Mathewson
svn:r18095
2009-01-04Another round of downgrading removing or postponing XXXX021 issues. Some ↵Nick Mathewson
remain, though. svn:r17888
2009-01-04Fix the oldest bug in a while: stop accepting 1.2.3 as a valid IPv4 address ↵Nick Mathewson
on any platform. svn:r17887
2009-01-04Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson
The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
2008-12-26Refactor tor_addr_compare_masked() so that CMP_SEMANTIC makes more sense, ↵Nick Mathewson
and has decent semantics for maskbits; and so that CMP_EXACT works right for bits==0. svn:r17788
2008-12-25some fixes i found in my sandboxRoger Dingledine
svn:r17771
2008-12-23Remove bogus extern declaration for unused (and nonexistant) field from test.cNick Mathewson
svn:r17755