]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REGTEST: add sample_fetches/hashes.vtc to validate hashes
authorWilly Tarreau <w@1wt.eu>
Wed, 15 Jan 2020 10:31:01 +0000 (11:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 16 Jan 2020 07:45:27 +0000 (08:45 +0100)
commitec9ac54982841d49859747f6a535bf7444284bc3
tree5244a3110c5c71e2d51db2a5db8d52fdbee813fa
parent340b07e8686ed0095291e937628d064bdcc7a3dd
REGTEST: add sample_fetches/hashes.vtc to validate hashes

This regtest validates all hashes that we support, on all input bytes from
0x00 to 0xFF. Those supporting avalanche are tested as well. It also tests
len(), hex() and base64(). It purposely does not enable sha2() because this
one relies on OpenSSL and there's no point in validating that OpenSSL knows
how to hash, what matters is that we can test our hashing functions in all
cases. However since the tests were written, they're still present and
commented out in case that helps.

It may be backported to supported versions, possibly dropping a few algos
that were not supported (e.g. crc32c requires 1.9 minimum).

Note that this test will fail on crc32/djb2/sdbm/wt6 unless patches
"BUG/MINOR: stream: init variables when the list is empty" and
"BUG/MAJOR: hashes: fix the signedness of the hash inputs" are included.
reg-tests/sample_fetches/hashes.vtc [new file with mode: 0644]