summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* clang: Fix -WcommaLzu Tao2018-12-021-1/+1
|
* clang: Fix -Wcast-qualLzu Tao2018-12-021-2/+3
|
* Fix clang warnings: -Wformat-pedantic and -Werror=overflowLzu Tao2018-12-021-4/+5
|
* [amalgamation] lz4frame.cBing Xu2018-11-261-0/+1
|
* [amalgamation] add testBing Xu2018-11-161-1/+7
|
* Adding information about dirty context for _HC_ family of functionsOleg Khabinov2018-10-101-8/+24
|
* Merge pull request #592 from lz4/compressEndYann Collet2018-10-091-2/+12
|\ | | | | fix LZ4F_compressEnd()
| * added a test for LZ4F_compressEnd()Yann Collet2018-10-091-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which actively tries to make it write out of bound. For this scenario to be possible, it's necessary to set dstCapacity < LZ4F_compressBound() When a compression operation fails, the CCtx context is left in an undefined state, therefore compression cannot resume. As a consequence : - round trip tests must be aborted, since there is nothing valid to decompress - most users avoid this situation, by ensuring that dstCapacity >= LZ4F_compressBound() For these reasons, this use case was poorly tested up to now.
* | Merge pull request #588 from khabinov/stream-dirty-followupsYann Collet2018-10-091-5/+5
|\ \ | |/ |/| Some followups and renamings
| * Some followups and renamingsOleg Khabinov2018-10-011-5/+5
| |
* | support custom block sizes: fix memory leak to make CI builds happyBlaise Sanouillet2018-10-021-21/+55
| |
* | support custom block sizes: remove unneeded fudging, fix leaked filehandles, ↵Blaise Sanouillet2018-10-012-98/+101
| | | | | | | | other nits
* | Merge branch 'dev' into custom_block_sizesBlaise Sanouillet2018-10-011-3/+8
|\ \ | |/
| * Rename initCheck to dirtyContext and use it in LZ4_resetStream_fast() to ↵Oleg Khabinov2018-09-281-3/+8
| | | | | | | | check if full reset is needed.
* | support custom block sizes: fix constBlaise Sanouillet2018-09-281-2/+2
| |
* | support custom block sizesBlaise Sanouillet2018-09-283-2/+347
|/
* tried to clean another bunch of cppcheck warningsYann Collet2018-09-191-5/+6
| | | | | | | | | | | | so "funny" thing with cppcheck is that no 2 versions give the same list of warnings. On Mac, I'm using v1.81, which had all warnings fixed. On Travis CI, it's v1.61, and it complains about a dozen more/different things. On Linux, it's v1.72, and it finds a completely different list of a half dozen warnings. Some of these seems to be bugs/limitations in cppcheck itself. The TravisCI version v1.61 seems unable to understand %zu correctly, and seems to assume it means %u.
* added cppcheckYann Collet2018-09-182-4/+4
| | | | | | as Makefile target and Travis CI test. Fixed last cppcheck warnings in tests and examples
* fixed minor warning in fuzzer.cYann Collet2018-09-101-1/+0
| | | | added a few more comments and assert()
* Merge branch 'dev' into partialDecodeYann Collet2018-09-101-1/+1
|\
| * Add support for MidnightBSDLucas Holt2018-09-081-1/+1
| |
* | fixed fuzzer testYann Collet2018-09-081-3/+4
| | | | | | | | and removed one blind copy, since there is no more guarantee that at least 4 bytes are still available in output buffer
* | first sketch for a byte-accurate partial decoderYann Collet2018-09-072-22/+32
|/
* Merge pull request #563 from lz4/docDictYann Collet2018-09-061-1/+2
|\ | | | | updated documentation for dictionary compression
| * updated documentation regarding dictionary compressionYann Collet2018-09-052-2/+7
| | | | | | | | | | | | following suggestion from @stbrumme (#558) Also : bumped version number, regenerated man page and html doc
* | removed one assert() conditionYann Collet2018-09-051-5/+10
| | | | | | | | which is not correct when using LZ4_HC with dictionary and starting from a low address (<0x10000).
* | made roundTripTest fully generalYann Collet2018-09-051-28/+73
| | | | | | | | no longer "locked" on level 9
* | fix minor cast warning for C++ compilationYann Collet2018-09-052-4/+7
| |
* | new test program : roundTripTestYann Collet2018-09-043-1/+208
|/ | | | | | | | make a round trip test with arbitrary input file, generate an `abort()` on error, to work in tandem with `afl`. note : currently locked on level 9, to investigate #560.
* Fixed bugs about incorrect acceleration calculation and benchmarking ↵Jennifer Liu2018-06-271-2/+1
| | | | negative compresion level
* Fixed invalid argument test and reformatted elseJennifer Liu2018-06-271-2/+2
|
* Fixed code based on comments from pull requestJennifer Liu2018-06-271-2/+7
|
* Fixed lz4 not found error part 2Jennifer Liu2018-06-261-3/+3
|
* Fixed lz4 not found errorJennifer Liu2018-06-261-3/+3
|
* Fixed bug about file to be compressed is not presentJennifer Liu2018-06-261-4/+3
|
* Added --fast command to cliJennifer Liu2018-06-261-0/+6
|
* Fix AIX 32 bit build problem of fuzzer.cNorm Green2018-06-011-1/+5
|
* Test Linking C-Compiled Library and C++-Compiled TestsW. Felix Handte2018-05-221-1/+17
|
* Add Haiku as a validated target.fbrosson2018-05-171-1/+1
| | | | lz4 1.8.2 works fine on Haiku and passes all tests.
* Merge pull request #538 from lz4/frameTestErrorYann Collet2018-05-071-2/+7
|\ | | | | Fix frametest error
| * small extDict : fixed side-effectYann Collet2018-05-061-0/+1
| | | | | | | | | | | | don't fix dictionaries of size 0. setting dictEnd == source triggers prefix mode, thus removing possibility to use CDict.
| * fixed frametest errorYann Collet2018-05-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error can be reproduced using following command : ./frametest -v -i100000000 -s1659 -t31096808 It's actually a bug in the stream LZ4 API, when starting a new stream and providing a first chunk to complete with size < MINMATCH. In which case, the chunk becomes a dictionary. No hash was generated and stored, but the chunk is accessible as default position 0 points to dictStart, and position 0 is still within MAX_DISTANCE. Then, next attempt to read 32-bits from position 0 fails. The issue would have been mitigated by starting from index 64 KB, effectively eliminating position 0 as too far away. The proper fix is to eliminate such "dictionary" as too small. Which is what this patch does.
* | Attempt to fix travisNick Terrell2018-05-042-2/+4
| |
* | Fix make installNick Terrell2018-05-042-1/+25
|/ | | | | | | | | * Uninstall didn't remove the pkg-config correctly. * Fix `mandir` * Allow overriding either upper- or lower-case location variables, but always use the lower case variables. * Add test case that ensures overriding both upper- and lower-case variables is the same, and that the directory is empty after uninstall.
* 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.