summaryrefslogtreecommitdiff
path: root/src/test/test.c
AgeCommit message (Collapse)Author
2012-02-09Count IPv6 connections in bridge and entry stats.Karsten Loesing
2012-01-31Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson
This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
2012-01-18Rename nonconformant identifiers.Nick Mathewson
Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
2011-11-30Merge branch 'bug933_nm_rebased_v2'Nick Mathewson
Conflicts: src/test/test.c
2011-11-30bug933 - Match against super-domains in MapAddressRobert Hogan
Allow MapAddress to handle directives such as: MapAddress .torproject.org .torserver.exit MapAddress .org 1.1.1.1 Add tests for addressmap_rewrite.
2011-11-29Make unit tests run again. Fix bug 4606.Nick Mathewson
2011-11-11New src/test/bench.c to allow us to actually _run_ benchmark codeNick Mathewson
Yes, the timing functions are suboptimal. Please improve!
2011-11-11Fix the bench_{aes,dmap} test functions to work with TTSebastian Hahn
TT expects them to be named test_bench_{aes,dmap}. Also change the DISABLED macro to reflect that.
2011-10-07Merge remote-tracking branch 'asn2/bug3656'Nick Mathewson
Conflicts: src/common/util.c src/common/util.h src/or/config.h src/or/main.c src/test/test_util.c
2011-09-09Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: configure.in src/or/circuitbuild.c
2011-08-30Use %f with printf-style formatting, not %lfNick Mathewson
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.
2011-08-04Clean up bridge-stats code.Karsten Loesing
Only write a bridge-stats string if bridge stats have been initialized. This behavior is similar to dirreq-stats, entry-stats, etc. Also add a few unit tests for the bridge-stats code.
2011-08-04Separate generation of an entry-stats string from writing it to disk.Karsten Loesing
This commit is similar to the previous two commits for dirreq-stats, but for entry-stats.
2011-08-04Separate generation of a dirreq-stats string from writing it to disk.Karsten Loesing
This patch separates the generation of a dirreq-stats string from actually writing it to disk. The new geoip_format_dirreq_stats() generates a dirreq-stats string that geoip_dirreq_stats_write() writes to disk. All the state changing (e.g., resetting the dirreq-stats history and initializing the next measurement interval) takes place in geoip_dirreq_stats_write(). That allows us to finally test the dirreq-stats code better.
2011-08-04Add unit tests for buffer-stats.Karsten Loesing
Now that formatting the buffer-stats string is separate from writing it to disk, we can also decouple the logic to extract stats from circuits and finally write some unit tests for the history code.
2011-07-20Unit test for generic_buffer_set_to_copyNick Mathewson
2011-07-15Remove compare_addr_to_addr_policyNick Mathewson
Nothing used it but the unit tests; everything else knows to use compare_tor_addr_to_addr_policy instead.
2011-07-13Add some unit tests.George Kadianakis
2011-07-13Merge remote-tracking branch 'public/bug1666'Nick Mathewson
Conflicts: doc/spec/socks-extensions.txt src/or/buffers.c src/or/config.c src/or/connection_edge.c
2011-07-01Check return value of crypto_global_init in test.cNick Mathewson
This will let the unit tests fail in a less mystifying way if the crypto subsystem is b0rken, and will also make Coverity happier. CID # 429.
2011-06-29Refactor fetch_from_buf_socks() to be greedyNick Mathewson
Previously, fetch_from_buf_socks() might return 0 if there was still data on the buffer and a subsequent call to fetch_from_buf_socks() would return 1. This was making some of the socks5 unit tests harder to write, and could potentially have caused misbehavior with some overly verbose SOCKS implementations. Now, fetch_from_buf_socks() does as much processing as it can, and returns 0 only if it really needs more data. This brings it into line with the evbuffer socks implementation.
2011-06-29Refactor socks unit tests into a suite of their ownNick Mathewson
2011-06-29Record username/password data in socks_request_tNick Mathewson
This change also requires us to add and use a pair of allocator/deallocator functions for socks_request_t, instead of using tor_malloc_zero/tor_free directly.
2011-06-29Fix 'make check-spaces'Nick Mathewson
2011-06-14Make the get_options() return constNick Mathewson
This lets us make a lot of other stuff const, allows the compiler to generate (slightly) better code, and will make me get slightly fewer patches from folks who stick mutable stuff into or_options_t. const: because not every input is an output!
2011-04-07Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-04-07Use GetTempDir instead of hardcoded path to c:\windows\tmp for unittestsGisle Vanem
2011-01-03Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-01-03Bump copyright statements to 2011 (0.2.2)Nick Mathewson
2010-12-14bug1666 - Pass-through support for SOCKS5 authentication(4)Robert Hogan
Implement nickm's suggestion that we tolerate SOCKS5 clients that send authentication credentials and SOCKS commands all in one go.
2010-12-14bug1666 - Pass-through support for SOCKS5 authentication (2)Robert Hogan
Address Nick's comments: - Refactor against changes in buffers.c - Ensure we have negotiated a method before accepting authentication credentials
2010-12-14bug1666 - Pass-through support for SOCKS5 authenticationRobert Hogan
If a SOCKS5 client insists on authentication, allow it to negotiate a connection with Tor's SOCKS server successfully. Any credentials the client provides are ignored. This allows Tor to work with SOCKS5 clients that can only support 'authenticated' connections. Also add a bunch of basic unit tests for SOCKS4/4a/5 support in buffers.c.
2010-12-03Write bidirectional connection stats in single line.Karsten Loesing
There's no need to have a separate line conn-stats-end for the end date and interval length with only a single line conn-bi-direct following.
2010-12-03Refactor conn stats and add unit tests.Karsten Loesing
2010-11-29Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2010-11-24Report only the top 10 ports in exit-port stats.Karsten Loesing
2010-10-13Merge branch 'nodes'Nick Mathewson
2010-10-07Unit tests for microdescriptor cacheNick Mathewson
May help with tracking down bug #2022
2010-10-01Implement policies for nodes (and for microdescriptors too)Nick Mathewson
2010-09-29Do away with the complexity of the network liveness detection.Mike Perry
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.
2010-08-20Add unit test for tor_listdir.Nick Mathewson
2010-08-17Remove unused function declarationsSebastian Hahn
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.
2010-08-16Fix compilation with --with-dmallocKarsten Loesing
Fixes 1832; bugfix on 0.2.2.6-alpha
2010-08-15Merge commit 'sebastian/bug1831'Nick Mathewson
2010-08-15Make unit tests work when tests get run in subprocesses.Nick Mathewson
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.
2010-08-15Rename rep_hist_exit_stats_history in test.c tooNick Mathewson
2010-08-16Fix misplaced labelsSebastian Hahn
2010-08-16Refactor circuit_build_times_parse_stateSebastian Hahn
Remove the msg parameter to pass an error message out. This wasn't needed and made it harder to detect a memory leak.
2010-08-15Run test_stats in a subprocess.Karsten Loesing
2010-08-11Refactor exit port statistics code and add unit tests.Karsten Loesing