]> git.ipfire.org Git - thirdparty/strongswan.git/commit - src/libstrongswan/library.c
unit-tests: Seed chunk_hash() only once, but before creating any hashtables
authorMartin Willi <martin@revosec.ch>
Thu, 3 Apr 2014 09:46:09 +0000 (11:46 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 4 Jun 2014 13:53:11 +0000 (15:53 +0200)
commit460adb5d0925f4af807b09434b771545d1f62b47
tree12c6bec9eb811c715d079e82e50840b865ecdb96
parent5cd28cd25a009fd4d0d5b91b60e82cf7a661a169
unit-tests: Seed chunk_hash() only once, but before creating any hashtables

Due to the removal of pthread_once, we manually create the seed for
chunk_hash(). With the new testable functions interface, this won't work for
the hashtable initiated using __attribute__((constructor)). Enforce seeding
before creating that hashtable.
src/libstrongswan/library.c
src/libstrongswan/tests/test_runner.c
src/libstrongswan/utils/chunk.c
src/libstrongswan/utils/chunk.h