MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_hash

Function test_hash

dpdk/app/test/test_hash.c:2189–2265  ·  view source on GitHub ↗

* Do all unit and performance tests. */

Source from the content-addressed store, hash-verified

2187 * Do all unit and performance tests.
2188 */
2189static int
2190test_hash(void)
2191{
2192 RTE_BUILD_BUG_ON(sizeof(struct flow_key) % sizeof(uint32_t) != 0);
2193
2194 if (test_add_delete() < 0)
2195 return -1;
2196 if (test_hash_add_delete_jhash2() < 0)
2197 return -1;
2198 if (test_hash_add_delete_2_jhash2() < 0)
2199 return -1;
2200 if (test_hash_add_delete_jhash_1word() < 0)
2201 return -1;
2202 if (test_hash_add_delete_jhash_2word() < 0)
2203 return -1;
2204 if (test_hash_add_delete_jhash_3word() < 0)
2205 return -1;
2206 if (test_hash_get_key_with_position() < 0)
2207 return -1;
2208 if (test_hash_find_existing() < 0)
2209 return -1;
2210 if (test_add_update_delete() < 0)
2211 return -1;
2212 if (test_add_update_delete_free() < 0)
2213 return -1;
2214 if (test_add_delete_free_lf() < 0)
2215 return -1;
2216 if (test_five_keys() < 0)
2217 return -1;
2218 if (test_full_bucket() < 0)
2219 return -1;
2220 if (test_extendable_bucket() < 0)
2221 return -1;
2222
2223 if (test_fbk_hash_find_existing() < 0)
2224 return -1;
2225 if (fbk_hash_unit_test() < 0)
2226 return -1;
2227 if (test_hash_creation_with_bad_parameters() < 0)
2228 return -1;
2229 if (test_hash_creation_with_good_parameters() < 0)
2230 return -1;
2231
2232 /* ext table disabled */
2233 if (test_average_table_utilization(0) < 0)
2234 return -1;
2235 if (test_hash_iteration(0) < 0)
2236 return -1;
2237
2238 /* ext table enabled */
2239 if (test_average_table_utilization(1) < 0)
2240 return -1;
2241 if (test_hash_iteration(1) < 0)
2242 return -1;
2243
2244 run_hash_func_tests();
2245
2246 if (test_crc32_hash_alg_equiv() < 0)

Callers

nothing calls this directly

Tested by

no test coverage detected