Commit Graph

129 Commits

Author SHA1 Message Date
Yann Collet
596c747211 make UNAME externally definable
on top of providing a central definition place, which eases maintenance,
it might also help for #1021.

Also : updated doc
2021-08-16 16:43:17 -07:00
Yann Collet
19564bce78 fix CFLAGS unexport issue 2020-11-30 17:42:36 -08:00
Yann Collet
772a312b00 LZ4IO_createDict() doesn't need prefs 2020-11-13 22:16:39 -08:00
Yann Collet
52646e8d75 first proposal for LZ4_USER_MEMORY_FUNCTIONS
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
2020-11-08 21:17:32 -08:00
Yann Collet
b4a64e0eac fix ubsan test
which now fails with a clear error as intended
(not just print a status and move on).
should be reproduced on travisCI
2020-09-17 10:29:31 -07:00
Yann Collet
3e3a006c6f Merge branch 'dev' into extraInput 2020-08-26 23:20:28 -07:00
Yann Collet
5b3f945310 fix test under non-interactive environment 2020-08-25 14:53:08 -07:00
Yann Collet
224735ea1b added more tests around --content-size
notably in association with `stdin`
2020-08-25 14:42:15 -07:00
Yann Collet
65f081ccaf use variables for program invocation 2020-08-25 14:25:51 -07:00
BellaXlp
ab713923a2
fix issue #783 (#862)
* fix issue #783
2020-08-12 14:42:10 -07:00
Yann Collet
f9f3fdfb1c added test decompress-partial with extraneous input bytes
fails currently,
for investigation of #783
2020-08-12 14:39:01 -07:00
Yann Collet
b01c58000e add test that breaks --fast
with huge values, as expected from #876

Also : added target `check`
2020-08-10 10:54:35 -07:00
Filipe Calasans
3f53227b96 Add test scenario test-lz4-multiple-legacy 2020-02-07 17:14:01 -08:00
Yann Collet
6654c2cd3b ensure conformance with custom LZ4_DISTANCE_MAX
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).
2019-07-15 12:11:34 -07:00
gabrielstedman
729eef61a1 Handle file not existing case #704 2019-05-26 15:04:45 +01:00
Yann Collet
e2527ad725 updated tests
- only play listTest with `make test`, not `make all` which is limited to build
- update `clangtest`, so that it's possible to disable O3 optimization, for faster processing
2019-05-16 16:46:16 -07:00
gstedman
81081f9b2d List mode improvements.
Improve formatting
  Include static assert
  Use UTIL_fseek to handle potential fseek limitation
  Be explicit when refusing to read from stdin
  Properly free dctx after use
  Include valgrind tests
2019-05-16 20:53:29 +01:00
gstedman
98a86c8ef6 Add multiframe report to --list command 2019-05-15 21:13:19 +01:00
Dmitry V. Levin
0d3f85df65 test-amalgamation: split the rule
Change test-amalgamation to follow each-rule-makes-a-single-target idiom.

Fixes: a7e8d394 ("[amalgamation] add test")
2019-04-23 21:18:11 +00:00
Dmitry V. Levin
8069d2ae6f test-amalgamation: fix compilation options
Use the same compilation options to compile lz4_all.c and other object files.

Fixes: a7e8d394 ("[amalgamation] add test")
2019-04-23 21:18:11 +00:00
Dmitry V. Levin
10726d4c56 test-amalgamation: use a single cat command
Use the list of prerequisites instead of listing those files manually,
this way they will never fall out of sync.

Also update the amalgamation example to use a single cat command.

Fixes: a7e8d394 ("[amalgamation] add test")
Fixes: b192c86b ("[amalgamation] lz4frame.c")
2019-04-23 21:18:11 +00:00
Dmitry V. Levin
7937e86255 test-amalgamation: fix the list of prerequisites
Add $(LZ4DIR)/lz4frame.c to the list of prerequisites as the rule uses
that file.

Fixes: b192c86b ("[amalgamation] lz4frame.c")
2019-04-23 21:18:11 +00:00
JPeterMugaas
7136489d33 More build imrpvements
Moved a few other tests to Makefiles.inc.  Other things might need to go there.
Made a test for symlink appropriateness.  Windows can NOT handle them the same way Unix-like operating systems do (if at all).  This is mostly the same as the Visual C projects.
embed version info into .dll and .exes that are redistributed.
2019-04-23 07:44:00 -04:00
Yann Collet
291b3d8b7e
Merge pull request #691 from lz4/list
--list
2019-04-22 17:43:01 -07:00
Yann Collet
c4fe7a2047
Merge pull request #689 from JPeterMugaas/jpm-makefile
Jpm makefile - as described in https://github.com/lz4/lz4/issues/688
2019-04-22 15:29:50 -07:00
Yann Collet
0d4c885abb refactored --list function
better handling of special conditions,
better scoping of variables.

