Lines Matching refs:test_cache
183 static struct kmem_cache *test_cache; variable
199 test_cache = kmem_cache_create("test", size, 1, flags, ctor); in setup_test_cache()
200 KUNIT_ASSERT_TRUE_MSG(test, test_cache, "could not create cache"); in setup_test_cache()
207 if (!test_cache) in test_cache_destroy()
210 kmem_cache_destroy(test_cache); in test_cache_destroy()
211 test_cache = NULL; in test_cache_destroy()
222 if (test_cache) in test_free()
223 kmem_cache_free(test_cache, ptr); in test_free()
265 policy_name, !!test_cache); in test_alloc()
279 if (test_cache) in test_alloc()
280 alloc = kmem_cache_alloc(test_cache, gfp); in test_alloc()
286 struct kmem_cache *s = test_cache ?: in test_alloc()
332 if (!test_cache) in test_out_of_bounds_read()
515 KUNIT_EXPECT_TRUE(test, test_cache); in test_shrink_memcache()
517 kmem_cache_shrink(test_cache); in test_shrink_memcache()
545 kmem_cache_free_bulk(test_cache, ARRAY_SIZE(objects), objects); in test_free_bulk()
664 KUNIT_EXPECT_TRUE(test, test_cache); /* Want memcache. */ in test_memcache_typesafe_by_rcu()
702 KUNIT_EXPECT_FALSE(test, test_cache); in test_krealloc()
737 KUNIT_EXPECT_TRUE(test, test_cache); /* Want memcache. */ in test_memcache_alloc_bulk()
745 int i, num = kmem_cache_alloc_bulk(test_cache, GFP_ATOMIC, ARRAY_SIZE(objects), in test_memcache_alloc_bulk()
755 kmem_cache_free_bulk(test_cache, num, objects); in test_memcache_alloc_bulk()