summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2018-09-20Fix a pair of errors in bug23512Nick Mathewson
2018-09-17Bug 23512: Test recording bytes in circ queues.Mike Perry
2018-08-24Silence a compilation warning on MSVC 2017 and clang-clteor
test.c no longer uses lround(), so we don't need to declare it, and we can use math.h for fabs(). Fixes bug 27185; bugfix on 0.2.2.2-alpha.
2018-08-22Mark cert_matches_key as not-intrusive; fix stretch compilation.Nick Mathewson
2018-08-20Rewrite test_tortls_cert_matches_key()Nick Mathewson
Unlike the old test, this test no will no longer mess around with the forbidden internals of any openssl data structures. Additionally, it verifies several other behaviors of tor_tls_cert_matches_key() that we had wanted to verify, such as the possibility of the certificate's key not matching. Fixes bug 27226; bugfix on 0.2.5.1-alpha.
2018-07-18Try putting ulimit -c 0 in test_bt.sh to see if it fixes bug 26787Nick Mathewson
2018-07-18Merge branch 'bug26485_029_squashed' into maint-0.2.9Nick Mathewson
2018-07-18Add a test for format_recommended_version_list.Nick Mathewson
2018-07-17SKIP test_keygen.sh on Windows until the underlying issue is resolvedteor
Skip an unreliable key generation test on Windows, until the underlying issue in bug 26076 is resolved. Fixes bug 26830; bugfix on 0.2.7.3-rc.
2018-07-02ntor_ref.py: pass only strings to subprocess.PopenNick Mathewson
Recent Python3 versions seem to require this on Windows. Fixes bug 26535; bug introduced in f4be34f70d6f277a0f3f73e, which was apparently intended itself as a Python3 workaround.
2018-06-29Fix a memory error in test_shared_randomNick Mathewson
Bug not in any released Tor.
2018-06-23Fix memory leak in test_sr_setup_commits().Alexander Færøy
This patch fixes a memory leak in test_sr_setup_commits() where the place_holder is allocated, but never freed again. See: Coverity CID 1437440.
2018-06-23Fix potential memory leak in test_hs_auth_cookies().Alexander Færøy
This patch fixes a potential memory leak in test_hs_auth_cookies() if a test-case fails and we goto the done label where no memory clean up is done. See: Coverity CID 1437453
2018-05-24Add a unit test for PEM-encrypted documents.Nick Mathewson
2018-05-09Test read bandwidth measurements with empty filejuga0
2018-03-01Protover tests: disable some obsoleted testsNick Mathewson
These were meant to demonstrate old behavior, or old rust behavior. One of them _should_ work in Rust, but won't because of implementation details. We'll fix that up later.
2018-03-01Forbid UINT32_MAX as a protocol versionNick Mathewson
The C code and the rust code had different separate integer overflow bugs here. That suggests that we're better off just forbidding this pathological case. Also, add tests for expected behavior on receiving a bad protocol list in a consensus. Fixes another part of 25249.
2018-03-01Forbid "-0" as a protocol version.Nick Mathewson
Fixes part of 24249; bugfix on 0.2.9.4-alpha.
2018-03-01Add more of Teor's protover tests.Nick Mathewson
These are as Teor wrote them; I've disabled the ones that don't pass yet, with XXXX comments.
2018-03-01Add some protover vote round-trip tests from Teor.Nick Mathewson
I've refactored these to be a separate function, to avoid tricky merge conflicts. Some of these are disabled with "XXXX" comments; they should get fixed moving forward.
2018-02-09test: DoS test to make sure we exclude known relaysDavid Goulet
Part of #25193 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-08Merge branch 'ticket25183_029_01' into ticket24902_029_05David Goulet
2018-02-08test: Add unit tests for addressset.cDavid Goulet
This also adds one that tests the integration with the nodelist. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-06remove a redundant semicolonNick Mathewson
2018-02-02Use tt_u64_op() for uint64_t inputs.Nick Mathewson
2018-02-02Merge branch 'ticket25122_029_02' into ticket24902_029_05David Goulet
2018-02-02geoip: Hook the client history cache into the OOM handlerDavid Goulet
If the cache is using 20% of our maximum allowed memory, clean 10% of it. Same behavior as the HS descriptor cache. Closes #25122 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-31test: Add unit tests for overflows and underflows in cc_stats_refill_bucketteor
Closes #25094. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-31dos: Make sure cc_stats_refill_bucket can't overflow while calculatingteor
Debug log the elapsed time in cc_stats_refill_bucket Part of #25094. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-31test: Remove a redundant round from test_dos_bucket_refillteor
This round is left over from the tenths of a second code. Part of #25094.
2018-01-30test: Add unit tests for the DoS subsystemGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-21Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-12-21Merge branch 'maint-0.2.5' into maint-0.2.8maint-0.2.8Nick Mathewson
2017-12-21Move free to end of test function so coverity won't complain.Nick Mathewson
2017-12-21Move destroy cells into a separate queue type of their own, to save RAMNick Mathewson
We've been seeing problems with destroy cells queues taking up a huge amount of RAM. We can mitigate this, since while a full packed destroy cell takes 514 bytes, we only need 5 bytes to remember a circuit ID and a reason. Fixes bug 24666. Bugfix on 0.2.5.1-alpha, when destroy cell queues were introduced.
2017-11-13Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-11-13Merge branch 'bug23291_028' into maint-0.2.8Nick Mathewson
2017-10-23Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-10-23Adjust test, now that there are 9 dirauths againNick Mathewson
2017-09-12Avoid sscanf() warnings from openbsd in the unit testsNick Mathewson
OpenBSD doesn't like tricks where you use a too-wide sscanf argument for a too-narrow array, even when you know the input string statically. The fix here is just to use bigger buffers. Fixes 15582; bugfix on a3dafd3f58bb312 in 0.2.6.2-alpha.
2017-08-2122839: fix check_heap_buffer buffer size in test-memwipeTies Stuij
2017-08-01Merge remote-tracking branch 'public/bug19769_19025_029' into maint-0.2.9Nick Mathewson
2017-07-14Merge branch 'bug22916_027' into maint-0.2.9Nick Mathewson
2017-07-13Fix compiler warnings with openssl-scrypt/libscrypt test on clangNick Mathewson
Clang didn't like that we were passing uint64_t values to an API that wanted uint32_t. GCC has either not cared, or has figured out that the values in question were safe to cast to uint32_t. Fixes bug22916; bugfix on 0.2.7.2-alpha.
2017-07-07Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-07-07mingw fix: avoid "unused var" warning.Nick Mathewson
This is a backport of 19615bce64cd381a925bc3910120ac39ca918e7c to fix bug 22838.
2017-07-05Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-07-05Merge branch 'maint-0.2.7-redux' into maint-0.2.8Nick Mathewson
2017-07-05Merge branch 'maint-0.2.6' into maint-0.2.7-reduxNick Mathewson
2017-07-05Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson