Lines Matching refs:test_cache
183 static struct kmem_cache *test_cache; variable
198 test_cache = kmem_cache_create("test", size, 1, flags, ctor); in setup_test_cache()
199 KUNIT_ASSERT_TRUE_MSG(test, test_cache, "could not create cache"); in setup_test_cache()
206 if (!test_cache) in test_cache_destroy()
209 kmem_cache_destroy(test_cache); in test_cache_destroy()
210 test_cache = NULL; in test_cache_destroy()
223 if (test_cache) in test_free()
224 kmem_cache_free(test_cache, ptr); in test_free()
266 policy_name, !!test_cache); in test_alloc()
280 if (test_cache) in test_alloc()
281 alloc = kmem_cache_alloc(test_cache, gfp); in test_alloc()
288 struct kmem_cache *s = test_cache ?: in test_alloc()
334 if (!test_cache) in test_out_of_bounds_read()
517 KUNIT_EXPECT_TRUE(test, test_cache); in test_shrink_memcache()
519 kmem_cache_shrink(test_cache); in test_shrink_memcache()
547 kmem_cache_free_bulk(test_cache, ARRAY_SIZE(objects), objects); in test_free_bulk()
666 KUNIT_EXPECT_TRUE(test, test_cache); /* Want memcache. */ in test_memcache_typesafe_by_rcu()
704 KUNIT_EXPECT_FALSE(test, test_cache); in test_krealloc()
739 KUNIT_EXPECT_TRUE(test, test_cache); /* Want memcache. */ in test_memcache_alloc_bulk()
747 int i, num = kmem_cache_alloc_bulk(test_cache, GFP_ATOMIC, ARRAY_SIZE(objects), in test_memcache_alloc_bulk()
757 kmem_cache_free_bulk(test_cache, num, objects); in test_memcache_alloc_bulk()