Skip to content

Commit 5f2c721

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into btopt
* upstream/dev: (305 commits) added test for ZSTD_estimateCStreamSize() changed variable name, for clarity fixed ZSTD_estimateCStreamSize() shortened ZSTD_createCStream_Advanced() fixed symbols test added ZSTD_estimateDStreamSize() changed name frameParams into frameHeader regroup memory usage function declarations separated ZSTD_estimateCStreamSize() from ZSTD_estimateCCtxSize() bumped version number added ZSTD_estimateCDictSize() and ZSTD_estimateDDictSize() Updated ZSTD_freeCCtx() updated ZSTD_estimateCCtxSize() Updated ZSTD_sizeof_CCtx() merged CCtx and CStream as a single same object cli : -d and -t do not stop after a failed decompression added dev branch CircleCI badge added dev branch Appveyor badge keep dev branch status only creates a binary archive without the `programs` directory ...
2 parents f35ef5c + ba41b26 commit 5f2c721

File tree

149 files changed

+22718
-2849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+22718
-2849
lines changed

.buckconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[cxx]
2-
cppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=1
2+
cppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4
33
cflags = -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith
4-
cxxppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=1
4+
cxxppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4
55
cxxflags = -std=c++11 -Wno-deprecated-declarations
66
gtest_dep = //contrib/pzstd:gtest
77

.gitignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ zstdmt
2424
tmp*
2525
dictionary*
2626

27+
# Build artefacts
28+
projects/
29+
bin/
30+
.buckd/
31+
buck-out/
32+
2733
# Other files
2834
.directory
2935
_codelite/
@@ -34,8 +40,3 @@ _zstdbench/
3440
.DS_Store
3541
googletest/
3642
*.d
37-
38-
# Directories
39-
bin/
40-
.buckd/
41-
buck-out/

.travis.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1+
# Medium Tests: Run on all commits/PRs to dev branch
2+
13
language: c
24
sudo: required
35
dist: trusty
46
matrix:
5-
fast_finish: true
67
include:
78
# Ubuntu 14.04
8-
- env: Cmd="make libc6install && make -C tests test32"
9-
- env: Cmd='make valgrindinstall arminstall ppcinstall arm-ppc-compilation && make clean lib && CFLAGS="-O1 -g" make -C zlibWrapper valgrindTest && make -C tests valgrindTest'
9+
- env: Cmd='make gcc6install && CC=gcc-6 make clean uasan-test-zstd'
10+
- env: Cmd='make gcc6install libc6install && CC=gcc-6 make clean uasan-test-zstd32'
11+
- env: Cmd='make clang38install && CC=clang-3.8 make clean msan-test-zstd'
12+
13+
- env: Cmd='make gcc6install && CC=gcc-6 make clean uasan-fuzztest'
14+
- env: Cmd='make gcc6install libc6install && CC=gcc-6 CFLAGS=-m32 make clean uasan-fuzztest'
15+
- env: Cmd='make clang38install && CC=clang-3.8 make clean msan-fuzztest'
16+
- env: Cmd='make clang38install && CC=clang-3.8 make clean tsan-test-zstream'
17+
18+
- env: Cmd='make valgrindinstall && make -C tests clean valgrindTest'
19+
20+
- env: Cmd='make arminstall && make armfuzz'
21+
- env: Cmd='make arminstall && make aarch64fuzz'
22+
- env: Cmd='make ppcinstall && make ppcfuzz'
23+
- env: Cmd='make ppcinstall && make ppc64fuzz'
1024

11-
- env: Cmd='CC=gcc-6 make gcc6install uasan-test'
12-
- env: Cmd='CC=gcc-6 make gcc6install uasan-test32'
13-
- env: Cmd="make arminstall armtest && make clean && make aarch64test"
14-
- env: Cmd='make ppcinstall ppctest && make clean && make ppc64test'
15-
- env: Cmd='make gpp6install zlibwrapper && make -C tests clean test-zstd-nolegacy && make -C tests versionsTest && make clean && cd contrib/pzstd && make test-pzstd && make test-pzstd32 && make test-pzstd-tsan && make test-pzstd-asan'
16-
install:
17-
- export CXX="g++-6" CC="gcc-6"
25+
git:
26+
depth: 1
1827

