Lines Matching full:entries
90 /* Both entries should have been visited exactly once. */ in hashtable_test_hash_add()
125 struct hashtable_test_entry entries[3]; in hashtable_test_hash_for_each() local
130 /* Add three entries to the hashtable. */ in hashtable_test_hash_for_each()
132 entries[i].key = i; in hashtable_test_hash_for_each()
133 entries[i].data = i + 10; in hashtable_test_hash_for_each()
134 entries[i].visited = 0; in hashtable_test_hash_for_each()
135 hash_add(hash, &entries[i].node, entries[i].key); in hashtable_test_hash_for_each()
149 KUNIT_EXPECT_EQ(test, entries[j].visited, 1); in hashtable_test_hash_for_each()
154 struct hashtable_test_entry entries[3]; in hashtable_test_hash_for_each_safe() local
160 /* Add three entries to the hashtable. */ in hashtable_test_hash_for_each_safe()
162 entries[i].key = i; in hashtable_test_hash_for_each_safe()
163 entries[i].data = i + 10; in hashtable_test_hash_for_each_safe()
164 entries[i].visited = 0; in hashtable_test_hash_for_each_safe()
165 hash_add(hash, &entries[i].node, entries[i].key); in hashtable_test_hash_for_each_safe()
182 KUNIT_EXPECT_EQ(test, entries[j].visited, 1); in hashtable_test_hash_for_each_safe()
187 struct hashtable_test_entry entries[4]; in hashtable_test_hash_for_each_possible() local
193 /* Add three entries with key = 0 to the hashtable. */ in hashtable_test_hash_for_each_possible()
195 entries[i].key = 0; in hashtable_test_hash_for_each_possible()
196 entries[i].data = i; in hashtable_test_hash_for_each_possible()
197 entries[i].visited = 0; in hashtable_test_hash_for_each_possible()
198 hash_add(hash, &entries[i].node, entries[i].key); in hashtable_test_hash_for_each_possible()
202 entries[3].key = 1; in hashtable_test_hash_for_each_possible()
203 entries[3].data = 3; in hashtable_test_hash_for_each_possible()
204 entries[3].visited = 0; in hashtable_test_hash_for_each_possible()
205 hash_add(hash, &entries[3].node, entries[3].key); in hashtable_test_hash_for_each_possible()
217 KUNIT_EXPECT_EQ(test, entries[j].visited, 1); in hashtable_test_hash_for_each_possible()
226 /* If entry with key = 1 is in the same bucket as the entries with in hashtable_test_hash_for_each_possible()
228 * entries were visited. in hashtable_test_hash_for_each_possible()
232 KUNIT_EXPECT_EQ(test, entries[3].visited, 1); in hashtable_test_hash_for_each_possible()
235 KUNIT_EXPECT_EQ(test, entries[3].visited, 0); in hashtable_test_hash_for_each_possible()
241 struct hashtable_test_entry entries[4]; in hashtable_test_hash_for_each_possible_safe() local
248 /* Add three entries with key = 0 to the hashtable. */ in hashtable_test_hash_for_each_possible_safe()
250 entries[i].key = 0; in hashtable_test_hash_for_each_possible_safe()
251 entries[i].data = i; in hashtable_test_hash_for_each_possible_safe()
252 entries[i].visited = 0; in hashtable_test_hash_for_each_possible_safe()
253 hash_add(hash, &entries[i].node, entries[i].key); in hashtable_test_hash_for_each_possible_safe()
257 entries[3].key = 1; in hashtable_test_hash_for_each_possible_safe()
258 entries[3].data = 3; in hashtable_test_hash_for_each_possible_safe()
259 entries[3].visited = 0; in hashtable_test_hash_for_each_possible_safe()
260 hash_add(hash, &entries[3].node, entries[3].key); in hashtable_test_hash_for_each_possible_safe()
275 KUNIT_EXPECT_EQ(test, entries[j].visited, 1); in hashtable_test_hash_for_each_possible_safe()
284 /* If entry with key = 1 is in the same bucket as the entries with in hashtable_test_hash_for_each_possible_safe()
286 * entries were visited. in hashtable_test_hash_for_each_possible_safe()
290 KUNIT_EXPECT_EQ(test, entries[3].visited, 1); in hashtable_test_hash_for_each_possible_safe()
293 KUNIT_EXPECT_EQ(test, entries[3].visited, 0); in hashtable_test_hash_for_each_possible_safe()