summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* removed test that might be optimized awayYann Collet2018-05-021-2/+1
| | | | under UB rule "no overflow on int"
* introduce LZ4_decoderRingBufferSize()Yann Collet2018-05-021-36/+53
| | | | fuzzer : fix and robustify ring buffer tests
* added a test case for LZ4_decompress_fast_usingDictCyan49732018-04-291-12/+22
| | | | | | | with a separated dictionary since a joined dictionary is now detected as prefix64K. Also : fixed a minor warning under msys
* Merge pull request #522 from svpv/refactorDecYann Collet2018-04-282-41/+82
|\ | | | | Refactor dec
| * fuzzer.c: enabled ring buffer tests for decompress_fastAlexey Tourbin2018-04-271-40/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | Ring buffer tests were performed only with LZ4_decompress_safe_continue, leaving my buggy changes to LZ4_decompress_safe_continue undetected. The tests are now replicated and performed in a similar manner for both LZ4_decompress_safe_continue and LZ4_decompress_safe_continue (except for the small buffer case where only one function can be tested, because part of the dictionary is overwritten with the output). I also updated function names in the messages (changed them to the actual ones). The error was reported for LZ4_decompress_safe(), which I found misleading.
| * lz4.c: fixed the LZ4_decompress_safe_continue caseAlexey Tourbin2018-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous change broke decoding with a ring buffer. That's because I didn't realize that the "double dictionary mode" was possible, i.e. that the decoding routine can look both at the first part of the dictionary passed as prefix and the second part passed via dictStart+dictSize. So this change introduces the LZ4_decompress_safe_doubleDict helper, which handles this "double dictionary" situation. (This is a bit of a misnomer, there is only one dictionary, but I can't think of a better name, and perhaps the designation is not all too bad.) The helper is used only once, in LZ4_decompress_safe_continue, it should be inlined with LZ4_FORCE_O2_GCC_PPC64LE attached to LZ4_decompress_safe_continue. (Also, in the helper functions, I change the dictStart parameter type to "const void*", to avoid a cast when calling helpers. In the helpers, the upcast to "BYTE*" is still required, for compatibility with C++.) So this fixes the case of LZ4_decompress_safe_continue, and I'm surprised by the fact that the fuzzer is now happy and does not detect a similar problem with LZ4_decompress_fast_continue. So before fixing LZ4_decompress_fast_continue, the next logical step is to enhance the fuzzer.
* | Add _destSize() to FullbenchW. Felix Handte2018-04-261-6/+12
| |
* | Multiply-Include Header to Check Guard Macro CorrectnessW. Felix Handte2018-04-241-0/+3
| |
* | Change Over Includes in the ProjectW. Felix Handte2018-04-241-1/+2
| |
* | Merge pull request #512 from lz4/HC_dictYann Collet2018-04-241-1/+49
|\ \ | | | | | | In-place unmutable dictionaries for LZ4HC
| * | Remove the Framebench ToolW. Felix Handte2018-04-242-417/+1
| | |
| * | Add Some Simple Fuzzer TestsW. Felix Handte2018-04-201-1/+49
| | |
| * | Fix Framebench Output Buffer SizingW. Felix Handte2018-04-201-0/+3
| | |
| * | Fix CastW. Felix Handte2018-04-201-2/+3
| | |
| * | Print Failure Message in FramebenchW. Felix Handte2018-04-201-2/+16
| | |
| * | Switch to Unaligned Samples to Compress Different Blobs Each TimeW. Felix Handte2018-04-201-32/+21
| | |
| * | Fix Framebench StatisticsW. Felix Handte2018-04-201-3/+3
| | |
| * | Add Run Name to Frame Bench OutputW. Felix Handte2018-04-201-6/+9
| | |
| * | Auto-Calculate Appropriate Repetition CountW. Felix Handte2018-04-201-38/+29
| | |
| * | Print More Detailed Results Inside bench(), Add Compression LevelsW. Felix Handte2018-04-201-52/+51
| | |
| * | Check Compressed Buffer is Correct in Frame BenchW. Felix Handte2018-04-201-14/+65
| | |
| * | Add HC Calls to FramebenchW. Felix Handte2018-04-201-17/+82
| | |
| * | Restore Framebench ToolW. Felix Handte2018-04-202-1/+301
| |/ | | | | | | This reverts commit 70f14823a46719e81e808d9ed9df90f478bcfd3f.
* | fullbench compiled without assert()Cyan49732018-04-231-1/+2
| | | | | | | | to better reflect release speed
* | Fix compilation error and assert.Nick Terrell2018-04-231-1/+0
| |
* | Fix input size validation edge casesNick Terrell2018-04-231-0/+26
|/ | | | | | | | | | | | | | | | | The bug is a read up to 2 bytes past the end of the buffer. There are three cases for this bug, one for each test case added. * An empty input causes `token = *ip++` to read one byte too far. * A one byte input with `(token >> ML_BITS) == RUN_MASK` causes one extra byte to be read without validation. This could be combined with the first bug to cause 2 extra bytes to be read. * The case pointed out in issue #508, where `ip == iend` at the beginning of the loop after taking the shortcut. Benchmarks show no regressions on clang or gcc-7 on both my mac and devserver. Fixes #508.
* edited a few traces for debuggingYann Collet2018-04-171-3/+3
|
* fixed fuzzer testsYann Collet2018-04-161-15/+17
| | | | which were modified in parallel within branc `dev`
* Merge branch 'dev' into lowAddrYann Collet2018-04-162-10/+106
|\
| * Further Test that ExtDictCtx Mode Produces the Exact Same OutputW. Felix Handte2018-04-131-2/+21
| |
| * Add Tests for LZ4_attach_dictionary and FriendsW. Felix Handte2018-04-131-0/+78
| |
| * allow system-defined CPPFLAGS in /testsYann Collet2018-04-111-1/+1
| |
| * reduced test time on circle-ciYann Collet2018-04-111-7/+6
| |
* | modified a few traces for debugtest49732018-04-121-1/+3
| |
* | fix minor conversion warningtest49732018-04-101-1/+1
| | | | | | | | cast from void not implicit for C++
* | noticed a bug when re-using hash tabletest49732018-04-061-30/+29
| | | | | | | | ./fuzzer -vv -s4217 -t7518
* | fixed lz4 compression starting at small addresstest49732018-04-051-1/+1
| | | | | | | | when using byU32 and byU16 modes
* | Merge branch 'dev' into lowAddrtest49732018-04-042-24/+32
|\ \ | |/
| * Add Dependency to Fix Parallel `make test` RunsW. Felix Handte2018-03-211-1/+1
| | | | | | | | | | | | When run with `-jN`, the `rm tmp*` can run in the middle of the `test-lz4-dict` job, which will then fail, finding its files to have been axed. This adds a dependency between the two.
| * Remove Framebench ToolW. Felix Handte2018-03-142-300/+1
| |
| * Restore checkTag CleaningW. Felix Handte2018-03-131-1/+1
| |
| * Renames and Comment FixesW. Felix Handte2018-03-121-1/+1
| |
| * Make LZ4F_compressFrame_usingCDict Take a Compression ContextW. Felix Handte2018-03-122-8/+13
| |
| * Avoid Resetting the Context When PossibleW. Felix Handte2018-03-121-1/+1
| |
| * Add Bounds Check to locateBuffDiffW. Felix Handte2018-03-121-3/+5
| |
| * Add a Benchmarking Tool For Compression with Context Re-UseW. Felix Handte2018-03-122-2/+299
| |
| * added target make checkYann Collet2018-02-261-13/+16
| | | | | | | | | | | | | | | | | | | | according to GNU Makefile conventions, the Makefile should feature a make check target to self-test the generated program: https://www.gnu.org/prep/standards/html_node/Standard-Targets.html . this is much less thorough and less taxing than `make test`, and can be run on any target in a reasonable timeframe (several seconds).
* | added low address fuzzer teststest49732018-03-212-53/+63
| |
* | fuzzer: added low address compression testYann Collet2018-02-051-1/+45
|/ | | | is expected to work on linux+gcc only.
* added checkTagYann Collet2018-01-153-1/+84
| | | | | checkTag verifies that provided tag and library version match. It's started automatically in circleCI when a new tag is created.