19-
# OS X Mavericks
20-
- env: Cmd="make gnu90build && make clean && make test && make clean && make travis-install"
21-
os: osx
28+
branches:
29+
only:
30+
- dev
31+
- master
2232

2333
script:
2434
- JOB_NUMBER=$(echo $TRAVIS_JOB_NUMBER | sed -e 's:[0-9][0-9]*\.\(.*\):\1:')
25-
# cron & master => full tests, as this is the final step towards a Release
26-
# pull requests => normal tests (job numbers 1-3)
27-
# other feature branches => short tests (job numbers 1-2)
2835
- echo JOB_NUMBER=$JOB_NUMBER TRAVIS_BRANCH=$TRAVIS_BRANCH TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST
29-
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ] || [ "$TRAVIS_BRANCH" = "master" ]; then
30-
FUZZERTEST=-T7mn sh -c "$Cmd" || travis_terminate 1;
31-
else
32-
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ] && [ $JOB_NUMBER -lt 4 ]; then
33-
sh -c "$Cmd" || travis_terminate 1;
34-
else
35-
if [ $JOB_NUMBER -lt 3 ]; then
36-
sh -c "$Cmd" || travis_terminate 1;
37-
fi
38-
fi
39-
fi
36+
- export FUZZERTEST=-T2mn;
37+
export ZSTREAM_TESTTIME=-T2mn;
38+
export DECODECORPUS_TESTTIME=-T1mn;
39+
sh -c "$Cmd" || travis_terminate 1;

Makefile

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ examples:
9090
manual:
9191
$(MAKE) -C contrib/gen_html $@
9292

93+
.PHONY: cleanTabs
94+
cleanTabs:
95+
cd contrib; ./cleanTabs
96+
9397
.PHONY: clean
9498
clean:
9599
@$(MAKE) -C $(ZSTDDIR) $@ > $(VOID)
@@ -105,9 +109,15 @@ clean:
105109
# make install is validated only for Linux, OSX, Hurd and some BSD targets
106110
#------------------------------------------------------------------------------
107111
ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD))
112+
108113
HOST_OS = POSIX
109-
.PHONY: install uninstall travis-install clangtest gpptest armtest usan asan uasan
114+
CMAKE_PARAMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON -DZSTD_LZMA_SUPPORT:BOOL=ON
115+
116+
.PHONY: list
117+
list:
118+
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
110119

120+
.PHONY: install uninstall travis-install clangtest gpptest armtest usan asan uasan
111121
install:
112122
@$(MAKE) -C $(ZSTDDIR) $@
113123
@$(MAKE) -C $(PRGDIR) $@
@@ -151,6 +161,18 @@ ppcbuild: clean
151161
ppc64build: clean
152162
CC=powerpc-linux-gnu-gcc CFLAGS="-m64 -Werror" $(MAKE) allarch
153163

164+
armfuzz: clean
165+
CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) fuzztest
166+
167+
aarch64fuzz: clean
168+
CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) fuzztest
169+
170+
ppcfuzz: clean
171+
CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) fuzztest
172+
173+
ppc64fuzz: clean
174+
CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS="-m64 -static" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) fuzztest
175+
154176
gpptest: clean
155177
CC=g++ $(MAKE) -C $(PRGDIR) all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
156178

@@ -168,44 +190,56 @@ clangtest: clean
168190

169191
armtest: clean
170192
$(MAKE) -C $(TESTDIR) datagen # use native, faster
171-
$(MAKE) -C $(TESTDIR) test CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static"
193+
$(MAKE) -C $(TESTDIR) test CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static" FUZZER_FLAGS=--no-big-tests
172194

173195
aarch64test:
174196
$(MAKE) -C $(TESTDIR) datagen # use native, faster
175-
$(MAKE) -C $(TESTDIR) test CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static"
197+
$(MAKE) -C $(TESTDIR) test CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static" FUZZER_FLAGS=--no-big-tests
176198

