]> git.ipfire.org Git - thirdparty/zstd.git/commit
return error code when benchmark fails
authorYann Collet <cyan@fb.com>
Tue, 7 Feb 2023 08:35:51 +0000 (00:35 -0800)
committerYann Collet <cyan@fb.com>
Tue, 7 Feb 2023 08:35:51 +0000 (00:35 -0800)
commit9cabd155fdf14b9ba8d240b42b2403e1da178a92
tree0d1ec5b6039b180a055d62633a1caa49378e3c95
parent54a173e9fc98852135e7f90b3faf2bede8dab0a0
return error code when benchmark fails

such scenario can happen, for example,
when trying a decompression-only benchmark on invalid data.
Other possibilities include an allocation error in an intermediate step.

So far, the benchmark would return immediately, but still return 0.
On command line, this would be confusing, as the program appears successful (though it does not display any successful message).

Now it returns !0, which can be interpreted as an error by command line.
programs/zstdcli.c
tests/playTests.sh