• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..22-Jun-202120

.gitignoreH A D22-Jun-2021632

checkTag.cH A D22-Jun-20212 KiB

datagencli.cH A D22-Jun-20214.4 KiB

decodecorpus.cH A D22-Jun-202167.3 KiB

files/H22-Jun-20213

fullbench.cH A D22-Jun-202122.4 KiB

fuzz/H22-Jun-202117

fuzzer.cH A D22-Jun-202184.6 KiB

gzip/H22-Jun-202125

invalidDictionaries.cH A D22-Jun-20212.1 KiB

legacy.cH A D22-Jun-20219.3 KiB

longmatch.cH A D22-Jun-20213 KiB

MakefileH A D22-Jun-202115.5 KiB

namespaceTest.cH A D22-Jun-2021714

paramgrill.cH A D22-Jun-202138.1 KiB

playTests.shH A D22-Jun-202123.9 KiB

poolTests.cH A D22-Jun-20212.7 KiB

README.mdH A D22-Jun-20214.3 KiB

roundTripCrash.cH A D22-Jun-20217.7 KiB

seqgen.cH A D22-Jun-20217.8 KiB

seqgen.hH A D22-Jun-20211.6 KiB

symbols.cH A D22-Jun-20214 KiB

test-zstd-speed.pyH A D22-Jun-202117.7 KiB

test-zstd-versions.pyH A D22-Jun-202110.5 KiB

zbufftest.cH A D22-Jun-202124 KiB

zstreamtest.cH A D22-Jun-202195.4 KiB

README.md

1Programs and scripts for automated testing of Zstandard
2=======================================================
3
4This directory contains the following programs and scripts:
5- `datagen` : Synthetic and parametrable data generator, for tests
6- `fullbench`  : Precisely measure speed for each zstd inner functions
7- `fuzzer`  : Test tool, to check zstd integrity on target platform
8- `paramgrill` : parameter tester for zstd
9- `test-zstd-speed.py` : script for testing zstd speed difference between commits
10- `test-zstd-versions.py` : compatibility test between zstd versions stored on Github (v0.1+)
11- `zbufftest`  : Test tool to check ZBUFF (a buffered streaming API) integrity
12- `zstreamtest` : Fuzzer test tool for zstd streaming API
13- `legacy` : Test tool to test decoding of legacy zstd frames
14- `decodecorpus` : Tool to generate valid Zstandard frames, for verifying decoder implementations
15
16
17#### `test-zstd-versions.py` - script for testing zstd interoperability between versions
18
19This script creates `versionsTest` directory to which zstd repository is cloned.
20Then all tagged (released) versions of zstd are compiled.
21In the following step interoperability between zstd versions is checked.
22
23
24#### `test-zstd-speed.py` - script for testing zstd speed difference between commits
25
26This script creates `speedTest` directory to which zstd repository is cloned.
27Then it compiles all branches of zstd and performs a speed benchmark for a given list of files (the `testFileNames` parameter).
28After `sleepTime` (an optional parameter, default 300 seconds) seconds the script checks repository for new commits.
29If a new commit is found it is compiled and a speed benchmark for this commit is performed.
30The results of the speed benchmark are compared to the previous results.
31If compression or decompression speed for one of zstd levels is lower than `lowerLimit` (an optional parameter, default 0.98) the speed benchmark is restarted.
32If second results are also lower than `lowerLimit` the warning e-mail is send to recipients from the list (the `emails` parameter).
33
34Additional remarks:
35- To be sure that speed results are accurate the script should be run on a "stable" target system with no other jobs running in parallel
36- Using the script with virtual machines can lead to large variations of speed results
37- The speed benchmark is not performed until computers' load average is lower than `maxLoadAvg` (an optional parameter, default 0.75)
38- The script sends e-mails using `mutt`; if `mutt` is not available it sends e-mails without attachments using `mail`; if both are not available it only prints a warning
39
40
41The example usage with two test files, one e-mail address, and with an additional message:
42```
43./test-zstd-speed.py "silesia.tar calgary.tar" "email@gmail.com" --message "tested on my laptop" --sleepTime 60
44``` 
45
46To run the script in background please use:
47```
48nohup ./test-zstd-speed.py testFileNames emails &
49```
50
51The full list of parameters:
52```
53positional arguments:
54  testFileNames         file names list for speed benchmark
55  emails                list of e-mail addresses to send warnings
56
57optional arguments:
58  -h, --help            show this help message and exit
59  --message MESSAGE     attach an additional message to e-mail
60  --lowerLimit LOWERLIMIT
61                        send email if speed is lower than given limit
62  --maxLoadAvg MAXLOADAVG
63                        maximum load average to start testing
64  --lastCLevel LASTCLEVEL
65                        last compression level for testing
66  --sleepTime SLEEPTIME
67                        frequency of repository checking in seconds
68```
69
70#### `decodecorpus` - tool to generate Zstandard frames for decoder testing
71Command line tool to generate test .zst files.
72
73This tool will generate .zst files with checksums,
74as well as optionally output the corresponding correct uncompressed data for
75extra verfication.
76
77Example:
78```
79./decodecorpus -ptestfiles -otestfiles -n10000 -s5
80```
81will generate 10,000 sample .zst files using a seed of 5 in the `testfiles` directory,
82with the zstd checksum field set,
83as well as the 10,000 original files for more detailed comparison of decompression results.
84
85```
86./decodecorpus -t -T1mn
87```
88will choose a random seed, and for 1 minute,
89generate random test frames and ensure that the
90zstd library correctly decompresses them in both simple and streaming modes.
91