1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-08-25 13:50:12 +03:00

test: hashmap - increase number of entries for crippled hash test

The purpose of testing with the crippled hash function is to cover
the otherwise very unlikely codepath in bucket_calculate_dib() where
it has to fall back to recomputing the hash value.

This unlikely path was not covered by test-hashmap anymore after
57217c8f "test: hashmap - cripple the hash function by truncating the
input rather than the output".

Restore the test coverage by increasing the number of entries in the test.
The number was determined empirically by checking with lcov.
This commit is contained in:
Michal Schmidt
2015-10-06 14:56:33 +02:00
parent 20d2f7851a
commit 11de3decc9

View File

@ -710,7 +710,7 @@ static void test_hashmap_many(void) {
unsigned n_entries;
} tests[] = {
{ .ops = NULL, .n_entries = 1 << 20 },
{ .ops = &crippled_hashmap_ops, .n_entries = 1 << 11 },
{ .ops = &crippled_hashmap_ops, .n_entries = 1 << 14 },
};