From 0a5a5fb7fd7b23994dc916c7b290aa9b8422c06f Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 2 Nov 2016 13:57:55 -0700 Subject: [PATCH 1/6] Fix #418 : printing selected segments in zdict debug mode can segfault with certain pathological patterns --- lib/dictBuilder/zdict.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/dictBuilder/zdict.c b/lib/dictBuilder/zdict.c index b3f20b12b..ea50b54ad 100644 --- a/lib/dictBuilder/zdict.c +++ b/lib/dictBuilder/zdict.c @@ -898,12 +898,14 @@ size_t ZDICT_trainFromBuffer_unsafe( U32 const nb = MIN(25, dictList[0].pos); U32 const dictContentSize = ZDICT_dictSize(dictList); U32 u; - DISPLAYLEVEL(3, "\n %u segments found, of total size %u \n", dictList[0].pos, dictContentSize); - DISPLAYLEVEL(3, "list %u best segments \n", nb); - for (u=1; u<=nb; u++) { - U32 pos = dictList[u].pos; - U32 length = dictList[u].length; - U32 printedLength = MIN(40, length); + DISPLAYLEVEL(3, "\n %u segments found, of total size %u \n", dictList[0].pos-1, dictContentSize); + DISPLAYLEVEL(3, "list %u best segments \n", nb-1); + for (u=1; u samplesBuffSize) || ((pos + length) > samplesBuffSize)) + return ERROR(GENERIC); /* should never happen */ DISPLAYLEVEL(3, "%3u:%3u bytes at pos %8u, savings %7u bytes |", u, length, pos, dictList[u].savings); ZDICT_printHex((const char*)samplesBuffer+pos, printedLength); From f3f13211ae6a016c696f68a2f915c318ec2cf7c3 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 2 Nov 2016 17:02:45 -0700 Subject: [PATCH 2/6] Fix #419 : no warning when setting custom LDFLAGS --- Makefile | 14 ++++++++++---- lib/Makefile | 25 +++++++++++++++++-------- programs/Makefile | 19 +++++++------------ 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 20ae31e44..96f5a9ad8 100644 --- a/Makefile +++ b/Makefile @@ -20,28 +20,32 @@ else VOID = /dev/null endif -.PHONY: default all zlibwrapper zstd clean install uninstall travis-install test clangtest gpptest armtest usan asan uasan - -default: libzstd zstd +.PHONY: default +default: lib zstd +.PHONY: all all: $(MAKE) -C $(ZSTDDIR) $@ $(MAKE) -C $(PRGDIR) $@ zstd32 $(MAKE) -C $(TESTDIR) $@ all32 -libzstd: +.PHONY: lib +lib: @$(MAKE) -C $(ZSTDDIR) zstd: @$(MAKE) -C $(PRGDIR) cp $(PRGDIR)/zstd . +.PHONY: zlibwrapper zlibwrapper: $(MAKE) -C $(ZWRAPDIR) test +.PHONY: test test: $(MAKE) -C $(TESTDIR) $@ +.PHONY: clean clean: @$(MAKE) -C $(ZSTDDIR) $@ > $(VOID) @$(MAKE) -C $(PRGDIR) $@ > $(VOID) @@ -56,6 +60,8 @@ clean: #------------------------------------------------------------------------------ ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD)) HOST_OS = POSIX +.PHONY: install uninstall travis-install clangtest gpptest armtest usan asan uasan + install: @$(MAKE) -C $(ZSTDDIR) $@ @$(MAKE) -C $(PRGDIR) $@ diff --git a/lib/Makefile b/lib/Makefile index 1117b491c..31219e380 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -27,7 +27,7 @@ CPPFLAGS= -I. -I./common CFLAGS ?= -O3 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \ -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MOREFLAGS) +FLAGS = $(CPPFLAGS) $(CFLAGS) $(MOREFLAGS) ZSTD_FILES := common/*.c compress/*.c decompress/*.c dictBuilder/*.c @@ -39,7 +39,6 @@ ZSTD_FILES+= legacy/*.c CPPFLAGS += -I./legacy -DZSTD_LEGACY_SUPPORT=1 endif - # OS X linker doesn't support -soname, and use different extension # see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html ifeq ($(shell uname), Darwin) @@ -54,23 +53,33 @@ else SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER) endif +LIBZSTD = libzstd.$(SHARED_EXT_VER) + .PHONY: default all clean install uninstall -default: clean libzstd +default: lib -all: clean libzstd +all: lib -libzstd: $(ZSTD_FILES) +libzstd.a: ARFLAGS = rcs +libzstd.a: $(ZSTD_FILES) @echo compiling static library @$(CC) $(FLAGS) -c $^ - @$(AR) rcs $@.a *.o + @$(AR) $(ARFLAGS) $@ *.o + +$(LIBZSTD): LDFLAGS += -shared -fPIC +$(LIBZSTD): $(ZSTD_FILES) @echo compiling dynamic library $(LIBVER) - @$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER) + @$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ @echo creating versioned links @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR) @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT) +libzstd : $(LIBZSTD) + +lib: libzstd.a libzstd + clean: @rm -f core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc @rm -f decompress/*.o @@ -89,7 +98,7 @@ libzstd.pc: libzstd.pc.in -e 's|@VERSION@|$(VERSION)|' \ $< >$@ -install: libzstd libzstd.pc +install: libzstd.a libzstd libzstd.pc @install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/ @install -m 755 libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER) @cp -a libzstd.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR) diff --git a/programs/Makefile b/programs/Makefile index f5e625f06..c4ead25f6 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -41,7 +41,6 @@ ZSTDDECOMP_FILES := $(ZSTDDIR)/decompress/huf_decompress.c ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES) ZDICT_FILES := $(ZSTDDIR)/dictBuilder/*.c ZSTDDECOMP_O = $(ZSTDDIR)/decompress/zstd_decompress.o -ZSTDDECOMP32_O = $(ZSTDDIR)/decompress/zstd_decompress32.o ifeq ($(ZSTD_LEGACY_SUPPORT), 0) CPPFLAGS += -DZSTD_LEGACY_SUPPORT=0 @@ -76,30 +75,27 @@ default: zstd all: zstd -$(ZSTDDECOMP_O): CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) $(ZSTDDECOMP_O): CFLAGS += $(ALIGN_LOOP) -$(ZSTDDECOMP_O): $(ZSTDDIR)/decompress/zstd_decompress.c +zstd : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) zstd : $(ZSTDDECOMP_O) $(ZSTD_FILES) $(ZSTDLEGACY_FILES) $(ZDICT_FILES) \ zstdcli.c fileio.c bench.c datagen.c dibio.c ifneq (,$(filter Windows%,$(OS))) windres\generate_res.bat endif - $(CC) $(FLAGS) -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) $^ $(RES_FILE) -o $@$(EXT) + $(CC) $(FLAGS) $^ $(RES_FILE) -o $@$(EXT) -$(ZSTDDECOMP32_O): $(ZSTDDIR)/decompress/zstd_decompress.c - $(CC) -m32 $(ALIGN_LOOP) $(FLAGS) -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) $^ -c -o $@ - -zstd32 : $(ZSTDDECOMP32_O) $(ZSTD_FILES) $(ZSTDLEGACY_FILES) $(ZDICT_FILES) \ +zstd32 : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) +zstd32 : $(ZSTDDIR)/decompress/zstd_decompress.c $(ZSTD_FILES) $(ZSTDLEGACY_FILES) $(ZDICT_FILES) \ zstdcli.c fileio.c bench.c datagen.c dibio.c ifneq (,$(filter Windows%,$(OS))) windres\generate_res.bat endif - $(CC) -m32 $(FLAGS) -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) $^ $(RES32_FILE) -o $@$(EXT) + $(CC) -m32 $(FLAGS) $^ $(RES32_FILE) -o $@$(EXT) -zstd_nolegacy : clean_decomp_o +zstd-nolegacy : clean_decomp_o $(MAKE) zstd ZSTD_LEGACY_SUPPORT=0 zstd-pgo : MOREFLAGS = -fprofile-generate @@ -111,7 +107,7 @@ zstd-pgo : clean zstd ./zstd -b7i2 $(PROFILE_WITH) ./zstd -b5 $(PROFILE_WITH) $(RM) zstd - $(RM) $(ZSTDDIR)/decompress/zstd_decompress.o + $(RM) $(ZSTDDECOMP_O) $(MAKE) zstd MOREFLAGS=-fprofile-use zstd-frugal: $(ZSTDDECOMP_O) $(ZSTD_FILES) zstdcli.c fileio.c @@ -142,7 +138,6 @@ clean: clean_decomp_o: @$(RM) $(ZSTDDECOMP_O) - @$(RM) $(ZSTDDECOMP32_O) #---------------------------------------------------------------------------------- From 179b19776fb8909dd5e719126a457e80234ed9a2 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 2 Nov 2016 17:30:49 -0700 Subject: [PATCH 3/6] fileio.c does no longer need ZSTD_LEGACY_SUPPORT, and does no longer depend on zstd_legacy.h Added : ZSTD_isFrame() in experimental section --- lib/decompress/zstd_decompress.c | 19 ++++++++++++++- lib/zstd.h | 7 ++++++ programs/fileio.c | 42 +++++++++----------------------- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c index 4c47930cd..b6a3865ca 100644 --- a/lib/decompress/zstd_decompress.c +++ b/lib/decompress/zstd_decompress.c @@ -193,7 +193,24 @@ static void ZSTD_refDCtx(ZSTD_DCtx* dstDCtx, const ZSTD_DCtx* srcDCtx) * Decompression section ***************************************************************/ -/* See compression format details in : doc/zstd_compression_format.md */ +/*! ZSTD_isFrame() : + * Tells if the content of `buffer` starts with a valid Frame Identifier. + * Note : Frame Identifier is 4 bytes. If `size < 4`, @return will always be 0. + * Note 2 : Legacy Frame Identifiers are considered valid only if Legacy Support is enabled. + * Note 3 : Skippable Frame Identifiers are considered valid. */ +unsigned ZSTD_isFrame(const void* buffer, size_t size) +{ + if (size < 4) return 0; + { U32 const magic = MEM_readLE32(buffer); + if (magic == ZSTD_MAGICNUMBER) return 1; + if ((magic & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START) return 1; + } +#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) + if (ZSTD_isLegacy(buffer, size)) return 1; +#endif + return 0; +} + /** ZSTD_frameHeaderSize() : * srcSize must be >= ZSTD_frameHeaderSize_prefix. diff --git a/lib/zstd.h b/lib/zstd.h index ea5caf148..c18fd0d31 100644 --- a/lib/zstd.h +++ b/lib/zstd.h @@ -433,6 +433,13 @@ ZSTDLIB_API size_t ZSTD_compress_advanced (ZSTD_CCtx* ctx, /*--- Advanced decompression functions ---*/ +/*! ZSTD_isFrame() : + * Tells if the content of `buffer` starts with a valid Frame Identifier. + * Note : Frame Identifier is 4 bytes. If `size < 4`, @return will always be 0. + * Note 2 : Legacy Frame Identifiers are considered valid only if Legacy Support is enabled. + * Note 3 : Skippable Frame Identifiers are considered valid. */ +ZSTDLIB_API unsigned ZSTD_isFrame(const void* buffer, size_t size); + /*! ZSTD_estimateDCtxSize() : * Gives the potential amount of memory allocated to create a ZSTD_DCtx */ ZSTDLIB_API size_t ZSTD_estimateDCtxSize(void); diff --git a/programs/fileio.c b/programs/fileio.c index c4c308e03..fe321015e 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -8,16 +8,6 @@ */ -/* ************************************* - * Tuning options - ***************************************/ -#ifndef ZSTD_LEGACY_SUPPORT -/* LEGACY_SUPPORT : - * decompressor can decode older formats (starting from zstd 0.1+) */ -# define ZSTD_LEGACY_SUPPORT 1 -#endif - - /* ************************************* * Compiler Options ***************************************/ @@ -29,6 +19,7 @@ # define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */ #endif + /*-************************************* * Includes ***************************************/ @@ -44,10 +35,6 @@ #define ZSTD_STATIC_LINKING_ONLY /* ZSTD_magicNumber, ZSTD_frameHeaderSize_max */ #include "zstd.h" -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT==1) -# include "zstd_legacy.h" /* ZSTD_isLegacy */ -#endif - /*-************************************* * OS-specific Includes @@ -634,7 +621,7 @@ unsigned long long FIO_decompressFrame(dRess_t ress, @return : 0 (no error) */ static unsigned FIO_passThrough(FILE* foutput, FILE* finput, void* buffer, size_t bufferSize) { - size_t const blockSize = MIN (64 KB, bufferSize); + size_t const blockSize = MIN(64 KB, bufferSize); size_t readFromInput = 1; unsigned storedSkips = 0; @@ -682,21 +669,16 @@ static int FIO_decompressSrcFile(dRess_t ress, const char* srcFileName) } readSomething = 1; /* there is at least >= 4 bytes in srcFile */ if (sizeCheck != toRead) { DISPLAY("zstd: %s: unknown header \n", srcFileName); fclose(srcFile); return 1; } /* srcFileName is empty */ - { U32 const magic = MEM_readLE32(ress.srcBuffer); - if (((magic & 0xFFFFFFF0U) != ZSTD_MAGIC_SKIPPABLE_START) & (magic != ZSTD_MAGICNUMBER) -#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1) - & (!ZSTD_isLegacy(ress.srcBuffer, toRead)) -#endif - ) { - if ((g_overwrite) && !strcmp (srcFileName, stdinmark)) { /* pass-through mode */ - unsigned const result = FIO_passThrough(dstFile, srcFile, ress.srcBuffer, ress.srcBufferSize); - if (fclose(srcFile)) EXM_THROW(32, "zstd: %s close error", srcFileName); /* error should never happen */ - return result; - } else { - DISPLAYLEVEL(1, "zstd: %s: not in zstd format \n", srcFileName); - fclose(srcFile); - return 1; - } } } + if (!ZSTD_isFrame(ress.srcBuffer, toRead)) { + if ((g_overwrite) && !strcmp (srcFileName, stdinmark)) { /* pass-through mode */ + unsigned const result = FIO_passThrough(dstFile, srcFile, ress.srcBuffer, ress.srcBufferSize); + if (fclose(srcFile)) EXM_THROW(32, "zstd: %s close error", srcFileName); /* error should never happen */ + return result; + } else { + DISPLAYLEVEL(1, "zstd: %s: not in zstd format \n", srcFileName); + fclose(srcFile); + return 1; + } } filesize += FIO_decompressFrame(ress, dstFile, srcFile, toRead); } From 7347869fb684feedaecfa898a99bee2053c26c29 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 2 Nov 2016 22:28:37 -0700 Subject: [PATCH 4/6] fixed make install --- lib/Makefile | 7 ++++--- programs/Makefile | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 31219e380..04ebe26bd 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -26,7 +26,8 @@ INCLUDEDIR=$(PREFIX)/include CPPFLAGS= -I. -I./common CFLAGS ?= -O3 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \ - -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef + -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \ + -Wpointer-arith FLAGS = $(CPPFLAGS) $(CFLAGS) $(MOREFLAGS) @@ -73,8 +74,8 @@ $(LIBZSTD): $(ZSTD_FILES) @echo compiling dynamic library $(LIBVER) @$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ @echo creating versioned links - @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR) - @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT) + @ln -sf $@.$(SHARED_EXT_VER) libzstd.$(SHARED_EXT_MAJOR) + @ln -sf $@.$(SHARED_EXT_VER) libzstd.$(SHARED_EXT) libzstd : $(LIBZSTD) diff --git a/programs/Makefile b/programs/Makefile index c4ead25f6..64aeb668d 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -30,7 +30,8 @@ endif CPPFLAGS= -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/dictBuilder CFLAGS ?= -O3 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \ - -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef + -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \ + -Wpointer-arith CFLAGS += $(MOREFLAGS) FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) From 6c111fa3dae339cd5061f270b9f233886527f18b Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Thu, 3 Nov 2016 00:44:02 -0700 Subject: [PATCH 5/6] fix zlibWrapper make test --- zlibWrapper/.gitignore | 8 +++++++- zlibWrapper/Makefile | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/zlibWrapper/.gitignore b/zlibWrapper/.gitignore index 1fd8f416c..c3376bad8 100644 --- a/zlibWrapper/.gitignore +++ b/zlibWrapper/.gitignore @@ -3,10 +3,16 @@ _* example.* example_zstd.* fitblk.* -fitblk_zstd.* +fitblk_zstd.* zwrapbench.* foo.gz +example +example_zstd +fitblk +fitblk_zstd +zwrapbench + # Misc files *.bat *.zip diff --git a/zlibWrapper/Makefile b/zlibWrapper/Makefile index 0e4ca9e6f..b36a90d61 100644 --- a/zlibWrapper/Makefile +++ b/zlibWrapper/Makefile @@ -16,7 +16,7 @@ EXAMPLE_PATH = examples PROGRAMS_PATH = ../programs TEST_FILE = ../doc/zstd_compression_format.md CC ?= gcc -CFLAGS ?= -O3 +CFLAGS ?= -O3 CFLAGS += $(LOC) -I$(PROGRAMS_PATH) -I$(ZSTDLIBDIR) -I$(ZSTDLIBDIR)/common -I$(ZLIBWRAPPER_PATH) -std=gnu99 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef LDFLAGS = $(LOC) @@ -50,7 +50,7 @@ valgrindTest: clean example fitblk example_zstd fitblk_zstd zwrapbench .c.o: $(CC) $(CFLAGS) -c -o $@ $< - + example: $(EXAMPLE_PATH)/example.o $(ZLIBWRAPPER_PATH)/zstd_zlibwrapper.o $(ZSTDLIBRARY) $(CC) $(LDFLAGS) -o $@ $(EXAMPLE_PATH)/example.o $(ZLIBWRAPPER_PATH)/zstd_zlibwrapper.o $(ZSTDLIBRARY) $(ZLIB_LIBRARY) @@ -75,10 +75,10 @@ $(ZLIBWRAPPER_PATH)/zstdTurnedOn_zlibwrapper.o: $(ZLIBWRAPPER_PATH)/zstd_zlibwra $(CC) $(CFLAGS) -DZWRAP_USE_ZSTD=1 -I. -c -o $@ $(ZLIBWRAPPER_PATH)/zstd_zlibwrapper.c $(ZSTDLIBDIR)/libzstd.a: - $(MAKE) -C $(ZSTDLIBDIR) all + $(MAKE) -C $(ZSTDLIBDIR) libzstd.a $(ZSTDLIBDIR)/libzstd.so: - $(MAKE) -C $(ZSTDLIBDIR) all + $(MAKE) -C $(ZSTDLIBDIR) libzstd clean: -$(RM) $(ZLIBWRAPPER_PATH)/*.o $(EXAMPLE_PATH)/*.o *.o *.exe foo.gz example example_zstd fitblk fitblk_zstd zwrapbench From 861cd06ded86323155f554812b2391b50410239c Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Thu, 3 Nov 2016 01:11:56 -0700 Subject: [PATCH 6/6] fix test-zstd-nolegacy --- .travis.yml | 2 +- tests/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3be4575d8..9396c98da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ matrix: packages: - gcc-4.8 - g++-4.8 - env: PLATFORM="Ubuntu 12.04 container" CMD="make zlibwrapper && make clean && make -C tests test-zstd_nolegacy && make clean && make clean && make cmaketest && make clean && make -C contrib/pzstd googletest && make -C contrib/pzstd all && make -C contrib/pzstd check && make -C contrib/pzstd clean" + env: PLATFORM="Ubuntu 12.04 container" CMD="make zlibwrapper && make clean && make -C tests test-zstd-nolegacy && make clean && make clean && make cmaketest && make clean && make -C contrib/pzstd googletest && make -C contrib/pzstd all && make -C contrib/pzstd check && make -C contrib/pzstd clean" - os: linux sudo: false env: PLATFORM="Ubuntu 12.04 container" CMD="make usan" diff --git a/tests/Makefile b/tests/Makefile index ecff18290..80e11d6b0 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -76,7 +76,7 @@ zstd: zstd32: $(MAKE) -C $(PRGDIR) $@ -zstd_nolegacy: +zstd-nolegacy: $(MAKE) -C $(PRGDIR) $@ fullbench : $(ZSTD_FILES) $(PRGDIR)/datagen.c fullbench.c @@ -181,8 +181,8 @@ test-zstd: zstd zstd-playTests test-zstd32: ZSTD = $(PRGDIR)/zstd32 test-zstd32: zstd32 zstd-playTests -test-zstd_nolegacy: ZSTD = $(PRGDIR)/zstd -test-zstd_nolegacy: zstd_nolegacy zstd-playTests +test-zstd-nolegacy: ZSTD = $(PRGDIR)/zstd +test-zstd-nolegacy: zstd-nolegacy zstd-playTests test-fullbench: fullbench datagen ./fullbench -i1