]> git.ipfire.org Git - thirdparty/zstd.git/commit
[zstreamtest] Add compression determinism tests
authorNick Terrell <terrelln@fb.com>
Thu, 1 Oct 2020 22:02:15 +0000 (15:02 -0700)
committerNick Terrell <terrelln@fb.com>
Mon, 12 Oct 2020 19:55:17 +0000 (12:55 -0700)
commit9ab9229e1175c8f17de6505c43992b474ee1a924
tree9df894b5c0fd042abe513a89e3f0c0c8bf8917de
parentc51a9e79b9b810587146795c1123aaa62bd1174d
[zstreamtest] Add compression determinism tests

* Run compression twice and check the compressed data is byte-identical.
  The compression loop had to be rewritten to ensure deteriminism. It is
  guaranteed by always making maximal forward progress.
* When nbWorkers > 0, change the number of workers 1/8 of the time.
* Run in single-pass mode 1/4 of the time.

I've run a few hundred thousand iterations of zstreamtest and have seen
no deteriminism issues so far. Before the zstdmt fix that skips the
single-pass shortcut non-determinism showed up in a few hundred
iterations.
tests/zstreamtest.c