Lines Matching defs:kunit_resource

19 struct kunit_resource;
21 typedef int (*kunit_resource_init_t)(struct kunit_resource *, void *);
22 typedef void (*kunit_resource_free_t)(struct kunit_resource *);
25 * struct kunit_resource - represents a *test managed resource*
32 * function. The struct kunit_resource itself is freed automatically with
51 * static int kunit_kmalloc_init(struct kunit_resource *res, void *context)
62 * static void kunit_kmalloc_free(struct kunit_resource *res)
83 struct kunit_resource {
100 static inline void kunit_get_resource(struct kunit_resource *res)
111 struct kunit_resource *res = container_of(kref, struct kunit_resource,
136 static inline void kunit_put_resource(struct kunit_resource *res)
156 struct kunit_resource *res,
172 struct kunit_resource *res,
179 static inline struct kunit_resource *
194 struct kunit_resource *res,
198 struct kunit_resource *existing;
224 * cleaned up at the end of a test case. See &struct kunit_resource for an
228 * struct kunit_resource pointer, not just the 'data' pointer. It therefore
232 * Note: KUnit needs to allocate memory for a kunit_resource object. You must
236 static inline struct kunit_resource *
243 struct kunit_resource *res;
273 * cleaned up at the end of a test case. See &struct kunit_resource for an
276 * Note: KUnit needs to allocate memory for a kunit_resource object. You must
286 struct kunit_resource *res;
300 struct kunit_resource *res,
310 struct kunit_resource *res,
322 static inline struct kunit_resource *
327 struct kunit_resource *res, *found = NULL;
350 static inline struct kunit_resource *
359 * kunit_destroy_resource() - Find a kunit_resource and destroy it.
365 * 0 if kunit_resource is found and freed, -ENOENT if not found.
388 void kunit_remove_resource(struct kunit *test, struct kunit_resource *res);