aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_consdiff.c
AgeCommit message (Collapse)Author
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-02-06log_test_helpers: remove semicolons from end of macrosNick Mathewson
We want our code to require semicolons after use of these macros, so that our code formatters and/or analysis tools don't get confused.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-09-11Consdiff: use lengths on inputs so they don't need NUL at the endNick Mathewson
This is part of #27244, so that we can safely mmap consensus documents.
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-06-28Fix up the modules that include memarea.h (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2017-09-15Merge branch 'scan-build-032'Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-12Fix unit test that likes to cast integers to void*Nick Mathewson
2017-07-10Make consdiff tests pass on OS X tooMatt Traudt
2017-05-04Add a test for $ with non-delete commands.Nick Mathewson
2017-05-04bug#22143/prop#140: Use <n>,$d commands in diffs to remove signaturesNick Mathewson
In this patch I add support for "delete through end of file" in our ed diff handler, and generate our diffs so that they remove everything after in the consensus after the signatures begin.
2017-05-03bug#22143/prop#140: identify input diffs by their digest-as-signedNick Mathewson
See may 3 changes to prop140 for more background.
2017-04-24Merge branch 'consdiff_numeric_squashed'Nick Mathewson
2017-04-24consdiff: Reject ranges with non-numeric charsSebastian Hahn
Fixes bug #21964
2017-04-18missing smartlist_free in new consdiff testNick Mathewson
2017-04-18Merge remote-tracking branches 'sebastian/consdiff_add' and ↵Nick Mathewson
'sebastian/consdiff_newline'
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
2017-03-16Avoid all needless memory copies when computing consensus diffs.Nick Mathewson
Previously, we operated on smartlists of NUL-terminated strings, which required us to copy both inputs to produce the NUL-terminated strings. Then we copied parts of _those_ inputs to produce an output smartlist of NUL-terminated strings. And finally, we concatenated everything into a final resulting string. This implementation, instead, uses a pointer-and-extent pattern to represent each line as a pointer into the original inputs and a length. These line objects are then added by reference into the output. No actual bytes are copied from the original strings until we finally concatenate the final result together. Bookkeeping structures and newly allocated strings (like ed commands) are allocated inside a memarea, to avoid needless mallocs or complicated should-I-free-this-or-not bookkeeping. In my measurements, this improves CPU performance by something like 18%. The memory savings should be much, much higher.
2017-03-16Fix an abstraction violation.Nick Mathewson
Don't alias the insides of smartlist_t; that way lies madness.
2017-03-16prop140: Use sha3-256, not sha2-256Nick Mathewson
This is a protocol update from recent prop140 changes. Also, per #21673, we need to check the entire document, including signatures.
2017-03-16Add a couple more cases to reach 100% coverage.Nick Mathewson
2017-03-16Cover two more failing cases with unit testsNick Mathewson
2017-03-16Tweak&test log messages on apply_diffNick Mathewson
2017-03-16Check for expected warnings in apply_ed_diffNick Mathewson
2017-03-16test operator cleanupNick Mathewson
2017-03-16Enforce correct log messages on diff generation failure testsNick Mathewson
2017-03-16Test two more base64cmp cases.Nick Mathewson
2017-03-16Use "STATIC" to export consdiff fns for testingNick Mathewson
Previously test_consdiff.c just did #include "consdiff.c", which is not great style, and messes up coverage testing.
2017-03-16Consensus diff backend from Daniel Martí GSOC project.Daniel Martí
(This commit was extracted by nickm based on the final outcome of the project, taking only the changes in the files touched by this commit from the consdiff_rebased branch. The directory-system changes are going to get worked on separately.)