summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* first proposal for LZ4_USER_MEMORY_FUNCTIONSYann Collet2020-11-092-3/+14
| | | | | | | | | makes it possible to replace at link time malloc, calloc and free by user-provided functions which must be named LZ4_malloc(), LZ4_calloc() and LZ4_free(). answer #937
* added similar tests for LZ4_saveDict()Yann Collet2020-11-081-1/+17
| | | | fast (non-HC) variant
* fix #926Yann Collet2020-11-081-2/+18
| | | | | fix incorrect behavior of LZ4_saveDictHC() when invoked right after initialization.
* unified alignment testYann Collet2020-11-061-28/+46
| | | | across lz4.c and lz4hc.c
* fix minor explicit castYann Collet2020-10-311-1/+1
|
* reduce new test stack usageYann Collet2020-10-031-10/+12
| | | | use heap instead
* fix cppcheck unused variable warningYann Collet2020-10-021-0/+1
|
* added LZ4_streamHC_t init testYann Collet2020-10-021-2/+21
| | | | which includes an alignment test
* define sentinelTestYann Collet2020-10-021-2/+3
| | | | to help scan-build detect the condition
* make it possible to select SCANBUILD binary on command lineYann Collet2020-10-021-1/+1
|
* add LZ4F_decompress() tests with (NULL,0) input and outputYann Collet2020-10-021-1/+3
| | | | fix one (rare & complex) issue discovered by this test
* fix minor static analyzer warningsYann Collet2020-09-302-12/+13
| | | | | detected by scan-build and cppcheck fix #786
* Merge pull request #923 from lz4/fix784Yann Collet2020-09-282-23/+111
|\ | | | | fix efficiency of LZ4_compress_HC_destSize()
| * improved last literals run on LZ4_compress_destSizeYann Collet2020-09-281-8/+10
| | | | | | | | | | | | applying new more accurate formula from LZ4_compress_HC_destSize() also : fix some minor display issue in tests/frametest
| * ensure last match not too close to endYann Collet2020-09-281-6/+8
| | | | | | | | must respect MFLIMIT distance from oend
| * fix incorrect countingYann Collet2020-09-281-1/+1
| | | | | | | | after truncation of last sequence
| * fix efficiency of LZ4_compress_HC_destSize()Yann Collet2020-09-281-9/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | LZ4_compress_HC_destSize() had a tendency to discard its last match when this match overflowed specified dstBuffer limit. The impact is generally moderate, but occasionally huge, typically when this last match is very large (such as compressing a bunch of zeroes). Issue #784 fixed for both Chain and Opt implementations. Added a unit test suggested by @remittor checking this topic.
* | fix compressing into NULLYann Collet2020-09-261-4/+13
|/ | | | | fails properly bug discovered by oss-fuzz
* fixed ubsan tests with dynamic libraryYann Collet2020-09-171-0/+1
|
* fixed lz4frame with blocks of size 1Yann Collet2020-09-171-2/+4
| | | | properly track history
* Merge branch 'usan_null' of github.com:lz4/lz4 into usan_nullYann Collet2020-09-171-2/+5
|\
| * fix #847Yann Collet2020-09-151-2/+5
| | | | | | | | | | support NULL input without triggering undefined sanitizer
* | fix ubsan testYann Collet2020-09-171-1/+1
|/ | | | | | which now fails with a clear error as intended (not just print a status and move on). should be reproduced on travisCI
* added test triggering NULL arithmetic with usanYann Collet2020-09-151-0/+8
| | | | described in #847
* fixed minor pre-existing printf formattingYann Collet2020-08-271-2/+2
| | | | different signedness
* fixed strict c90 supportYann Collet2020-08-271-2/+0
|
* fix #783Yann Collet2020-08-271-4/+4
| | | | | | | | | | | | | | | | | LZ4_decompress_safe_partial() now also supports a scenario where nb_bytes_to_generate is <= block_decompressed_size And nb_bytes_to_read is >= block_compressed_size. Previously, the only supported scenario was nb_bytes_to_read == block_compress_size. Pay attention that, if nb_bytes_to_read is > block_compressed_size, then, necessarily, it requires that nb_bytes_to_generate is <= block_decompress_size. If both are larger, it will generate corrupted data.
* Merge branch 'dev' into extraInputYann Collet2020-08-271-81/+92
|\
| * fix test under non-interactive environmentYann Collet2020-08-251-1/+1
| |
| * added more tests around --content-sizeYann Collet2020-08-251-1/+10
| | | | | | | | notably in association with `stdin`
| * use variables for program invocationYann Collet2020-08-251-80/+82
| |
* | Merge branch 'dev' into extraInputYann Collet2020-08-181-9/+21
|\ \ | |/
| * Clarifies and fix EndMarkYann Collet2020-08-131-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EndMark, the 4-bytes value indicating the end of frame, must be `0x00000000`. Previously, it was just mentioned as a `0-size` block. But such definition could encompass uncompressed blocks of size 0, with a header of value `0x80000000`. But the intention was to also support uncompressed empty blocks. They could be used as a keep-alive signal. Note that compressed empty blocks are already supported, it's just that they have a size 1 instead of 0 (for the `0` token). Unfortunately, the decoder implementation was also wrong, and would also interpret a `0x80000000` block header as an endMark. This issue evaded detection so far simply because this situation never happens, as LZ4Frame always issues a clean 0x00000000 value as a endMark. It also does not flush empty blocks. This is fixed in this PR. The decoder can now deal with empty uncompressed blocks, and do not confuse them with EndMark. The specification is also clarified. Finally, FrameTest is updated to randomly insert empty blocks during fuzzing.
* | fix issue #783 (#862)BellaXlp2020-08-122-3/+60
| | | | | | * fix issue #783
* | added test decompress-partial with extraneous input bytesYann Collet2020-08-122-10/+19
|/ | | | | fails currently, for investigation of #783
* Merge pull request #895 from lz4/hugefastYann Collet2020-08-101-0/+5
|\ | | | | Fix #876
| * add test that breaks --fastYann Collet2020-08-101-0/+5
| | | | | | | | | | | | with huge values, as expected from #876 Also : added target `check`
* | Remove dirty Field From LZ4_stream_tW. Felix Handte2020-08-061-4/+0
|/
* Merge pull request #866 from sandyharvie/devYann Collet2020-07-141-0/+18
|\ | | | | Fix issue #865
| * add testsChristopher Harvie2020-05-141-0/+18
| |
* | Fix tests on OpenBSDBjörn Ketelaars2020-05-301-1/+1
|/ | | | Add condition for OpenBSD, which uses gmake
* Add test scenario test-lz4-multiple-legacyFilipe Calasans2020-02-081-1/+39
|
* Adding unamestr varBimba Shrestha2019-10-071-0/+1
|
* Adding condition for FreeBSD and using gmakeBimba Shrestha2019-10-041-1/+8
|
* Using instead of gmake (to address the travis failure)Bimba Shrestha2019-10-041-1/+1
|
* Using gmake instead of makeBimba Shrestha2019-10-041-1/+1
|
* fixed test errorv1.9.2Yann Collet2019-08-151-1/+1
| | | | | could trigger %0 on exceptional circumstances due to wrong buffer size parameter.
* silence msan warning when offset==0Yann Collet2019-08-061-0/+1
|
* ensure conformance with custom LZ4_DISTANCE_MAXYann Collet2019-07-152-2/+3
| | | | | | | | | | | | | | It's now possible to select a custom LZ4_DISTANCE_MAX at compile time, provided it's <= 65535. However, in some cases (when compressing in byU16 mode), the new distance wasn't respected, as it used to implied that it was necessarily within range. Added a distance check for this case. Also : added a new TravisCI test which ensures that custom LZ4_DISTANCE_MAX compiles correctly and compresses correctly (relying on `assert()` to find outsized offsets).
* fix minor cppcheck warningsYann Collet2019-06-302-3/+3
|