summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2010-07-27Create routerlist.hSebastian Hahn
2010-07-27Create router.hSebastian Hahn
2010-07-27Create geoip.hSebastian Hahn
2010-07-06Fix unittest failure in bug 1660.Mike Perry
We now record large times as abandoned, to prevent a filter step from happening and skewing our results. Also, issue a warn for a rare case that can happen for funky values of Xm or too many abandoned circuits. Can happen (very rarely) during unit tests, but should not be possble during live operation, due to network liveness filters and discard logic.
2010-06-29Merge remote branch 'public/rand_double2'Nick Mathewson
2010-06-29Merge remote branch 'mikeperry/cbt-bugfixes3'Nick Mathewson
2010-06-25Fix typo in tinytest_demoSteven Murdoch
2010-06-22Add a function to return a double in range [0,1).Nick Mathewson
2010-06-15Split the circuit timeout and close codepaths.Mike Perry
We need to record different statistics at point of timeout, vs the point of forcible closing. Also, give some better names to constants and state file variables to indicate they are not dealing with timeouts, but abandoned circuits.
2010-06-09Address some issues with unit tests.Mike Perry
Histogram conversion causes accuracy loss, and there are some boundary conditions when we hit 1000 circuits that cause false negative test results.
2010-05-12Fix CBT unit tests.Mike Perry
2010-04-14Add --enable-static-zlib optionSebastian Hahn
Works like the --enable-static-openssl/libevent options. Requires --with-zlib-dir to be set. Note that other dependencies might still pull in a dynamicly linked zlib, if you don't link them in statically too.
2010-04-12Merge commit 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/or/test.c
2010-04-02Merge branch 'asprintf'Nick Mathewson
2010-02-27Update copyright dates for files not in maint-0.2.1Nick Mathewson
2010-02-27Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2010-02-25Add a tor_asprintf() function, and use it in a couple of places.Nick Mathewson
asprintf() is a GNU extension that some BSDs have picked up: it does a printf into a newly allocated chunk of RAM. Our tor_asprintf() differs from standard asprintf() in that: - Like our other malloc functions, it asserts on OOM. - It works on windows. - It always sets its return-field.
2010-02-22Remove misc unnecessary newlines found by new check.Mike Perry
2010-02-18Move CBT params into consensus.Mike Perry
2010-02-09Another unit test for exit_policy_is_general_exit()Sebastian Hahn
2010-02-04Another unit test for exit_policy_is_general_exit()Sebastian Hahn
2010-02-04New unit test, testing for b0red's exit policySebastian Hahn
2010-02-03Another new test for exit_policy_is_general_exit()Sebastian Hahn
2010-02-03New testcase for exit_policy_is_general_exitSebastian Hahn
2010-01-25Rearrange _thread_test_func to please Coverity ScanNick Mathewson
I believe that since we were allocating *cp while holding a mutex, coverity deduced that *cp must be protected by that mutex, and later flipped out when we didn't use it that way. If this is so, we can solve our problems by moving the *cp = tor_strdup(buf) part outside of the mutex-protected code.
2010-01-24Merge commit 'origin/maint-0.2.1'Nick Mathewson
Resolved conflicts in: configure.in src/or/Makefile.am src/tools/Makefile.am
2009-12-18Merge branch 'ewma'Nick Mathewson
2009-12-18Remove duplicate words and a duplicate newline.Karsten Loesing
2009-12-17Refactor out the 'find string at start of any line' logic.Nick Mathewson
We do this in too many places throughout the code; it's time to start clamping down. Also, refactor Karsten's patch to use strchr-then-strndup, rather than malloc-then-strlcpy-then-strchr-then-clear.
2009-12-12Enhance pqueue so we can remove items from the middle.Nick Mathewson
This changes the pqueue API by requiring an additional int in every structure that we store in a pqueue to hold the index of that structure within the heap.
2009-11-08Fix building from a separate build directory.Nick Mathewson
2009-10-27Fix bug 1113.Karsten Loesing
Bridges do not use the default exit policy, but reject *:* by default.
2009-10-26Fix the very noisy unit test memory leak of CID 420-421.Nick Mathewson
On any failing case in test_util_config_line, we would leak a couple of strings.
2009-10-26Fix a very stupid coverity complaint (CID 416).Nick Mathewson
In its zeal to keep me from saying memset(x, '0', sizeof(x)), Coverity disallows memset(x, 48, sizeof(x)). Fine. I'll choose a different magic number, see if I care!
2009-10-26Fix CID 409: check return value of base64_encode in testsNick Mathewson
2009-10-25Reduce log level for someone else sending us weak DH keys.Karsten Loesing
See task 1114. The most plausible explanation for someone sending us weak DH keys is that they experiment with their Tor code or implement a new Tor client. Usually, we don't care about such events, especially not on warn level. If we really care about someone not following the Tor protocol, we can set ProtocolWarnings to 1.
2009-10-18Add functions to serve microdescs and flavored consensuses.Nick Mathewson
2009-10-15Parse detached signatures and microdesc networkstatuses correctly.Nick Mathewson
2009-10-15Implement signatures for microdesc consensuses right.Nick Mathewson
This means we need to handle the existence of multiple flavors of signature in a detached signatures document, generate them correctly, and so on.
2009-10-15Refactor consensus signature storage for multiple digests and flavors.Nick Mathewson
This patch introduces a new type called document_signature_t to represent the signature of a consensus document. Now, each consensus document can have up to one document signature per voter per digest algorithm. Also, each detached-signatures document can have up to one signature per <voter, algorithm, flavor>.
2009-10-15Code to generate, store, and parse microdescriptors and consensuses.Nick Mathewson
The consensus documents are not signed properly, not served, and not exchanged yet.
2009-10-15Support for encoding and decoding 256-bit digests in base64Nick Mathewson
2009-10-11Ship test.h in releasePeter Palfrader
The test suite need the test.h file to build. Add it to noinst_HEADERS in the Makefile.am so it gets included in the tarball that make dist produces.
2009-10-10Fix testsuite call.tor-0.2.2.4-alphaPeter Palfrader
tinytest_main() returns 0 on success, -1 on errors and 1 on test failures. So test.c should check on !=0 instead of <0.
2009-09-27Improved fix for test_memeq_hex leak.Nick Mathewson
The earlier fix would only handle the success case. In the failing case, test_mem_op does a goto done, which would leave the leak leaking.
2009-09-27Fix a memleakSebastian Hahn
Found by coverity test_mem_op_hex was leaking memory, which showed up in a few tests. Also, the dir_param test had a memleak of its own. Found by Coverity
2009-09-27Make a NULL check in test_dir.c non-redundant.Nick Mathewson
Should quiet a coverity warning.
2009-09-23Do not distribute tinytest_demo.c in the tarballNick Mathewson
2009-09-23Carve out unrelated parts of test_dir_formatsNick Mathewson
2009-09-23Split directory tests into their own module.Nick Mathewson
(Also, clean up some whitespace.)