Commit Graph

6216 Commits

Author SHA1 Message Date
Yann Collet
ae1d6bd48e fixed playTests.sh for minGW
On Windows, the equivalent of `/dev/null` is `NUL`.
When tests are run under msys2/minGW,
the environment identifies itself as Windows,
hence the script uses `NUL` instead of `/dev/null`
but the environment will consider `NUL` to be a regular file name.
Consequently, `NUL` will be overwritten during tests,
triggering an error.

This patch uses flag `-f` to force such overwrite
passing the test.
2018-12-26 15:19:09 -08:00
Yann Collet
1fdba696ca fixed VS2008 project
bench.c => benchfn.c + benchzstd.c
wrong util.c from prior patch

and warnings :
C4127
2018-12-25 16:14:14 -08:00
Yann Collet
ecd4df4143 added *visual* branches to long tests on Appveyor 2018-12-25 14:58:28 -08:00
Yann Collet
7df0d6f642 create appveyor test branch
which will execute same tests as `master` branch
hence including older Visual version
2018-12-25 14:20:33 -08:00
Yann Collet
0fb4b21d1a updated libzstd documentation 2018-12-25 03:10:07 -08:00
Yann Collet
a62aead907
Merge pull request #1476 from facebook/unifiedTravisYml
Unified travis.yml
2018-12-25 02:32:16 -08:00
Yann Collet
ca159fdb48
Merge pull request #1473 from facebook/minDecTest
fixed tests for minimal decoder builds
2018-12-24 16:36:03 -08:00
Yann Collet
7d51e1a5ec push more tests to master
to reduce test time for dev
2018-12-24 14:51:59 -08:00
Yann Collet
b31b98ac93
Merge pull request #1472 from hjmjohnson/modernize-cmake-syntax
Modernize cmake syntax
2018-12-24 12:24:29 -08:00
Hans Johnson
443b5c40e4 DOC: Provide documentation for cmake best practices. 2018-12-24 07:06:31 -06:00
Yann Collet
66b21b6c3e master branch selector 2018-12-24 04:04:15 -08:00
Yann Collet
81dab45b12 added master tests 2018-12-24 03:31:40 -08:00
Yann Collet
515c2aa922 fixed tests for minimal decoder builds
It's incorrect to mix targets `all` and `check` with directive -j.
They will be build in parallel
and resulting artifacts will fight each other
with different sets of build options (such as DEBUGLEVEL).
2018-12-24 02:56:21 -08:00
Yann Collet
e980ba212f
Merge pull request #1471 from facebook/nofloat
guard functions using floating point for debug mode only
2018-12-23 12:35:51 -08:00
Yann Collet
aae5bc538a
Merge pull request #1470 from facebook/U32
fix confusion between unsigned <-> U32
2018-12-23 12:35:39 -08:00
Yann Collet
92a3e3e9ca
Merge pull request #1469 from facebook/travisTest
update travis test
2018-12-22 19:57:16 -08:00
Hans Johnson
d3fc848ddd STYLE: Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the block.
This is no longer the preferred style.
2018-12-22 19:32:39 -06:00
Hans Johnson
2f1ff84119 STYLE: Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command names
became case-insensitive.  Now the preferred style is lower-case.
2018-12-22 19:32:39 -06:00
Yann Collet
0d212dd22d updated CHANGELOG for v1.3.8 2018-12-22 12:10:29 -08:00
Yann Collet
c9dfb7e445 guard functions using floating point for debug mode only
they are only used to print debug messages.
Requested in #1386,
2018-12-22 09:09:40 -08:00
Yann Collet
ededcfca57 fix confusion between unsigned <-> U32
as suggested in #1441.

generally U32 and unsigned are the same thing,
except when they are not ...

case : 32-bit compilation for MIPS (uint32_t == unsigned long)

A vast majority of transformation consists in transforming U32 into unsigned.
In rare cases, it's the other way around (typically for internal code, such as seeds).

Among a few issues this patches solves :
- some parameters were declared with type `unsigned` in *.h,
  but with type `U32` in their implementation *.c .
- some parameters have type unsigned*,
  but the caller user a pointer to U32 instead.

These fixes are useful.

However, the bulk of changes is about %u formating,
which requires unsigned type,
but generally receives U32 values instead,
often just for brevity (U32 is shorter than unsigned).
These changes are generally minor, or even annoying.

As a consequence, the amount of code changed is larger than I would expect for such a patch.

Testing is also a pain :
it requires manually modifying `mem.h`,
in order to lie about `U32`
and force it to be an `unsigned long` typically.
On a 64-bit system, this will break the equivalence unsigned == U32.
Unfortunately, it will also break a few static_assert(), controlling structure sizes.
So it also requires modifying `debug.h` to make `static_assert()` a noop.
And then reverting these changes.

So it's inconvenient, and as a consequence,
this property is currently not checked during CI tests.
Therefore, these problems can emerge again in the future.

