[libvirt] [PATCH 3/3] tests: deterministichash: Make hash tables arch-independent

Bjoern Walk bwalk at linux.vnet.ibm.com
Thu Aug 3 05:24:35 UTC 2017


Peter Krempa <pkrempa at redhat.com> [2017-08-02, 05:39PM +0200]:
> It turns out that our implementation of the hashing function is
> endian-dependent and thus if used on various architectures the testsuite
> may have different results. Work this around by mocking virHashCodeGen
> to something which does not use bit operations instead of just setting a
> deterministic seed.

This does fix the issue on S390. Anyways, I'd also like to see the tests
fixed that rely on the ordering of the hash table. And code that uses
the hash table should be tested that it does NOT rely on the ordering.

Tested-by: Bjoern Walk <bwalk at linux.vnet.ibm.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 896 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170803/f213fcbe/attachment-0001.sig>


More information about the libvir-list mailing list