]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Extract mock library for making hash table deterministic
authorPeter Krempa <pkrempa@redhat.com>
Wed, 26 Jul 2017 08:02:21 +0000 (10:02 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 27 Jul 2017 07:54:20 +0000 (09:54 +0200)
commit498336836772cc222f956116e9c535c273f87422
tree51631dfb43c5503f500a139cc6f4c4e1ede8ceda
parent0175dc6ea024d4edd0f59571c3f5fa80d1ec1c0e
tests: Extract mock library for making hash table deterministic

virHashNew calls virRandomBits to initialize seed for the hashing
function. If a test uses iteration through the hash table to produce
results they may/will be non-deterministic. Extract the mock library
which was used for mac address mapping to be universal.

Reviewed-by: Eric Blake <eblake@redhat.com>
tests/Makefile.am
tests/virdeterministichashmock.c [moved from tests/virmacmapmock.c with 100% similarity]
tests/virmacmaptest.c