...using n_buckets = 32, which will cause a step size of 1.
This test fails, and will be fixed by the next commit.
Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/257
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
DEFINE_TEST(test_hash_iter_after_del,
.description = "test hash_iter, after deleting element");
+static int test_hash_del(const struct test *t)
+{
+ struct hash *h = hash_new(32, NULL);
+ const char *k1 = "k1";
+ const char *v1 = "v1";
+
+ hash_add(h, k1, v1);
+ hash_del(h, k1);
+
+ hash_free(h);
+
+ return 0;
+}
+DEFINE_TEST(test_hash_del, .description = "test add / delete a single element",
+ .expected_fail = true);
+
static int test_hash_free(const struct test *t)
{
struct hash *h = hash_new(8, countfreecalls);