Lines Matching refs:test

165 static void test_uninit_kmalloc(struct kunit *test)  in test_uninit_kmalloc()  argument
170 kunit_info(test, "uninitialized kmalloc test (UMR report)\n"); in test_uninit_kmalloc()
173 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_uninit_kmalloc()
179 static void test_init_kmalloc(struct kunit *test) in test_init_kmalloc() argument
184 kunit_info(test, "initialized kmalloc test (no reports)\n"); in test_init_kmalloc()
188 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_init_kmalloc()
192 static void test_init_kzalloc(struct kunit *test) in test_init_kzalloc() argument
197 kunit_info(test, "initialized kzalloc test (no reports)\n"); in test_init_kzalloc()
200 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_init_kzalloc()
204 static void test_uninit_stack_var(struct kunit *test) in test_uninit_stack_var() argument
209 kunit_info(test, "uninitialized stack variable (UMR report)\n"); in test_uninit_stack_var()
211 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_uninit_stack_var()
215 static void test_init_stack_var(struct kunit *test) in test_init_stack_var() argument
220 kunit_info(test, "initialized stack variable (no reports)\n"); in test_init_stack_var()
222 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_init_stack_var()
246 static void test_params(struct kunit *test) in test_params() argument
259 kunit_info(test, in test_params()
262 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_params()
274 static void test_uninit_multiple_params(struct kunit *test) in test_uninit_multiple_params() argument
280 kunit_info(test, "uninitialized local passed to fn (UMR report)\n"); in test_uninit_multiple_params()
282 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_uninit_multiple_params()
298 static void test_uninit_kmsan_check_memory(struct kunit *test) in test_uninit_kmsan_check_memory() argument
304 test, in test_uninit_kmsan_check_memory()
309 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_uninit_kmsan_check_memory()
316 static void test_init_kmsan_vmap_vunmap(struct kunit *test) in test_init_kmsan_vmap_vunmap() argument
323 kunit_info(test, "pages initialized via vmap (no reports)\n"); in test_init_kmsan_vmap_vunmap()
340 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_init_kmsan_vmap_vunmap()
347 static void test_init_vmalloc(struct kunit *test) in test_init_vmalloc() argument
353 kunit_info(test, "vmalloc buffer can be initialized (no reports)\n"); in test_init_vmalloc()
361 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_init_vmalloc()
365 static void test_uaf(struct kunit *test) in test_uaf() argument
371 kunit_info(test, "use-after-free in kmalloc-ed buffer (UMR report)\n"); in test_uaf()
378 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_uaf()
385 static void test_percpu_propagate(struct kunit *test) in test_percpu_propagate() argument
390 kunit_info(test, in test_percpu_propagate()
396 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_percpu_propagate()
403 static void test_printk(struct kunit *test) in test_printk() argument
416 kunit_info(test, "uninit local passed to pr_info() (UMR report)\n"); in test_printk()
418 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_printk()
429 static void test_init_memcpy(struct kunit *test) in test_init_memcpy() argument
437 test, in test_init_memcpy()
441 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_init_memcpy()
448 static void test_memcpy_aligned_to_aligned(struct kunit *test) in test_memcpy_aligned_to_aligned() argument
455 test, in test_memcpy_aligned_to_aligned()
459 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_memcpy_aligned_to_aligned()
470 static void test_memcpy_aligned_to_unaligned(struct kunit *test) in test_memcpy_aligned_to_unaligned() argument
477 test, in test_memcpy_aligned_to_unaligned()
483 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_memcpy_aligned_to_unaligned()
486 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_memcpy_aligned_to_unaligned()
511 static void test_memcpy_initialized_gap(struct kunit *test) in test_memcpy_initialized_gap() argument
518 test, in test_memcpy_initialized_gap()
532 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_memcpy_initialized_gap()
535 KUNIT_EXPECT_FALSE(test, report_matches(&expect)); in test_memcpy_initialized_gap()
538 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_memcpy_initialized_gap()
543 static void test_memset##size(struct kunit *test) \
548 kunit_info(test, \
552 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); \
567 static void test_long_origin_chain(struct kunit *test) in test_long_origin_chain() argument
575 test, in test_long_origin_chain()
584 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_long_origin_chain()
596 static void test_stackdepot_roundtrip(struct kunit *test) in test_stackdepot_roundtrip() argument
603 kunit_info(test, "testing stackdepot roundtrip (no reports)\n"); in test_stackdepot_roundtrip()
610 KUNIT_EXPECT_TRUE(test, src_nentries == dst_nentries); in test_stackdepot_roundtrip()
614 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_stackdepot_roundtrip()
621 static void test_unpoison_memory(struct kunit *test) in test_unpoison_memory() argument
627 test, in test_unpoison_memory()
633 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_unpoison_memory()
640 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_unpoison_memory()
643 static void test_copy_from_kernel_nofault(struct kunit *test) in test_copy_from_kernel_nofault() argument
651 test, in test_copy_from_kernel_nofault()
656 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_copy_from_kernel_nofault()
689 static int test_init(struct kunit *test) in test_init() argument
702 static void test_exit(struct kunit *test) in test_exit() argument