aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2017-04-27Clean up mentions of 'zlib' and rename the mentions to 'compressed'.Alexander Færøy
This patch cleans up in various places where 'zlib' is mentioned.
2017-04-27Refactor compression tests into a single test.Alexander Færøy
This patch refactors our compression tests such that deflate, gzip, lzma, and zstd are all tested using the same code. Additionally we use run-time checks to see if the given compression method is supported instead of using HAVE_LZMA and HAVE_ZSTD. See: https://bugs.torproject.org/22085
2017-04-25Merge branch 'unified_compress_squashed'Nick Mathewson
2017-04-25Combine all *compress/*uncompress backend function into oneNick Mathewson
Since we have a streaming API for each compression backend, we don't need a non-streaming API for each: we can build a common non-streaming API at the front-end.
2017-04-25Merge branch 'atomic_counters'Nick Mathewson
2017-04-25trace: Add a basic event-tracing infrastructure.David Goulet
This commit adds the src/trace directory containing the basics for our tracing subsystem. It is not used in the code base. The "src/trace/debug.h" file contains an example on how we can map our tor trace events to log_debug(). The tracing subsystem can only be enabled by tracing framework at compile time. This commit introduces the "--enable-tracing-debug" option that will make all "tor_trace()" function be maped to "log_debug()". Closes #13802 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-25Use atomic counters for compressor allocation.Nick Mathewson
2017-04-25Merge branch 'ahf_prop278_21662_squashed'Nick Mathewson
2017-04-25Add function to check if a given compression method is supported.Alexander Færøy
This patch adds support for checking if a given `compress_method_t` is supported by the currently running Tor instance using `tor_compress_supports_method()`. See: https://bugs.torproject.org/21662
2017-04-25Add Zstandard support.Alexander Færøy
See: https://bugs.torproject.org/21662
2017-04-25Add --enable-zstd to our configure script.Alexander Færøy
This patch adds support for enabling support for Zstandard to our configure script. By default, the --enable-zstd option is set to "auto" which means if libzstd is available we'll build Tor with Zstandard support. See: https://bugs.torproject.org/21662
2017-04-25Add LZMA support.Alexander Færøy
See: https://bugs.torproject.org/21662
2017-04-25Add --enable-lzma to our configure script.Alexander Færøy
This patch adds support for enabling support for LZMA to our configure script. By default, the --enable-lzma option is set to "auto" which means if liblzma is available we'll build Tor with LZMA support. See: https://bugs.torproject.org/21662
2017-04-25Rename the `torgzip` module to `compress`.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-24Fix implicit conversion warnings in the period_num testsNick Mathewson
2017-04-24Merge remote-tracking branch 'dgoulet/ticket21980_031_01'Nick Mathewson
2017-04-24Fix some leaks in the consdiffmgr testsNick Mathewson
2017-04-24Merge branch 'consdiffmgr_squashed'Nick Mathewson
2017-04-24Remove a checklist item that was already testedNick Mathewson
The item referred to the cdm_ht_set_status() case where the item was not already in the hashtable. But that already happens naturally when we scan the directory on startup... and we already have a test for that.
2017-04-24consdiffmgr test: do not launch a diff task that is already pendingNick Mathewson
2017-04-24consdiffmgr: tests for consdiffmgr_validate()Nick Mathewson
2017-04-24consdiffmgr: add tests for cdm_entry_get_sha3_valueNick Mathewson
2017-04-24consdiffmgr test: add a test for updating ht on clean/rescan.Nick Mathewson
This brings us back up to ~94% coverage
2017-04-24Expand diff-management test to cover reloading items from diskNick Mathewson
2017-04-24consdiffmgr tests: add tests to validate diff lookup/applicationNick Mathewson
This commit adds some helper functions to look up the diff from one consensus and to make sure that applying it leads to another. Then we add them throughout the existing test cases. Doing this turned up a reference-leaking bug in consensus_diff_worker_replyfn.
2017-04-24consdiffmgr: Enable in-progress test that was not previously workingNick Mathewson
Also, add a list of additional tests to write.
2017-04-24consdiffmgr: function to re-validate stored sha3 digests at startupNick Mathewson
2017-04-24Consdiffmgr test: Make sure that diffs are removableNick Mathewson
A diff is removable as soon as it no longer takes you to the most recent consensus of the appropriate flavor.
2017-04-24Test the easiest cases of consdiffmgr_cleanup.Nick Mathewson
One more to go: deleting the old diffs.
2017-04-24consdiffmgr non-test: check for initialization failureNick Mathewson
Unfortunately, this test doesn't work, so I've left it defined-out. There is currently no way in our unit tests to catch a fatal assertion failure.
2017-04-24consdiffmgr test: survive failures to compute a diff.Nick Mathewson
2017-04-24Another consdiffmgr test: only generate the diffs that are neededNick Mathewson
This test makes sure that we only generate the diffs we actually want, rather than regenerating all the diffs every time anything changes.
2017-04-24Unit tests for consdiffmgr moduleNick Mathewson
Initial tests. These just try adding a few consensuses, looking them up, and making sure that consensus diffs are generated in a more or less reasonable-looking way. It's enough for 87% coverage, but it leaves out a lot of functionality.
2017-04-24Merge branch 'consdiff_numeric_squashed'Nick Mathewson
2017-04-24consdiff: Reject ranges with non-numeric charsSebastian Hahn
Fixes bug #21964
2017-04-24Add regression test for #22304Taylor Yu
2017-04-18missing smartlist_free in new consdiff testNick Mathewson
2017-04-18Merge remote-tracking branch 'asn/bug21971'Nick Mathewson
2017-04-18Merge remote-tracking branches 'sebastian/consdiff_add' and ↵Nick Mathewson
'sebastian/consdiff_newline'
2017-04-18prop224: Add time period functions and unittestsGeorge Kadianakis
This will be used by the build blinded key functions. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-18Rename `write_to_buf_zlib()` to `write_to_buf_compress()`.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-18Rename `zlib_state` to `compress_state` in the test_buffers.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-17prop224 tests: Remove useless NULL check before circuit_free().George Kadianakis
Addresses coverity issue CID 1405130.
2017-04-17prop224 tests: Don't use tt_size_op to compare ssize_t.George Kadianakis
Addresses coverity CID 1405129.
2017-04-17Refactor the streaming compression code.Alexander Færøy
This patch refactors our streaming compression code to allow us to extend it with non-zlib/non-gzip based compression schemas. See https://bugs.torproject.org/21663
2017-04-17Rename `tor_gzip_{compress,uncompress}` to `tor_{compress,uncompress}`.Alexander Færøy
To allow us to use the API name `tor_compress` and `tor_uncompress` as the main entry-point for all compression/uncompression and not just gzip and zlib. See https://bugs.torproject.org/21663
2017-04-17Fix whitespace in test_util_gzip() around `OP_*``.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-17Use tt_int_op() over tt_assert() and do explicit NULL checks in ↵Alexander Færøy
test_util_gzip(). This patch changes some of the tt_assert() usage in test_util_gzip() to use tt_int_op() to get better error messages upon failure. Additionally we move to use explicit NULL checks. See https://bugs.torproject.org/21663
2017-04-17Fix diff generation with line added at startSebastian Hahn
The consdiff generation logic would skip over lines added at the start of the second file, and generate a diff that it would the immediately refuse because it couldn't be used to reproduce the second file from the first. Fixes #21996.
2017-04-17Don't accept ranges for add commands in consdiffSebastian Hahn
Fixes ticket #21963