177199
ppctest: clean
178200
$(MAKE) -C $(TESTDIR) datagen # use native, faster
179-
$(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static"
201+
$(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static" FUZZER_FLAGS=--no-big-tests
180202

181203
ppc64test: clean
182204
$(MAKE) -C $(TESTDIR) datagen # use native, faster
183-
$(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static"
205+
$(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static" FUZZER_FLAGS=--no-big-tests
184206

185207
arm-ppc-compilation:
186208
$(MAKE) -C $(PRGDIR) clean zstd CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS="-Werror -static"
187209
$(MAKE) -C $(PRGDIR) clean zstd CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLAGS="-Werror -static"
188210
$(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werror -Wno-attributes -static"
189211
$(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLAGS="-m64 -static"
190212

213+
# run UBsan with -fsanitize-recover=signed-integer-overflow
214+
# due to a bug in UBsan when doing pointer subtraction
215+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63303
216+
191217
usan: clean
192-
$(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=undefined"
218+
$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -fsanitize=undefined"
193219

194220
asan: clean
195221
$(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=address"
196222

223+
asan-%: clean
224+
LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address" $(MAKE) -C $(TESTDIR) $*
225+
197226
msan: clean
198227
$(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=memory -fno-omit-frame-pointer" # datagen.c fails this test for no obvious reason
199228

229+
msan-%: clean
230+
LDFLAGS=-fuse-ld=gold MOREFLAGS="-fno-sanitize-recover=all -fsanitize=memory -fno-omit-frame-pointer" $(MAKE) -C $(TESTDIR) $*
231+
200232
asan32: clean
201233
$(MAKE) -C $(TESTDIR) test32 CC=clang MOREFLAGS="-g -fsanitize=address"
202234

203235
uasan: clean
204-
$(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=address -fsanitize=undefined"
236+
$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -fsanitize=address,undefined"
205237

206238
uasan-%: clean
207-
LDFLAGS=-fuse-ld=gold CFLAGS="-Og -fsanitize=address -fsanitize=undefined" $(MAKE) -C $(TESTDIR) $*
239+
LDFLAGS=-fuse-ld=gold MOREFLAGS="-Og -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -fsanitize=address,undefined" $(MAKE) -C $(TESTDIR) $*
208240

241+
tsan-%: clean
242+
LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=thread" $(MAKE) -C $(TESTDIR) $*
209243
apt-install:
210244
sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install $(APT_PACKAGES)
211245

@@ -217,7 +251,7 @@ ppcinstall:
217251
APT_PACKAGES="qemu-system-ppc qemu-user-static gcc-powerpc-linux-gnu" $(MAKE) apt-install
218252

219253
arminstall:
220-
APT_PACKAGES="qemu-system-arm qemu-user-static gcc-powerpc-linux-gnu gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross" $(MAKE) apt-install
254+
APT_PACKAGES="qemu-system-arm qemu-user-static gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross" $(MAKE) apt-install
221255

222256
valgrindinstall:
223257
APT_PACKAGES="valgrind" $(MAKE) apt-install
@@ -231,12 +265,15 @@ gcc6install: apt-add-repo
231265
gpp6install: apt-add-repo
232266
APT_PACKAGES="libc6-dev-i386 g++-multilib gcc-6 g++-6 g++-6-multilib" $(MAKE) apt-install
233267

268+
clang38install:
269+
APT_PACKAGES="clang-3.8" $(MAKE) apt-install
270+
234271
endif
235272

236273

237274
ifneq (,$(filter MSYS%,$(shell uname)))
238275
HOST_OS = MSYS
239-
CMAKE_PARAMS = -G"MSYS Makefiles"
276+
CMAKE_PARAMS = -G"MSYS Makefiles" -DZSTD_MULTITHREAD_SUPPORT:BOOL=OFF -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON
240277
endif
241278

242279

@@ -248,7 +285,7 @@ cmakebuild:
248285
cmake --version
249286
$(RM) -r $(BUILDIR)/cmake/build
250287
mkdir $(BUILDIR)/cmake/build
251-
cd $(BUILDIR)/cmake/build ; cmake -DPREFIX:STRING=~/install_test_dir $(CMAKE_PARAMS) .. ; $(MAKE) install ; $(MAKE) uninstall
288+
cd $(BUILDIR)/cmake/build ; cmake -DCMAKE_INSTALL_PREFIX:PATH=~/install_test_dir $(CMAKE_PARAMS) .. ; $(MAKE) install ; $(MAKE) uninstall
252289

253290
c90build: clean
254291
gcc -v

NEWS

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,39 @@
1+
v1.2.0
2+
cli : changed : Multithreading enabled by default (use target zstd-nomt or HAVE_THREAD=0 to disable)
3+
cli : new : command -T0 means "detect and use nb of cores", by Sean Purcell
4+
cli : new : zstdmt symlink hardwired to `zstd -T0`
5+
cli : new : command --threads=# (#671)
6+
cli : changed : cover dictionary builder by default, for improved quality, by Nick Terrell
7+
cli : new : commands --train-cover and --train-legacy, to select dictionary algorithm and parameters
8+
cli : experimental targets `zstd4` and `xzstd4`, with support for lz4 format, by Sean Purcell
9+
cli : fix : does not output compressed data on console
10+
cli : fix : ignore symbolic links unless --force specified,
11+
API : breaking change : ZSTD_createCDict_advanced(), only use compressionParameters as argument
12+
API : added : prototypes ZSTD_*_usingCDict_advanced(), for direct control over frameParameters.
13+
API : improved: ZSTDMT_compressCCtx() reduced memory usage
14+
API : fix : ZSTDMT_compressCCtx() now provides srcSize in header (#634)
15+
API : fix : src size stored in frame header is controlled at end of frame
16+
API : fix : enforced consistent rules for pledgedSrcSize==0 (#641)
17+
API : fix : error code "GENERIC" replaced by "dstSizeTooSmall" when appropriate
18+
build: improved cmake script, by @Majlen
19+
build: enabled Multi-threading support for *BSD, by Baptiste Daroussin
20+
tools: updated Paramgrill. Command -O# provides best parameters for sample and speed target.
21+
new : contrib/linux-kernel version, by Nick Terrell
22+
123
v1.1.4
224
cli : new : can compress in *.gz format, using --format=gzip command, by Przemyslaw Skibinski
325
cli : new : advanced benchmark command --priority=rt
426
cli : fix : write on sparse-enabled file systems in 32-bits mode, by @ds77
527
cli : fix : --rm remains silent when input is stdin
28+
cli : experimental : xzstd, with support for xz/lzma decoding, by Przemyslaw Skibinski
629
speed : improved decompression speed in streaming mode for single shot scenarios (+5%)
7-
memory : DDict (decompression dictionary) memory usage down from 150 KB to 20 KB
8-
arch : 32-bits variant able to generate and decode very long matches (>32 MB), by Sean Purcell
30+
memory: DDict (decompression dictionary) memory usage down from 150 KB to 20 KB
31+
arch: 32-bits variant able to generate and decode very long matches (>32 MB), by Sean Purcell
932
API : new : ZSTD_findFrameCompressedSize(), ZSTD_getFrameContentSize(), ZSTD_findDecompressedSize()
10-
build: new: meson build system in contrib/meson, by Dima Krasner
11-
build: improved cmake script, by @Majlen
12-
build: added -Wformat-security flag, as recommended by Padraig Brady
33+
API : changed : dropped support of legacy versions <= v0.3 (can be changed by modifying ZSTD_LEGACY_SUPPORT value)
34+
build : new: meson build system in contrib/meson, by Dima Krasner
35+
build : improved cmake script, by @Majlen
36+
build : added -Wformat-security flag, as recommended by Padraig Brady
1337
doc : new : educational decoder, by Sean Purcell
1438

1539
v1.1.3

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,26 @@ and a command line utility producing and decoding `.zst` and `.gz` files.
66
For other programming languages,
77
you can consult a list of known ports on [Zstandard homepage](http://www.zstd.net/#other-languages).
88

9-
|Branch |Status |
10-
|------------|---------|
11-
|master | [![Build Status](https://travis-ci.org/facebook/zstd.svg?branch=master)](https://travis-ci.org/facebook/zstd) |
12-
|dev | [![Build Status](https://travis-ci.org/facebook/zstd.svg?branch=dev)](https://travis-ci.org/facebook/zstd) |
9+
| dev branch status |
10+
|-------------------|
11+
| [![Build Status][travisDevBadge]][travisLink] [![Build status][AppveyorDevBadge]][AppveyorLink] [![Build status][CircleDevBadge]][CircleLink]
12+
13+
[travisDevBadge]: https://travis-ci.org/facebook/zstd.svg?branch=dev "Continuous Integration test suite"
14+
[travisLink]: https://travis-ci.org/facebook/zstd
15+
[AppveyorDevBadge]: https://ci.appveyor.com/api/projects/status/xt38wbdxjk5mrbem/branch/dev?svg=true "Windows test suite"
16+
[AppveyorLink]: https://ci.appveyor.com/project/YannCollet/zstd-p0yf0
17+
[CircleDevBadge]: https://circleci.com/gh/facebook/zstd/tree/dev.svg?style=shield "Short test suite"
18+
[CircleLink]: https://circleci.com/gh/facebook/zstd
19+
1320

1421
As a reference, several fast compression algorithms were tested and compared
15-
on a server running Linux Mint Debian Edition (`Linux version 4.8.0-1-amd64`),
22+
on a server running Linux Debian (`Linux version 4.8.0-1-amd64`),
1623
with a Core i7-6700K CPU @ 4.0GHz,
17-
using [lzbench v1.6], an open-source in-memory benchmark by @inikep
24+
using [lzbench], an open-source in-memory benchmark by @inikep
1825
compiled with GCC 6.3.0,
1926
on the [Silesia compression corpus].
2027

21-
[lzbench v1.6]: https://github.com/inikep/lzbench
28+
[lzbench]: https://github.com/inikep/lzbench
2229
[Silesia compression corpus]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia
2330

2431
| Compressor name | Ratio | Compression| Decompress.|
@@ -38,7 +45,12 @@ on the [Silesia compression corpus].
3845
Zstd can also offer stronger compression ratios at the cost of compression speed.
3946
Speed vs Compression trade-off is configurable by small increments. Decompression speed is preserved and remains roughly the same at all settings, a property shared by most LZ compression algorithms, such as [zlib] or lzma.
4047

41-
The following tests were run on a Core i7-3930K CPU @ 4.5GHz, using [lzbench], an open-source in-memory benchmark by @inikep compiled with GCC 5.2.1, on the [Silesia compression corpus].
48+
The following tests were run
49+
on a server running Linux Debian (`Linux version 4.8.0-1-amd64`)
50+
with a Core i7-6700K CPU @ 4.0GHz,
51+
using [lzbench], an open-source in-memory benchmark by @inikep
52+
compiled with GCC 6.3.0,
53+
on the [Silesia compression corpus].
4254

4355
Compression Speed vs Ratio | Decompression Speed
4456
---------------------------|--------------------

TESTING.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Testing
2+
=======
3+
4+
Zstandard CI testing is split up into three sections:
5+
short, medium, and long tests.
6+
7+
Short Tests
8+
-----------
9+
Short tests run on CircleCI for new commits on every branch and pull request.
10+
They consist of the following tests:
11+
- Compilation on all supported targets (x86, x86_64, ARM, AArch64, PowerPC, and PowerPC64)
12+
- Compilation on various versions of gcc, clang, and g++
13+
- `tests/playTests.sh` on x86_64, without the tests on long data (CLI tests)
14+
- Small tests (`tests/legacy.c`, `tests/longmatch.c`, `tests/symbols.c`) on x64_64
15+
16+
Medium Tests
17+
------------
18+
Medium tests run on every commit and pull request to `dev` branch, on TravisCI.
19+
They consist of the following tests:
20+
- The following tests run with UBsan and Asan on x86_64 and x86, as well as with
21+
Msan on x86_64
22+
- `tests/playTests.sh --test-long-data`
23+
- Fuzzer tests: `tests/fuzzer.c`, `tests/zstreamtest.c`, and `tests/decodecorpus.c`
24+
- `tests/zstreamtest.c` under Tsan (streaming mode, including multithreaded mode)
25+
- Valgrind Test (`make -C tests valgrindTest`) (testing CLI and fuzzer under valgrind)
26+
- Fuzzer tests (see above) on ARM, AArch64, PowerPC, and PowerPC64
27+
28+
Long Tests
29+
----------
30+
Long tests run on all commits to `master` branch,
31+
and once a day on the current version of `dev` branch,
32+
on TravisCI.
33+
They consist of the following tests:
34+
- Entire test suite (including fuzzers and some other specialized tests) on:
35+
- x86_64 and x86 with UBsan and Asan
36+
- x86_64 with Msan
37+
- ARM, AArch64, PowerPC, and PowerPC64
38+
- Streaming mode fuzzer with Tsan (for the `zstdmt` testing)
39+
- ZlibWrapper tests, including under valgrind
40+
- Versions test (ensuring `zstd` can decode files from all previous versions)
41+
- `pzstd` with asan and tsan, as well as in 32-bits mode
42+
- Testing `zstd` with legacy mode off
43+
- Testing `zbuff` (old streaming API)
44+
- Entire test suite and make install on OS X

0 commit comments

Comments
 (0)