I wonder if it is worth ensuring proper distinction of U32 != unsigned in CI tests.
It's another restriction for coding, adding more frustration during merge tests,
since most platforms don't need this distinction (hence contributor will not see it),
and while this can matter in theory, the number of platforms impacted seems minimal.

Thoughts ?
2018-12-21 18:09:41 -08:00
Yann Collet
c8d1fda982 update aarch64 test to xenial
in an attempt to circumvent the `ld` bug
2018-12-21 15:08:48 -08:00
Yann Collet
8f35c7f94c
Merge pull request #1466 from facebook/noDictPresent
fixed : better error message
2018-12-20 19:01:27 -08:00
Nick Terrell
87204a2afd
Merge pull request #1467 from terrelln/regression
[regression] Update results.csv
2018-12-20 18:14:13 -08:00
Nick Terrell
a24f73bece [regression] Update results.csv 2018-12-20 17:40:48 -08:00
Yann Collet
18434d76b8 added strerror in comment
as suggested by @felixhandte
2018-12-20 17:27:08 -08:00
Yann Collet
41b45b84a1
Merge pull request #1465 from facebook/noFilePresent
fixed : detection of non-existing file
2018-12-20 17:21:04 -08:00
Yann Collet
ed2fb6bd57 fixed : better error message when dictionary missing
during benchmark.
Also : refactored ZSTD_fillHashTable(),
just for readability (it does the same thing)
2018-12-20 17:20:07 -08:00
Yann Collet
068c9b89be fixed zlibwrapper examples build 2018-12-20 15:28:03 -08:00
Yann Collet
e4ae24c229
Merge pull request #1420 from felixhandte/zstd-decompress-minimal
Various Macros to Allow Building Extremely Minimal Decoder Library
2018-12-20 15:17:37 -08:00
Yann Collet
6e9512a70c
Merge pull request #1463 from yijinfb/getenv
Add support for environment variable ZSTD_CLEVEL in CLI
2018-12-20 15:17:00 -08:00
Yann Collet
95784c654c fixed shadowing of stat variable
some standard lib declares a `stat` variable at global scope
shadowing local declarations ....
2018-12-20 14:56:44 -08:00
Yann Collet
e129174d1d fixed shadowing of variable time
some standard lib do define `time` as a global variable
shadowing local declarations ...
2018-12-20 14:54:05 -08:00
Yann Collet
0ed8ee4a37 fixed wrong assert condition 2018-12-20 14:46:23 -08:00
Yann Collet
ffba142406 fixed file identity detection in 32-bit mode
also :
some library decided to use `index` as a global variable declared in standard header
shadowing the ones used in fastcover.c  :(
2018-12-20 14:30:30 -08:00
Yann Collet
65a441a8f0 fixed stdlib implementation of time functions
generated redefinitions
2018-12-20 14:02:50 -08:00
Yann Collet
72dbf1bcd0 removed strncpy() from util.c
as Visual surprisingly complains about their usage.
Replaced by memcpy()
2018-12-20 12:27:12 -08:00
W. Felix Handte
91b7309115 Mask Off Unused Functions When ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG 2018-12-20 12:20:34 -08:00
W. Felix Handte
038aabde28 Mask Off Unused Functions When ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT 2018-12-20 12:15:07 -08:00
W. Felix Handte
9b944041da Update Travis Jobs to Run Shorter Tests with -Werror 2018-12-20 12:10:51 -08:00
Yann Collet
105fa953cb use strerror() to generate error message
as suggested by @terrelln .

also:
- hopefully fixed Windows version
- changed the test, so that it passes on non-english OS stdlib errors.
2018-12-20 09:16:40 -08:00
Yi Jin
9b2d708850 change function name: _readU32FromChar() -> readU32FromCharChecked() 2018-12-19 23:41:18 -08:00
Yann Collet
de4eb06a77 fixed 1 transitive include 2018-12-19 18:38:37 -08:00
Yann Collet
26d66942ef
Merge pull request #1464 from facebook/sysErrStr
add more system error strings
2018-12-19 18:33:10 -08:00
Yann Collet
173ef9dea2 fixed : detection of non-existing file
better error message
with test
2018-12-19 18:30:57 -08:00
Yi Jin
f7b1841b6f make init_cLevel(...) static 2018-12-19 17:56:45 -08:00
Yann Collet
a835e9cb81
Merge pull request #1461 from terrelln/regression
[regression] Add more configs
2018-12-19 17:53:15 -08:00
Yi Jin
30ffc24ad7 fix the code ahead of declaration issue 2018-12-19 17:49:04 -08:00
Yann Collet
bb7e6018af
Merge pull request #1462 from facebook/btultra2.3
fixed ossfuzz 11849
2018-12-19 17:48:11 -08:00
Yi Jin
0700335f57 change int init_cLevel() to int init_cLevel(void) 2018-12-19 17:38:28 -08:00