Also : updated man page
2019-04-22 14:01:19 -07:00
JPeterMugaas
2acddd9918 Fix a test for mingw 2019-04-22 16:06:04 -04:00
JPeterMugaas
b48f823f90 Try to put some tests I made in ONE place. I also moved a test for "install" in one place to try to isolate it. 2019-04-22 15:48:48 -04:00
JPeterMugaas
773b66547f Initial commits from diff I submitted earlier 2019-04-22 13:48:59 -04:00
Yann Collet
22fae16c6f ensure tests work when stdout is not the console
ensure this case is continuously tested on travis.

Update documentation on implicit output,
invite to not rely on implicit output in scripts.
2019-04-21 17:01:03 -07:00
Yann Collet
467e352de9 tests/Makefile : created CMP variable
for potential redirection, if need be.

note : should probably converge all comparison operations onto CMP
2019-04-21 12:42:13 -07:00
Yann Collet
5f8ac02b77 cli: display a warning whenever default output is stdout while input != stdin
This behavior has been preserved for compatibility with existing ecosystem.
But it's problematic, as some environment start `lz4` without identifying stdout as console by default,
leading to a change of behavior for a same line of script.

A more sensible policy would be to default to stdout only when input is stdin.

Soft change for the time being : keep the behavior, just print a warning message.
User should prefer `-c` to explicitly select `stdout`.

Also : updated tests in Makefile to explicitly select `stdout` with `-c`.
2019-04-19 17:08:40 -07:00
Yann Collet
9c49e3ca07 added tests for -d -m -c
seems to work properly
2019-04-12 16:10:55 -07:00
Yann Collet
e865a3e7ec fixed lz4 -m -c
can compress multiple files into stdout
2019-04-12 15:17:48 -07:00
Yann Collet
20c2a5fc94 added command -BI for "Independent Blocks"
This is the reverse of `-BD`, and the current default.

This command can be useful to reverse a previous `-BD` command.
It may in the future be more important
if `lz4` switches to generating dependent blocks by default.
2019-04-12 13:27:11 -07:00
Yann Collet
3f5f10c63e fixed cleaning tmp directory 2019-04-08 14:01:32 -07:00
Yann Collet
249703ae2e slightly faster huge file test
level down 5->4
size down 6G->5G
2019-04-08 13:49:26 -07:00
Yann Collet
5db9a2f8b6 added make list target to tests 2019-04-08 13:45:01 -07:00
Tim Zakian
9028682e7a Fix pass-through mode 2019-01-10 10:20:17 -08:00
Ruben O. Chiavone
4c953b46ef Add test to cover issue #596 2019-01-09 01:51:40 -03:00
Bing Xu
b192c86ba4 [amalgamation] lz4frame.c 2018-11-26 11:30:15 -08:00
Bing Xu
a7e8d394c0 [amalgamation] add test 2018-11-16 09:37:19 -08:00
Blaise Sanouillet
64ad395d27 support custom block sizes 2018-09-28 08:02:49 -07:00
Lucas Holt
3318d573ba Add support for MidnightBSD 2018-09-08 14:46:54 -04:00
Yann Collet
0f08c22c31
Merge pull request #563 from lz4/docDict
updated documentation for dictionary compression
2018-09-06 12:43:29 -07:00
Yann Collet
0fea528e3a updated documentation regarding dictionary compression
following suggestion from @stbrumme (#558)

Also : bumped version number, regenerated man page and html doc
2018-09-05 14:05:08 -07:00
Yann Collet
d2d5660970 new test program : roundTripTest
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.
2018-09-04 16:50:34 -07:00
Jennifer Liu
e778db373b Fixed bugs about incorrect acceleration calculation and benchmarking negative compresion level 2018-06-27 13:36:38 -07:00
Jennifer Liu
8745638d7c Fixed invalid argument test and reformatted else 2018-06-26 17:53:12 -07:00
Jennifer Liu
9ee5183d9b Fixed code based on comments from pull request 2018-06-26 17:31:15 -07:00