Lines Matching refs:test_cache
178 static struct kmem_cache *test_cache; variable
194 test_cache = kmem_cache_create("test", size, 1, flags, ctor); in setup_test_cache()
195 KUNIT_ASSERT_TRUE_MSG(test, test_cache, "could not create cache"); in setup_test_cache()
202 if (!test_cache) in test_cache_destroy()
205 kmem_cache_destroy(test_cache); in test_cache_destroy()
206 test_cache = NULL; in test_cache_destroy()
217 if (test_cache) in test_free()
218 kmem_cache_free(test_cache, ptr); in test_free()
260 policy_name, !!test_cache); in test_alloc()
274 if (test_cache) in test_alloc()
275 alloc = kmem_cache_alloc(test_cache, gfp); in test_alloc()
281 struct kmem_cache *s = test_cache ?: in test_alloc()
328 if (!test_cache) in test_out_of_bounds_read()
511 KUNIT_EXPECT_TRUE(test, test_cache); in test_shrink_memcache()
513 kmem_cache_shrink(test_cache); in test_shrink_memcache()
541 kmem_cache_free_bulk(test_cache, ARRAY_SIZE(objects), objects); in test_free_bulk()
662 KUNIT_EXPECT_TRUE(test, test_cache); /* Want memcache. */ in test_memcache_typesafe_by_rcu()
700 KUNIT_EXPECT_FALSE(test, test_cache); in test_krealloc()
735 KUNIT_EXPECT_TRUE(test, test_cache); /* Want memcache. */ in test_memcache_alloc_bulk()
743 int i, num = kmem_cache_alloc_bulk(test_cache, GFP_ATOMIC, ARRAY_SIZE(objects), in test_memcache_alloc_bulk()
753 kmem_cache_free_bulk(test_cache, num, objects); in test_memcache_alloc_bulk()