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.
This commit is contained in:
@@ -343,7 +343,8 @@ bool chunk_printable(chunk_t chunk, chunk_t *sane, char replace);
|
||||
* Seed initial key for chunk_hash().
|
||||
*
|
||||
* This call should get invoked once during startup. This is usually done
|
||||
* by calling library_init().
|
||||
* by calling library_init(). Calling it multiple times is safe, it gets
|
||||
* executed just once.
|
||||
*/
|
||||
void chunk_hash_seed();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user