git subrepo pull (merge) --force deps/libchdr
[pcsx_rearmed.git] / deps / libchdr / deps / zstd-1.5.5 / tests / Makefile
CommitLineData
648db22b 1
2# ################################################################
3# Copyright (c) Meta Platforms, Inc. and affiliates.
4# All rights reserved.
5#
6# This source code is licensed under both the BSD-style license (found in the
7# LICENSE file in the root directory of this source tree) and the GPLv2 (found
8# in the COPYING file in the root directory of this source tree).
9# You may select, at your option, one of the above-listed licenses.
10# ################################################################
11# datagen : Synthetic and parametrable data generator, for tests
12# fullbench : Precisely measure speed for each zstd inner functions
13# fullbench32: Same as fullbench, but forced to compile in 32-bits mode
14# fuzzer : Test tool, to check zstd integrity on target platform
15# fuzzer32: Same as fuzzer, but forced to compile in 32-bits mode
16# paramgrill : parameter tester for zstd
17# test-zstd-speed.py : script for testing zstd speed difference between commits
18# versionsTest : compatibility test between zstd versions stored on Github (v0.1+)
19# zstreamtest : Fuzzer test tool for zstd streaming API
20# zstreamtest32: Same as zstreamtest, but forced to compile in 32-bits mode
21# ##########################################################################
22
23LIBZSTD = ../lib
24
25ZSTD_LEGACY_SUPPORT ?= 0
26
27DEBUGLEVEL ?= 2
28export DEBUGLEVEL # transmit value to sub-makefiles
29
30include $(LIBZSTD)/libzstd.mk
31
32ZSTDDIR = $(LIBZSTD)
33PRGDIR = ../programs
34PYTHON ?= python3
35TESTARTEFACT := versionsTest
36
37DEBUGFLAGS += -g -Wno-c++-compat
38CPPFLAGS += -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \
39 -I$(ZSTDDIR)/dictBuilder -I$(ZSTDDIR)/deprecated -I$(PRGDIR) \
40 -DZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY=1
41
42ZSTDCOMMON_FILES := $(sort $(ZSTD_COMMON_FILES))
43ZSTDCOMP_FILES := $(sort $(ZSTD_COMPRESS_FILES))
44ZSTDDECOMP_FILES := $(sort $(ZSTD_DECOMPRESS_FILES))
45ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES)
46ZDICT_FILES := $(sort $(ZSTD_DICTBUILDER_FILES))
47
48ZSTD_F1 := $(sort $(wildcard $(ZSTD_FILES)))
49ZSTD_OBJ1 := $(subst $(ZSTDDIR)/common/,zstdm_,$(ZSTD_F1))
50ZSTD_OBJ2 := $(subst $(ZSTDDIR)/compress/,zstdc_,$(ZSTD_OBJ1))
51ZSTD_OBJ3 := $(subst $(ZSTDDIR)/decompress/,zstdd_,$(ZSTD_OBJ2))
52ZSTD_OBJ4 := $(ZSTD_OBJ3:.c=.o)
53ZSTD_OBJECTS := $(ZSTD_OBJ4:.S=.o)
54
55ZSTDMT_OBJ1 := $(subst $(ZSTDDIR)/common/,zstdmt_m_,$(ZSTD_F1))
56ZSTDMT_OBJ2 := $(subst $(ZSTDDIR)/compress/,zstdmt_c_,$(ZSTDMT_OBJ1))
57ZSTDMT_OBJ3 := $(subst $(ZSTDDIR)/decompress/,zstdmt_d_,$(ZSTDMT_OBJ2))
58ZSTDMT_OBJ4 := $(ZSTDMT_OBJ3:.c=.o)
59ZSTDMT_OBJECTS := $(ZSTDMT_OBJ4:.S=.o)
60
61# Define *.exe as extension for Windows systems
62ifneq (,$(filter Windows%,$(OS)))
63EXT =.exe
64MULTITHREAD_CPP = -DZSTD_MULTITHREAD
65MULTITHREAD_LD =
66else
67EXT =
68MULTITHREAD_CPP = -DZSTD_MULTITHREAD
69MULTITHREAD_LD = -pthread
70endif
71MULTITHREAD = $(MULTITHREAD_CPP) $(MULTITHREAD_LD)
72
73VOID = /dev/null
74ZSTREAM_TESTTIME ?= -T90s
75FUZZERTEST ?= -T200s
76ZSTDRTTEST = --test-large-data
77DECODECORPUS_TESTTIME ?= -T30
78
79.PHONY: default
80default: fullbench
81
82.PHONY: all
83all: fullbench fuzzer zstreamtest paramgrill datagen decodecorpus roundTripCrash poolTests
84
85.PHONY: all32
86all32: fullbench32 fuzzer32 zstreamtest32
87
88.PHONY: allnothread
89allnothread: MULTITHREAD_CPP=
90allnothread: MULTITHREAD_LD=
91allnothread: fullbench fuzzer paramgrill datagen decodecorpus
92
93# note : broken : requires symbols unavailable from dynamic library
94.PHONY: dll
95dll: fuzzer-dll zstreamtest-dll
96
97.PHONY: zstd zstd32 zstd-nolegacy # only external makefile knows how to build or update them
98zstd zstd32 zstd-nolegacy zstd-dll:
99 $(MAKE) -C $(PRGDIR) $@ MOREFLAGS+="$(DEBUGFLAGS)"
100
101.PHONY: libzstd
102libzstd :
103 $(MAKE) -C $(ZSTDDIR) libzstd MOREFLAGS+="$(DEBUGFLAGS)"
104
105%-dll : libzstd
106%-dll : LDFLAGS += -L$(ZSTDDIR) -lzstd
107
108$(ZSTDDIR)/libzstd.a :
109 $(MAKE) -C $(ZSTDDIR) libzstd.a
110
111zstdm_%.o : $(ZSTDDIR)/common/%.c
112 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
113
114zstdc_%.o : $(ZSTDDIR)/compress/%.c
115 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
116
117zstdd_%.o : $(ZSTDDIR)/decompress/%.c
118 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
119
120zstdd_%.o : $(ZSTDDIR)/decompress/%.S
121 $(CC) -c $(CPPFLAGS) $(ASFLAGS) $< -o $@
122
123zstdmt%.o : CPPFLAGS += $(MULTITHREAD_CPP)
124
125zstdmt_m_%.o : $(ZSTDDIR)/common/%.c
126 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
127
128zstdmt_c_%.o : $(ZSTDDIR)/compress/%.c
129 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
130
131zstdmt_d_%.o : $(ZSTDDIR)/decompress/%.c
132 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
133
134zstdmt_d_%.o : $(ZSTDDIR)/decompress/%.S
135 $(CC) -c $(CPPFLAGS) $(ASFLAGS) $< -o $@
136
137FULLBENCHS := fullbench fullbench32
138CLEAN += $(FULLBENCHS)
139fullbench32: CPPFLAGS += -m32
140$(FULLBENCHS) : CPPFLAGS += $(MULTITHREAD_CPP) -Wno-deprecated-declarations
141$(FULLBENCHS) : LDFLAGS += $(MULTITHREAD_LD)
142$(FULLBENCHS) : DEBUGFLAGS = -DNDEBUG # turn off assert() for speed measurements
143$(FULLBENCHS) : $(ZSTD_FILES)
144$(FULLBENCHS) : $(PRGDIR)/datagen.c $(PRGDIR)/util.c $(PRGDIR)/timefn.c $(PRGDIR)/benchfn.c fullbench.c
145 $(LINK.c) $^ -o $@$(EXT)
146
147CLEAN += fullbench-lib
148fullbench-lib : CPPFLAGS += -DXXH_NAMESPACE=ZSTD_
149fullbench-lib : $(PRGDIR)/datagen.c $(PRGDIR)/util.c $(PRGDIR)/timefn.c $(PRGDIR)/benchfn.c $(ZSTDDIR)/libzstd.a fullbench.c
150 $(LINK.c) $^ -o $@$(EXT)
151
152# note : broken : requires symbols unavailable from dynamic library
153fullbench-dll: $(PRGDIR)/datagen.c $(PRGDIR)/util.c $(PRGDIR)/benchfn.c $(PRGDIR)/timefn.c fullbench.c
154# $(CC) $(FLAGS) $(filter %.c,$^) -o $@$(EXT) -DZSTD_DLL_IMPORT=1 $(ZSTDDIR)/dll/libzstd.dll
155 $(LINK.c) $^ $(LDLIBS) -o $@$(EXT)
156
157CLEAN += fuzzer fuzzer32
158fuzzer : CPPFLAGS += $(MULTITHREAD_CPP) -Wno-deprecated-declarations
159fuzzer : LDFLAGS += $(MULTITHREAD_LD)
160fuzzer : $(ZSTDMT_OBJECTS)
161fuzzer fuzzer32 : $(ZDICT_FILES) $(PRGDIR)/util.c $(PRGDIR)/timefn.c $(PRGDIR)/datagen.c fuzzer.c
162
163fuzzer32 : CFLAGS += -m32 $(MULTITHREAD)
164fuzzer32 : $(ZSTD_FILES)
165 $(LINK.c) $^ -o $@$(EXT)
166
167# note : broken : requires symbols unavailable from dynamic library
168fuzzer-dll : $(ZSTDDIR)/common/xxhash.c $(PRGDIR)/util.c $(PRGDIR)/timefn.c $(PRGDIR)/datagen.c fuzzer.c
169 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) $(LDFLAGS) -o $@$(EXT)
170
171CLEAN += zstreamtest zstreamtest32
172ZSTREAM_LOCAL_FILES := $(PRGDIR)/datagen.c $(PRGDIR)/util.c $(PRGDIR)/timefn.c seqgen.c zstreamtest.c external_matchfinder.c
173ZSTREAM_PROPER_FILES := $(ZDICT_FILES) $(ZSTREAM_LOCAL_FILES)
174ZSTREAMFILES := $(ZSTD_FILES) $(ZSTREAM_PROPER_FILES)
175zstreamtest32 : CFLAGS += -m32
176zstreamtest zstreamtest32 : CPPFLAGS += $(MULTITHREAD_CPP)
177zstreamtest zstreamtest32 : LDFLAGS += $(MULTITHREAD_LD)
178zstreamtest : $(ZSTDMT_OBJECTS) $(ZSTREAM_PROPER_FILES)
179zstreamtest32 : $(ZSTREAMFILES)
180zstreamtest zstreamtest32 :
181 $(LINK.c) $^ -o $@$(EXT)
182
183CLEAN += zstreamtest_asan
184zstreamtest_asan : CFLAGS += -fsanitize=address
185zstreamtest_asan : $(ZSTREAMFILES)
186 $(LINK.c) $(MULTITHREAD) $^ -o $@$(EXT)
187
188CLEAN += zstreamtest_tsan
189zstreamtest_tsan : CFLAGS += -fsanitize=thread
190zstreamtest_tsan : $(ZSTREAMFILES)
191 $(LINK.c) $(MULTITHREAD) $^ -o $@$(EXT)
192
193CLEAN += zstreamtest_ubsan
194zstreamtest_ubsan : CFLAGS += -fsanitize=undefined
195zstreamtest_ubsan : $(ZSTREAMFILES)
196 $(LINK.c) $(MULTITHREAD) $^ -o $@$(EXT)
197
198# note : broken : requires symbols unavailable from dynamic library
199zstreamtest-dll : $(ZSTDDIR)/common/xxhash.c # xxh symbols not exposed from dll
200zstreamtest-dll : $(ZSTREAM_LOCAL_FILES)
201 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) $(LDFLAGS) -o $@$(EXT)
202
203CLEAN += paramgrill
204paramgrill : DEBUGFLAGS = # turn off debug for speed measurements
205paramgrill : LDLIBS += -lm
206paramgrill : $(ZSTD_FILES) $(PRGDIR)/util.c $(PRGDIR)/timefn.c $(PRGDIR)/benchfn.c $(PRGDIR)/benchzstd.c $(PRGDIR)/datagen.c paramgrill.c
207
208CLEAN += datagen
209datagen : $(PRGDIR)/datagen.c datagencli.c
210 $(LINK.c) $^ -o $@$(EXT)
211
212CLEAN += roundTripCrash
213roundTripCrash: CFLAGS += $(MULTITHREAD)
214roundTripCrash : $(ZSTD_OBJECTS) roundTripCrash.c
215
216CLEAN += longmatch
217longmatch : $(ZSTD_OBJECTS) longmatch.c
218
219CLEAN += bigdict
220bigdict: CFLAGS += $(MULTITHREAD)
221bigdict: $(ZSTDMT_OBJECTS) $(PRGDIR)/datagen.c bigdict.c
222
223CLEAN += invalidDictionaries
224invalidDictionaries : $(ZSTD_OBJECTS) invalidDictionaries.c
225
226CLEAN += legacy
227legacy : CPPFLAGS += -I$(ZSTDDIR)/legacy -UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=4
228legacy : $(ZSTD_FILES) $(sort $(wildcard $(ZSTDDIR)/legacy/*.c)) legacy.c
229
230CLEAN += decodecorpus
231decodecorpus : LDLIBS += -lm
232decodecorpus : $(filter-out zstdc_zstd_compress.o, $(ZSTD_OBJECTS)) $(ZDICT_FILES) $(PRGDIR)/util.c $(PRGDIR)/timefn.c decodecorpus.c
233
234CLEAN += poolTests
235poolTests : $(PRGDIR)/util.c $(PRGDIR)/timefn.c poolTests.c $(ZSTDDIR)/common/pool.c $(ZSTDDIR)/common/threading.c $(ZSTDDIR)/common/zstd_common.c $(ZSTDDIR)/common/error_private.c
236 $(LINK.c) $(MULTITHREAD) $^ -o $@$(EXT)
237
238.PHONY: versionsTest
239versionsTest: clean
240 $(PYTHON) test-zstd-versions.py
241
242.PHONY: automated_benchmarking
243automated_benchmarking: clean
244 $(PYTHON) automated_benchmarking.py
245
246# make checkTag : check that release tag corresponds to release version
247CLEAN += checkTag
248checkTag.o : $(ZSTDDIR)/zstd.h
249
250.PHONY: clean
251clean:
252 $(MAKE) -C $(ZSTDDIR) clean
253 $(MAKE) -C $(PRGDIR) clean
254 $(RM) -fR $(TESTARTEFACT)
255 $(RM) -rf tmp* # some test directories are named tmp*
256 $(RM) $(CLEAN) core *.o *.tmp result* *.gcda dictionary *.zst \
257 $(PRGDIR)/zstd$(EXT) $(PRGDIR)/zstd32$(EXT) \
258 fullbench-dll$(EXT) fuzzer-dll$(EXT) zstreamtest-dll$(EXT)
259 @echo Cleaning completed
260
261
262#----------------------------------------------------------------------------------
263# valgrind tests validated only for some posix platforms
264#----------------------------------------------------------------------------------
265UNAME := $(shell uname)
266ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS AIX))
267HOST_OS = POSIX
268
269.PHONY: test-valgrind
270test-valgrind: VALGRIND = valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1
271test-valgrind: zstd datagen fuzzer fullbench
272 @echo "\n ---- valgrind tests : memory analyzer ----"
273 $(VALGRIND) ./datagen -g50M > $(VOID)
274 $(VALGRIND) $(PRGDIR)/zstd ; if [ $$? -eq 0 ] ; then echo "zstd without argument should have failed"; false; fi
275 ./datagen -g80 | $(VALGRIND) $(PRGDIR)/zstd - -c > $(VOID)
276 ./datagen -g16KB | $(VALGRIND) $(PRGDIR)/zstd -vf - -c > $(VOID)
277 ./datagen -g2930KB | $(VALGRIND) $(PRGDIR)/zstd -5 -vf - -o tmp
278 $(VALGRIND) $(PRGDIR)/zstd -vdf tmp -c > $(VOID)
279 ./datagen -g64MB | $(VALGRIND) $(PRGDIR)/zstd -vf - -c > $(VOID)
280 $(RM) tmp
281 $(VALGRIND) ./fuzzer -T1mn -t1
282 $(VALGRIND) ./fullbench -i1
283
284endif
285
286ifneq (,$(filter MINGW% MSYS%,$(UNAME)))
287 HOST_OS = MSYS
288endif
289
290
291#-----------------------------------------------------------------------------
292# make tests validated only for below targets
293#-----------------------------------------------------------------------------
294ifneq (,$(filter $(HOST_OS),MSYS POSIX))
295
296DIFF:=diff
297ifneq (,$(filter $(UNAME),SunOS))
298 DIFF:=gdiff
299endif
300
301.PHONY: list
302list:
303 @$(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
304
305.PHONY: shortest
306shortest: ZSTDRTTEST= # remove long tests
307shortest: test-zstd
308
309.PHONY: check
310check: shortest
311
312.PHONY: fuzztest
313fuzztest: test-fuzzer test-zstream test-decodecorpus
314
315.PHONY: test
316test: test-zstd test-fullbench test-fuzzer test-zstream test-invalidDictionaries test-legacy test-decodecorpus test-cli-tests
317ifeq ($(QEMU_SYS),)
318test: test-pool
319endif
320
321.PHONY: test32
322test32: test-zstd32 test-fullbench32 test-fuzzer32 test-zstream32
323
324.PHONY: test-all
325test-all: test test32 test-decodecorpus-cli
326
327.PHONY: test-zstd test-zstd32 test-zstd-nolegacy
328test-zstd: ZSTD = $(PRGDIR)/zstd
329test-zstd: zstd
330
331.PHONY: test-zstd-dll
332test-zstd-dll: ZSTD = $(PRGDIR)/zstd
333test-zstd-dll: zstd-dll
334
335test-zstd32: ZSTD = $(PRGDIR)/zstd32
336test-zstd32: zstd32
337
338test-zstd-nolegacy: ZSTD = $(PRGDIR)/zstd-nolegacy
339test-zstd-nolegacy: zstd-nolegacy
340
341test-zstd test-zstd32 test-zstd-nolegacy test-zstd-dll: datagen
342 file $(ZSTD)
343 EXE_PREFIX="$(QEMU_SYS)" ZSTD_BIN="$(ZSTD)" DATAGEN_BIN=./datagen ./playTests.sh $(ZSTDRTTEST)
344
345.PHONY: test-cli-tests
346test-cli-tests: ZSTD = $(PRGDIR)/zstd
347test-cli-tests: zstd datagen
348 file $(ZSTD)
349 ./cli-tests/run.py --exec-prefix="$(QEMU_SYS)" --zstd="$(ZSTD)" --datagen=./datagen
350
351.PHONY: test-fullbench
352test-fullbench: fullbench datagen
353 $(QEMU_SYS) ./fullbench -i1
354 $(QEMU_SYS) ./fullbench -i1 -P0
355
356.PHONY: test-fullbench32
357test-fullbench32: fullbench32 datagen
358 $(QEMU_SYS) ./fullbench32 -i1
359 $(QEMU_SYS) ./fullbench32 -i1 -P0
360
361.PHONY: test-fuzzer
362test-fuzzer: fuzzer
363 $(QEMU_SYS) ./fuzzer -v $(FUZZERTEST) $(FUZZER_FLAGS)
364
365# Note : this test presumes `fuzzer` will be built
366.PHONY: test-fuzzer-stackmode
367test-fuzzer-stackmode: MOREFLAGS += -DZSTD_HEAPMODE=0
368test-fuzzer-stackmode: test-fuzzer
369
370.PHONY: test-fuzzer32
371test-fuzzer32: fuzzer32
372 $(QEMU_SYS) ./fuzzer32 -v $(FUZZERTEST) $(FUZZER_FLAGS)
373
374.PHONY: test-zstream
375test-zstream: zstreamtest
376 $(QEMU_SYS) ./zstreamtest -v $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
377 $(QEMU_SYS) ./zstreamtest --newapi -t1 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
378
379test-zstream32: zstreamtest32
380 $(QEMU_SYS) ./zstreamtest32 -v $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
381
382test-longmatch: longmatch
383 $(QEMU_SYS) ./longmatch
384
385test-bigdict: bigdict
386 $(QEMU_SYS) ./bigdict
387
388test-invalidDictionaries: invalidDictionaries
389 $(QEMU_SYS) ./invalidDictionaries
390
391test-legacy: legacy
392 $(QEMU_SYS) ./legacy
393
394test-decodecorpus: decodecorpus
395 $(QEMU_SYS) ./decodecorpus -t $(DECODECORPUS_TESTTIME)
396
397test-decodecorpus-cli: decodecorpus
398 @echo "\n ---- decodecorpus basic cli tests ----"
399 @mkdir testdir
400 ./decodecorpus -n5 -otestdir -ptestdir
401 @cd testdir && \
402 $(ZSTD) -d z000000.zst -o tmp0 && \
403 $(ZSTD) -d z000001.zst -o tmp1 && \
404 $(ZSTD) -d z000002.zst -o tmp2 && \
405 $(ZSTD) -d z000003.zst -o tmp3 && \
406 $(ZSTD) -d z000004.zst -o tmp4 && \
407 diff z000000 tmp0 && \
408 diff z000001 tmp1 && \
409 diff z000002 tmp2 && \
410 diff z000003 tmp3 && \
411 diff z000004 tmp4 && \
412 rm ./* && \
413 cd ..
414 @echo "\n ---- decodecorpus dictionary cli tests ----"
415 ./decodecorpus -n5 -otestdir -ptestdir --use-dict=1MB
416 @cd testdir && \
417 $(ZSTD) -d z000000.zst -D dictionary -o tmp0 && \
418 $(ZSTD) -d z000001.zst -D dictionary -o tmp1 && \
419 $(ZSTD) -d z000002.zst -D dictionary -o tmp2 && \
420 $(ZSTD) -d z000003.zst -D dictionary -o tmp3 && \
421 $(ZSTD) -d z000004.zst -D dictionary -o tmp4 && \
422 diff z000000 tmp0 && \
423 diff z000001 tmp1 && \
424 diff z000002 tmp2 && \
425 diff z000003 tmp3 && \
426 diff z000004 tmp4 && \
427 cd ..
428 @rm -rf testdir
429
430test-pool: poolTests
431 $(QEMU_SYS) ./poolTests
432
433test-lz4: ZSTD = LD_LIBRARY_PATH=/usr/local/lib $(PRGDIR)/zstd
434test-lz4: ZSTD_LZ4 = LD_LIBRARY_PATH=/usr/local/lib ./lz4
435test-lz4: ZSTD_UNLZ4 = LD_LIBRARY_PATH=/usr/local/lib ./unlz4
436test-lz4: zstd decodecorpus datagen
437 [ -f lz4 ] || ln -s $(PRGDIR)/zstd lz4
438 [ -f unlz4 ] || ln -s $(PRGDIR)/zstd unlz4
439
440 ./decodecorpus -ptmp
441 # lz4 -> zstd
442 lz4 < tmp | \
443 $(ZSTD) -d | \
444 cmp - tmp
445 lz4 < tmp | \
446 $(ZSTD_UNLZ4) | \
447 cmp - tmp
448 # zstd -> lz4
449 $(ZSTD) --format=lz4 < tmp | \
450 lz4 -d | \
451 cmp - tmp
452 $(ZSTD_LZ4) < tmp | \
453 lz4 -d | \
454 cmp - tmp
455 # zstd -> zstd
456 $(ZSTD) --format=lz4 < tmp | \
457 $(ZSTD) -d | \
458 cmp - tmp
459 # zstd -> zstd
460 $(ZSTD) < tmp | \
461 $(ZSTD) -d | \
462 cmp - tmp
463
464 ./datagen -g384KB | $(ZSTD) --format=lz4 | $(ZSTD) -d > /dev/null
465
466 rm tmp lz4 unlz4
467
468endif