Lines Matching refs:tmp
65 rm -f tmp.zst tmp.md5.1 tmp.md5.2
67 datagen $1 $local_p > tmp
68 < tmp $MD5SUM > tmp.md5.1
69 zstd --ultra -v$local_c -c tmp | zstd -d$local_d | $MD5SUM > tmp.md5.2
70 $DIFF -q tmp.md5.1 tmp.md5.2
188 datagen > tmp
193 zstd -f tmp # trivial compression case, creates tmp.zst
194 zstd -f -z tmp
195 zstd -f -k tmp
196 zstd -f -C tmp
198 zstd -df tmp.zst # trivial decompression case (overwrites tmp)
200 zstd -99 -f tmp # too large compression level, automatic sized down
201 zstd -5000000000 -f tmp && die "too large numeric value : must fail"
203 zstd --fast -f tmp # == -1
204 zstd --fast=3 -f tmp # == -3
205 zstd --fast=200000 -f tmp # too low compression level, automatic fixed
206 zstd --fast=5000000000 -f tmp && die "too large numeric value : must fail"
207 zstd -c --fast=0 tmp > $INTOVOID && die "--fast must not accept value 0"
209 zstd --fast=9999999999 -f tmp && die "should have refused numeric value"
211 ZSTD_CLEVEL=12 zstd -f tmp # positive compression level
212 ZSTD_CLEVEL=-12 zstd -f tmp # negative compression level
213 ZSTD_CLEVEL=+12 zstd -f tmp # valid: verbose '+' sign
214 ZSTD_CLEVEL='' zstd -f tmp # empty env var, warn and revert to default setting
215 ZSTD_CLEVEL=- zstd -f tmp # malformed env var, warn and revert to default setting
216 ZSTD_CLEVEL=a zstd -f tmp # malformed env var, warn and revert to default setting
217 ZSTD_CLEVEL=+a zstd -f tmp # malformed env var, warn and revert to default setting
218 ZSTD_CLEVEL=3a7 zstd -f tmp # malformed env var, warn and revert to default setting
219 ZSTD_CLEVEL=50000000000 zstd -f tmp # numeric value too large, warn and revert to default setting
221 ZSTD_CLEVEL=12 zstd --fast=3 -f tmp # overridden by command line option
223 zstd tmp -c > tmpCompressed
224 zstd tmp --stdout > tmpCompressed # long command format
227 zstd tmp -o tmpCompressed
230 zstd tmp -fo tmpCompressed
232 cp tmp tmp2
250 zstd -df tmp && die "should have refused : wrong extension"
256 zstd -dc < tmp.zst > $INTOVOID # combine decompression, stdin & stdout
257 zstd -dc - < tmp.zst > $INTOVOID
258 zstd -d < tmp.zst > $INTOVOID # implicit stdout when stdin is used
259 zstd -d - < tmp.zst > $INTOVOID
261 zstd -d -f tmp.zst -M2K -c > $INTOVOID && die "decompression needs more memory than allowed"
262 zstd -d -f tmp.zst --memlimit=2K -c > $INTOVOID && die "decompression needs more memory than allowe…
263 zstd -d -f tmp.zst --memory=2K -c > $INTOVOID && die "decompression needs more memory than allowed"…
264 zstd -d -f tmp.zst --memlimit-decompress=2K -c > $INTOVOID && die "decompression needs more memory …
266 zstd -q tmp && die "overwrite check failed!"
268 zstd -q -f tmp
269 zstd -q --force tmp
286 zstd tmp -fo tmp && die "zstd compression overwrote the input file"
287 zstd tmp.zst -dfo tmp.zst && die "zstd decompression overwrote the input file"
291 zstd tmp -c --no-compress-literals -1 | zstd -t
292 zstd tmp -c --no-compress-literals --fast=1 | zstd -t
293 zstd tmp -c --no-compress-literals -19 | zstd -t
294 zstd tmp -c --compress-literals -1 | zstd -t
295 zstd tmp -c --compress-literals --fast=1 | zstd -t
296 zstd tmp -c --compress-literals -19 | zstd -t
297 zstd -b --fast=1 -i0e1 tmp --compress-literals
298 zstd -b --fast=1 -i0e1 tmp --no-compress-literals
300 zstd -f tmp -o tmp_corrupt.zst --check
301 zstd -f tmp -o tmp.zst --no-check
305 zstd -d -f tmp.zst --no-check
376 zstd -c -r < tmp > tmp.zst
380 zstd -f --rm tmp
381 test ! -f tmp # tmp should no longer be present
382 zstd -f -d --rm tmp.zst
383 test ! -f tmp.zst # tmp.zst should no longer be present
385 println hello > tmp
386 zstd tmp -f -o "$DEVDEVICE" 2>tmplog > "$INTOVOID"
389 zstd tmp -f -o "$INTOVOID" 2>&1 | grep "Refusing to remove non-regular file" && die
392 rm -f tmp
393 zstd -f tmp && die "tmp not present : should have failed"
394 test ! -f tmp.zst # tmp.zst should not be created
396 touch tmp # create destination file
397 zstd -d -f tmp.zst && die "attempt to decompress a non existing file"
398 test -f tmp # destination file should still be present
400 rm -f tmp # erase source file
401 touch tmp.zst # create destination file
402 zstd -f tmp && die "attempt to compress a non existing file"
403 test -f tmp.zst # destination file should still be present
404 rm -rf tmp* # may also erase tmp* directory from previous failed run
411 dd bs=1048576 count=1 if=/dev/zero of=tmp
413 $DIFF -s tmp1 tmp
414 rm -f tmp*
422 zstd tmp1 tmp2 -o tmp.zst
429 zstd -d tmp1.zst tmp2.zst -o tmp
457 zstd -f tmp*
476 rm -f tmp*
488 rm -rf tmp*
586 datagen > tmp
587 sudoZstd tmp -o $INTOVOID # sudo rights could modify /dev/null permissions
588 sudoZstd tmp -c > $INTOVOID
589 zstd tmp -f -o tmp.zst
590 sudoZstd -d tmp.zst -c > $INTOVOID
591 sudoZstd -d tmp.zst -o $INTOVOID
600 datagen -g65536 > tmp.img
601 sudo losetup -fP tmp.img
604 sudoZstd $LOOP_DEV -c > tmp.img.zst && die "should fail without -f"
605 sudoZstd -f $LOOP_DEV -c > tmp.img.zst
606 zstd -d tmp.img.zst -o tmp.img.copy
608 $DIFF -s tmp.img tmp.img.copy || die "round trip failed"
609 rm -f tmp.img tmp.img.zst tmp.img.copy
613 datagen > tmp
614 touch -m -t 200001010000.00 tmp
616 zstd -f tmp -o tmp.zst
617 assertSameMTime tmp tmp.zst
619 zstd -f -d tmp.zst -o tmp.out
620 assertSameMTime tmp.zst tmp.out
621 rm -f tmp
644 rm -rf tmp*
674 rm -rf tmp*
743 ls tmp* > tmpList
745 rm -rf tmp*
758 rm -rf tmp*
761 datagen > tmp
762 zstd --show-default-cparams -f tmp
763 zstd --show-default-cparams -d tmp.zst && die "error: can't use --show-default-cparams in decompres…
764 rm -rf tmp*
772 rm -rf tmp*
775 datagen > tmp
776 zstd -vv tmp 2>&1 | \
779 rm -rf tmp*
782 println "Hello world!" | zstd --zstd=windowLog=21, - -o tmp.zst && die "wrong parameters not d…
783 println "Hello world!" | zstd --zstd=windowLo=21 - -o tmp.zst && die "wrong parameters not d…
784 println "Hello world!" | zstd --zstd=windowLog=21,slog - -o tmp.zst && die "wrong parameters not d…
785 println "Hello world!" | zstd --zstd=strategy=10 - -o tmp.zst && die "parameter out of bound…
786 test ! -f tmp.zst # tmp.zst should not be created
804 println "hello " > hello.tmp
805 println "world!" > world.tmp
806 cat hello.tmp world.tmp > helloworld.tmp
807 zstd -c hello.tmp > hello.zst
808 zstd -c world.tmp > world.zst
809 zstd -c hello.tmp world.tmp > helloworld.zst
810 zstd -dc helloworld.zst > result.tmp
811 $DIFF helloworld.tmp result.tmp
813 zstd -dc helloworld.zst > result.tmp
814 cat result.tmp
815 $DIFF helloworld.tmp result.tmp
817 zstd -c hello.tmp > hello.zst --no-check
818 zstd -c world.tmp > world.zst --no-check
820 zstd -dc helloworld.zst > result.tmp
821 $DIFF helloworld.tmp result.tmp
824 $EXE_PREFIX ./zstdcat helloworld.zst > result.tmp
825 $DIFF helloworld.tmp result.tmp
827 $EXE_PREFIX ./zstdcat helloworld.link.zst > result.tmp
828 $DIFF helloworld.tmp result.tmp
830 rm -f result.tmp
833 $EXE_PREFIX ./zcat helloworld.zst > result.tmp
834 $DIFF helloworld.tmp result.tmp
835 $EXE_PREFIX ./zcat helloworld.link.zst > result.tmp
836 $DIFF helloworld.tmp result.tmp
838 rm -f ./*.tmp ./*.zstd
857 rm -f hello.tmp world.tmp world2.tmp hello.tmp.zst world.tmp.zst
858 println "hello world" > hello.tmp
859 ln -s hello.tmp world.tmp
860 ln -s hello.tmp world2.tmp
861 zstd world.tmp hello.tmp || true
862 test -f hello.tmp.zst # regular file should have been compressed!
863 test ! -f world.tmp.zst # symbolic link should not have been compressed!
864 zstd world.tmp || true
865 test ! -f world.tmp.zst # symbolic link should not have been compressed!
866 zstd world.tmp world2.tmp || true
867 test ! -f world.tmp.zst # symbolic link should not have been compressed!
868 test ! -f world2.tmp.zst # symbolic link should not have been compressed!
869 zstd world.tmp hello.tmp -f
870 test -f world.tmp.zst # symbolic link should have been compressed with --force
871 rm -f hello.tmp world.tmp world2.tmp hello.tmp.zst world.tmp.zst
905 datagen -g11000 > tmp
907 file_size=$(zstd -14 -f tmp -o tmp.zst && wc -c < tmp.zst)
908 stream_size=$(cat tmp | zstd -14 --stream-size=11000 | wc -c)
913 cat tmp | zstd -14 -f tmp -o tmp.zst --stream-size=11000
914 zstd -df tmp.zst -o tmp_decompress
915 cmp tmp tmp_decompress || die "difference between original and decompressed file"
917 cat tmp | zstd -14 -f -o tmp.zst --stream-size=11001 && die "should fail with incorrect stream size"
920 rm -f tmp*
925 rm -rf tmp*
928 rm -f tmp*
934 rm -rf tmp*
938 datagen -g11000 > tmp
942 file_size=$(zstd -14 -f tmp -o tmp.zst && wc -c < tmp.zst)
943 stream_size=$(cat tmp | zstd -14 --size-hint=11000 | wc -c)
948 cat tmp | zstd -14 -f -o tmp.zst --size-hint=11000
949 zstd -df tmp.zst -o tmp_decompress
950 cmp tmp tmp_decompress || die "difference between original and decompressed file"
952 cat tmp | zstd -14 -f -D tmpDict --size-hint=11000 | zstd -t -D tmpDict
954 zstd -14 -f -D tmpDict --size-hint=11000 tmp tmp2
955 zstd -14 -f -o tmp1_.zst -D tmpDict --size-hint=11000 tmp
957 cmp tmp.zst tmp1_.zst || die "first file's output differs"
960 cat tmp | zstd -14 -f --size-hint=11050 | zstd -t # slightly too high
961 cat tmp | zstd -14 -f --size-hint=10950 | zstd -t # slightly too low
962 cat tmp | zstd -14 -f --size-hint=22000 | zstd -t # considerably too high
963 cat tmp | zstd -14 -f --size-hint=5500 | zstd -t # considerably too low
965 cat tmp | zstd -14 -f --size-hint=11K | zstd -t
966 cat tmp | zstd -14 -f --size-hint=11KB | zstd -t
967 cat tmp | zstd -14 -f --size-hint=11KiB | zstd -t
968 cat tmp | zstd -14 -f --size-hint=1M | zstd -t
969 cat tmp | zstd -14 -f --size-hint=1MB | zstd -t
970 cat tmp | zstd -14 -f --size-hint=1MiB | zstd -t
988 cp "$TESTFILE" tmp
992 zstd -f tmp -D tmpDict
993 zstd -d tmp.zst -D tmpDict -fo result
996 zstd -6f tmp -D tmpDict --zstd=clog=25,hlog=23
998 zstd -f tmp -D tmpDict --zstd=strategy=6
999 zstd -d tmp.zst -D tmpDict -fo result
1003 cat tmpDict | zstd -f tmp -D /proc/self/fd/0 && die "Piped dictionary should fail!"
1004 cat tmpDict | zstd -d tmp.zst -D /proc/self/fd/0 -f && die "Piped dictionary should fail!"
1013 zstd -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
1026 zstd -f tmp -D tmpDict1 --no-dictID
1027 zstd -d tmp.zst -D tmpDict -fo result
1044 println "Hello World" > tmp
1045 zstd --train-legacy -q tmp && die "Dictionary training should fail : not enough input source"
1046 datagen -P0 -g10M > tmp
1047 zstd --train-legacy -q tmp && die "Dictionary training should fail : source is pure noise"
1059 rm -f tmp* dictionary
1074 cp "$TESTFILE" tmp
1075 zstd -f tmp -D tmpDict
1076 zstd -d tmp.zst -D tmpDict -fo result
1080 zstd -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
1109 rm -f tmp* dictionary
1118 cp "$TESTFILE" tmp
1119 zstd -f tmp -D tmpDict
1120 zstd -d tmp.zst -D tmpDict -fo result
1125 zstd -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
1137 rm -f tmp* dictionary
1189 datagen > tmp
1190 rm -f tmp.zst
1191 zstd --format=zstd -f tmp
1192 test -f tmp.zst
1204 datagen > tmp
1205 zstd --format=gzip -f tmp
1206 gzip -t -v tmp.gz
1207 gzip -f tmp
1208 zstd -d -f -v tmp.gz
1209 rm -f tmp*
1221 datagen > tmp
1222 zstd -f --format=gzip tmp
1223 zstd -f tmp
1224 cat tmp.gz tmp.zst tmp.gz tmp.zst | zstd -d -f -o tmp
1225 truncateLastByte tmp.gz | zstd -t > $INTOVOID && die "incomplete frame not detected !"
1226 rm -f tmp*
1232 datagen > tmp
1233 rm -f tmp.zst
1234 zstd --format=gzip --format=zstd -f tmp
1235 test -f tmp.zst
1248 datagen > tmp
1249 zstd --format=lzma -f tmp
1250 zstd --format=xz -f tmp
1251 xz -Q -t -v tmp.xz
1252 xz -Q -t -v tmp.lzma
1253 xz -Q -f -k tmp
1254 lzma -Q -f -k --lzma1 tmp
1255 zstd -d -f -v tmp.xz
1256 zstd -d -f -v tmp.lzma
1257 rm -f tmp*
1264 datagen > tmp
1265 ./xz tmp
1266 xz -Q -d tmp.xz
1267 ./lzma tmp
1268 lzma -Q -d tmp.lzma
1270 xz -Q tmp
1271 ./xz -d tmp.xz
1272 lzma -Q tmp
1273 ./lzma -d tmp.lzma
1275 rm -f tmp*
1287 datagen > tmp
1288 zstd -f --format=xz tmp
1289 zstd -f --format=lzma tmp
1290 zstd -f tmp
1291 cat tmp.xz tmp.lzma tmp.zst tmp.lzma tmp.xz tmp.zst | zstd -d -f -o tmp
1292 truncateLastByte tmp.xz | zstd -t > $INTOVOID && die "incomplete frame not detected !"
1293 truncateLastByte tmp.lzma | zstd -t > $INTOVOID && die "incomplete frame not detected !"
1294 rm -f tmp*
1308 datagen > tmp
1309 zstd --format=lz4 -f tmp
1310 lz4 -t -v tmp.lz4
1311 lz4 -f -m tmp # ensure result is sent into tmp.lz4, not stdout
1312 zstd -d -f -v tmp.lz4
1313 rm -f tmp*
1324 datagen > tmp
1325 zstd -f --format=lz4 tmp
1326 zstd -f tmp
1327 cat tmp.lz4 tmp.zst tmp.lz4 tmp.zst | zstd -d -f -o tmp
1328 truncateLastByte tmp.lz4 | zstd -t > $INTOVOID && die "incomplete frame not detected !"
1329 rm -f tmp*
1337 ! zstd -d tmp.abc 2> tmplg
1358 rm -f tmp tmp.tar tmp.tzst tmp.tgz tmp.txz tmp.tlz4 tmp1.zstd
1360 datagen > tmp
1361 tar -cf tmp.tar tmp
1362 zstd tmp.tar -o tmp.tzst
1363 rm -f tmp.tar
1364 zstd -d tmp.tzst
1365 [ -e tmp.tar ] || die ".tzst failed to decompress to .tar!"
1366 rm -f tmp.tar tmp.tzst
1369 tar -f - -c tmp | gzip > tmp.tgz
1370 zstd -d tmp.tgz
1371 [ -e tmp.tar ] || die ".tgz failed to decompress to .tar!"
1372 rm -f tmp.tar tmp.tgz
1376 tar -f - -c tmp | zstd --format=xz > tmp.txz
1377 zstd -d tmp.txz
1378 [ -e tmp.tar ] || die ".txz failed to decompress to .tar!"
1379 rm -f tmp.tar tmp.txz
1383 tar -f - -c tmp | zstd --format=lz4 > tmp.tlz4
1384 zstd -d tmp.tlz4
1385 [ -e tmp.tar ] || die ".tlz4 failed to decompress to .tar!"
1386 rm -f tmp.tar tmp.tlz4
1389 touch tmp.t tmp.tz tmp.tzs
1390 ! zstd -d tmp.t
1391 ! zstd -d tmp.tz
1392 ! zstd -d tmp.tzs
1447 datagen -g2MB > tmp
1448 refSize=$(zstd tmp -6 -c --zstd=wlog=18 | wc -c)
1449 ov9Size=$(zstd tmp -6 -c --zstd=wlog=18,ovlog=9 | wc -c)
1450 ov1Size=$(zstd tmp -6 -c --zstd=wlog=18,ovlog=1 | wc -c)
1468 rm -f tmp*
1474 zstd tmp*
1488 zstd --list tmp* && die "-l must fail on non-zstd file"
1533 zstd -f --trace tmp.trace tmp1
1534 zstd -f --trace tmp.trace tmp1 tmp2 tmp3
1535 zstd -f --trace tmp.trace tmp1 tmp2 tmp3 -o /dev/null
1536 zstd -f --trace tmp.trace tmp1 tmp2 tmp3 --single-thread
1537 zstd -f --trace tmp.trace -D tmp1 tmp2 tmp3 -o /dev/null
1538 zstd -f --trace tmp.trace -D tmp1 tmp2 tmp3 -o /dev/null --single-thread
1539 zstd --trace tmp.trace -t tmp1.zst
1540 zstd --trace tmp.trace -t tmp1.zst tmp2.zst
1541 zstd -f --trace tmp.trace -d tmp1.zst
1542 zstd -f --trace tmp.trace -d tmp1.zst tmp2.zst tmp3.zst
1543 zstd -D tmp1 tmp2 -c | zstd --trace tmp.trace -t -D tmp1
1544 zstd -b1e10i0 --trace tmp.trace tmp1
1545 zstd -b1e10i0 --trace tmp.trace tmp1 tmp2 tmp3
1547 rm -f tmp*
1595 datagen > tmp
1596 zstd --adapt= tmp && die "invalid compression parameter"
1597 zstd -f -vv --adapt=min=10,max=9 tmp && die "--adapt must fail on incoherent bounds"
1603 zstd -f -vv --rsyncable --single-thread tmp && die "--rsyncable must fail with --single-thread"
1625 rm -rf tmp*
1631 rm -rf tmp*
1639 rm -rf tmp*
1646 rm -rf tmp*
1713 cp "$TESTFILE" tmp
1714 zstd -f tmp -D tmpDict
1715 zstd -f tmp -D tmpDict --patch-from=tmpDict && die "error: can't use -D and --patch-from=#at the sa…
1716 zstd -d tmp.zst -D tmpDict -fo result
1721 zstd -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"
1743 rm -f tmp* dictionary
1745 rm -f tmp*