Home
last modified time | relevance | path

Searched refs:test (Results 1 – 25 of 63) sorted by relevance

123

/lib/kunit/
Dkunit-test.c25 struct kunit *test = data; in kunit_test_successful_try() local
26 struct kunit_try_catch_test_context *ctx = test->priv; in kunit_test_successful_try()
33 struct kunit *test = data; in kunit_test_no_catch() local
35 KUNIT_FAIL(test, "Catch should not be called\n"); in kunit_test_no_catch()
38 static void kunit_test_try_catch_successful_try_no_catch(struct kunit *test) in kunit_test_try_catch_successful_try_no_catch() argument
40 struct kunit_try_catch_test_context *ctx = test->priv; in kunit_test_try_catch_successful_try_no_catch()
44 test, in kunit_test_try_catch_successful_try_no_catch()
47 kunit_try_catch_run(try_catch, test); in kunit_test_try_catch_successful_try_no_catch()
49 KUNIT_EXPECT_TRUE(test, ctx->function_called); in kunit_test_try_catch_successful_try_no_catch()
54 struct kunit *test = data; in kunit_test_unsuccessful_try() local
[all …]
Dkunit-example-test.c22 static void example_simple_test(struct kunit *test) in example_simple_test() argument
30 KUNIT_EXPECT_EQ(test, 1 + 1, 2); in example_simple_test()
37 static int example_test_init(struct kunit *test) in example_test_init() argument
39 kunit_info(test, "initializing\n"); in example_test_init()
48 static void example_test_exit(struct kunit *test) in example_test_exit() argument
50 kunit_info(test, "cleaning up\n"); in example_test_exit()
78 static void example_skip_test(struct kunit *test) in example_skip_test() argument
81 kunit_info(test, "You should not see a line below."); in example_skip_test()
84 kunit_skip(test, "this test should be skipped"); in example_skip_test()
87 KUNIT_FAIL(test, "You should not see this line."); in example_skip_test()
[all …]
Dassert_test.c11 #define ASSERT_TEST_EXPECT_CONTAIN(test, str, substr) KUNIT_EXPECT_TRUE(test, strstr(str, substr)) argument
12 #define ASSERT_TEST_EXPECT_NCONTAIN(test, str, substr) KUNIT_EXPECT_FALSE(test, strstr(str, substr)) argument
14 static void kunit_test_is_literal(struct kunit *test) in kunit_test_is_literal() argument
16 KUNIT_EXPECT_TRUE(test, is_literal("5", 5)); in kunit_test_is_literal()
17 KUNIT_EXPECT_TRUE(test, is_literal("0", 0)); in kunit_test_is_literal()
18 KUNIT_EXPECT_TRUE(test, is_literal("1234567890", 1234567890)); in kunit_test_is_literal()
19 KUNIT_EXPECT_TRUE(test, is_literal("-1234567890", -1234567890)); in kunit_test_is_literal()
20 KUNIT_EXPECT_FALSE(test, is_literal("05", 5)); in kunit_test_is_literal()
21 KUNIT_EXPECT_FALSE(test, is_literal("", 0)); in kunit_test_is_literal()
22 KUNIT_EXPECT_FALSE(test, is_literal("-0", 0)); in kunit_test_is_literal()
[all …]
Dstring-stream-test.c30 static char *get_concatenated_string(struct kunit *test, struct string_stream *stream) in get_concatenated_string() argument
34 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, str); in get_concatenated_string()
35 kunit_add_action(test, kfree_wrapper, (void *)str); in get_concatenated_string()
41 static void string_stream_managed_init_test(struct kunit *test) in string_stream_managed_init_test() argument
46 stream = kunit_alloc_string_stream(test, GFP_KERNEL); in string_stream_managed_init_test()
47 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, stream); in string_stream_managed_init_test()
49 KUNIT_EXPECT_EQ(test, stream->length, 0); in string_stream_managed_init_test()
50 KUNIT_EXPECT_TRUE(test, list_empty(&stream->fragments)); in string_stream_managed_init_test()
51 KUNIT_EXPECT_TRUE(test, (stream->gfp == GFP_KERNEL)); in string_stream_managed_init_test()
52 KUNIT_EXPECT_FALSE(test, stream->append_newlines); in string_stream_managed_init_test()
[all …]
Dplatform-test.c14 static void kunit_platform_device_alloc_test(struct kunit *test) in kunit_platform_device_alloc_test() argument
16 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, in kunit_platform_device_alloc_test()
17 kunit_platform_device_alloc(test, "kunit-platform", 1)); in kunit_platform_device_alloc_test()
24 static void kunit_platform_device_add_test(struct kunit *test) in kunit_platform_device_add_test() argument
30 pdev = kunit_platform_device_alloc(test, name, id); in kunit_platform_device_add_test()
31 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, pdev); in kunit_platform_device_add_test()
33 KUNIT_EXPECT_EQ(test, 0, kunit_platform_device_add(test, pdev)); in kunit_platform_device_add_test()
34 KUNIT_EXPECT_TRUE(test, dev_is_platform(&pdev->dev)); in kunit_platform_device_add_test()
35 KUNIT_EXPECT_STREQ(test, pdev->name, name); in kunit_platform_device_add_test()
36 KUNIT_EXPECT_EQ(test, pdev->id, id); in kunit_platform_device_add_test()
[all …]
Dexecutor_test.c12 static void free_suite_set_at_end(struct kunit *test, const void *to_free);
13 static struct kunit_suite *alloc_fake_suite(struct kunit *test,
17 static void dummy_test(struct kunit *test) {} in dummy_test() argument
26 static void parse_filter_test(struct kunit *test) in parse_filter_test() argument
31 KUNIT_EXPECT_STREQ(test, filter.suite_glob, "suite"); in parse_filter_test()
32 KUNIT_EXPECT_FALSE(test, filter.test_glob); in parse_filter_test()
37 KUNIT_EXPECT_STREQ(test, filter.suite_glob, "suite"); in parse_filter_test()
38 KUNIT_EXPECT_STREQ(test, filter.test_glob, "test"); in parse_filter_test()
43 static void filter_suites_test(struct kunit *test) in filter_suites_test() argument
52 subsuite[0] = alloc_fake_suite(test, "suite1", dummy_test_cases); in filter_suites_test()
[all …]
Dtest.c101 static void kunit_print_test_stats(struct kunit *test, in kunit_print_test_stats() argument
107 kunit_log(KERN_INFO, test, in kunit_print_test_stats()
110 test->name, in kunit_print_test_stats()
168 static void kunit_print_ok_not_ok(struct kunit *test, in kunit_print_ok_not_ok() argument
182 WARN(!test && test_level, "suite test level can't be %u!\n", test_level); in kunit_print_ok_not_ok()
191 if (!test) in kunit_print_ok_not_ok()
197 kunit_log(KERN_INFO, test, in kunit_print_ok_not_ok()
251 static void kunit_print_string_stream(struct kunit *test, in kunit_print_string_stream() argument
262 kunit_err(test, in kunit_print_string_stream()
265 kunit_err(test, "%s", fragment->fragment); in kunit_print_string_stream()
[all …]
Dresource.c19 int __kunit_add_resource(struct kunit *test, in __kunit_add_resource() argument
39 spin_lock_irqsave(&test->lock, flags); in __kunit_add_resource()
40 list_add_tail(&res->node, &test->resources); in __kunit_add_resource()
42 spin_unlock_irqrestore(&test->lock, flags); in __kunit_add_resource()
48 void kunit_remove_resource(struct kunit *test, struct kunit_resource *res) in kunit_remove_resource() argument
53 spin_lock_irqsave(&test->lock, flags); in kunit_remove_resource()
56 spin_unlock_irqrestore(&test->lock, flags); in kunit_remove_resource()
63 int kunit_destroy_resource(struct kunit *test, kunit_resource_match_t match, in kunit_destroy_resource() argument
66 struct kunit_resource *res = kunit_find_resource(test, match, in kunit_destroy_resource()
72 kunit_remove_resource(test, res); in kunit_destroy_resource()
[all …]
/lib/
Dstring_kunit.c16 #define STRCMP_TEST_EXPECT_EQUAL(test, fn, ...) KUNIT_EXPECT_EQ(test, fn(__VA_ARGS__), 0) argument
17 #define STRCMP_TEST_EXPECT_LOWER(test, fn, ...) KUNIT_EXPECT_LT(test, fn(__VA_ARGS__), 0) argument
18 #define STRCMP_TEST_EXPECT_GREATER(test, fn, ...) KUNIT_EXPECT_GT(test, fn(__VA_ARGS__), 0) argument
20 static void string_test_memset16(struct kunit *test) in string_test_memset16() argument
25 p = kunit_kzalloc(test, 256 * 2 * 2, GFP_KERNEL); in string_test_memset16()
26 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, p); in string_test_memset16()
35 KUNIT_ASSERT_EQ_MSG(test, v, 0xa1a1, in string_test_memset16()
38 KUNIT_ASSERT_EQ_MSG(test, v, 0xb1b2, in string_test_memset16()
41 KUNIT_ASSERT_EQ_MSG(test, v, 0xa1a1, in string_test_memset16()
49 static void string_test_memset32(struct kunit *test) in string_test_memset32() argument
[all …]
Dfortify_kunit.c84 static void fortify_test_known_sizes(struct kunit *test) in fortify_test_known_sizes() argument
86 KUNIT_EXPECT_EQ(test, __compiletime_strlen("88888888"), 8); in fortify_test_known_sizes()
87 KUNIT_EXPECT_EQ(test, __compiletime_strlen(array_of_10), 10); in fortify_test_known_sizes()
88 KUNIT_EXPECT_EQ(test, __compiletime_strlen(ptr_of_11), 11); in fortify_test_known_sizes()
90 KUNIT_EXPECT_EQ(test, __compiletime_strlen(array_unknown), SIZE_MAX); in fortify_test_known_sizes()
92 KUNIT_EXPECT_EQ(test, __compiletime_strlen(test->name), SIZE_MAX); in fortify_test_known_sizes()
117 static void fortify_test_control_flow_split(struct kunit *test) in fortify_test_control_flow_split() argument
119 KUNIT_EXPECT_EQ(test, want_minus_one(pick), SIZE_MAX); in fortify_test_control_flow_split()
122 #define KUNIT_EXPECT_BOS(test, p, expected, name) \ argument
123 KUNIT_EXPECT_EQ_MSG(test, __builtin_object_size(p, 1), \
[all …]
Dtest_bits.c10 static void genmask_test(struct kunit *test) in genmask_test() argument
12 KUNIT_EXPECT_EQ(test, 1ul, GENMASK(0, 0)); in genmask_test()
13 KUNIT_EXPECT_EQ(test, 3ul, GENMASK(1, 0)); in genmask_test()
14 KUNIT_EXPECT_EQ(test, 6ul, GENMASK(2, 1)); in genmask_test()
15 KUNIT_EXPECT_EQ(test, 0xFFFFFFFFul, GENMASK(31, 0)); in genmask_test()
27 static void genmask_ull_test(struct kunit *test) in genmask_ull_test() argument
29 KUNIT_EXPECT_EQ(test, 1ull, GENMASK_ULL(0, 0)); in genmask_ull_test()
30 KUNIT_EXPECT_EQ(test, 3ull, GENMASK_ULL(1, 0)); in genmask_ull_test()
31 KUNIT_EXPECT_EQ(test, 0x000000ffffe00000ull, GENMASK_ULL(39, 21)); in genmask_ull_test()
32 KUNIT_EXPECT_EQ(test, 0xffffffffffffffffull, GENMASK_ULL(63, 0)); in genmask_ull_test()
[all …]
Dlist-test.c18 static void list_test_list_init(struct kunit *test) in list_test_list_init() argument
37 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list1)); in list_test_list_init()
38 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list2)); in list_test_list_init()
39 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list3)); in list_test_list_init()
40 KUNIT_EXPECT_TRUE(test, list_empty_careful(list4)); in list_test_list_init()
41 KUNIT_EXPECT_TRUE(test, list_empty_careful(list5)); in list_test_list_init()
47 static void list_test_list_add(struct kunit *test) in list_test_list_add() argument
56 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_add()
57 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_add()
58 KUNIT_EXPECT_PTR_EQ(test, b.next, &a); in list_test_list_add()
[all …]
Dcpumask_kunit.c16 #define EXPECT_FOR_EACH_CPU_EQ(test, mask) \ argument
23 KUNIT_EXPECT_EQ_MSG((test), mask_weight, iter, MASK_MSG(mask)); \
26 #define EXPECT_FOR_EACH_CPU_OP_EQ(test, op, mask1, mask2) \ argument
36 KUNIT_EXPECT_EQ((test), weight, iter); \
39 #define EXPECT_FOR_EACH_CPU_WRAP_EQ(test, mask) \ argument
46 KUNIT_EXPECT_EQ_MSG((test), mask_weight, iter, MASK_MSG(mask)); \
49 #define EXPECT_FOR_EACH_CPU_BUILTIN_EQ(test, name) \ argument
55 KUNIT_EXPECT_EQ_MSG((test), mask_weight, iter, MASK_MSG(cpu_##name##_mask)); \
62 static void test_cpumask_weight(struct kunit *test) in test_cpumask_weight() argument
64 KUNIT_EXPECT_TRUE_MSG(test, cpumask_empty(&mask_empty), MASK_MSG(&mask_empty)); in test_cpumask_weight()
[all …]
Dtest_printf.c146 #define test(expect, fmt, ...) \ macro
155 test("", &nul); in test_basic()
156 test("100%", "100%%"); in test_basic()
157 test("xxx%yyy", "xxx%cyyy", '%'); in test_basic()
164 test("0x1234abcd ", "%#-12x", 0x1234abcd); in test_number()
165 test(" 0x1234abcd", "%#12x", 0x1234abcd); in test_number()
166test("0|001| 12|+123| 1234|-123|-1234", "%d|%03d|%3d|%+d|% d|%+d|% d", 0, 1, 12, 123, 1234, -123, … in test_number()
168 test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1); in test_number()
169 test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1); in test_number()
170 test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627); in test_number()
[all …]
Dcrc32test.c558 } const test[] __initconst = variable
678 bytes += test[i].length; in crc32c_test()
680 crc ^= __crc32c_le(test[i].crc, test_buf + in crc32c_test()
681 test[i].start, test[i].length); in crc32c_test()
689 if (test[i].crc32c_le != __crc32c_le(test[i].crc, test_buf + in crc32c_test()
690 test[i].start, test[i].length)) in crc32c_test()
717 crc_full = __crc32c_le(test[i].crc, test_buf + test[i].start, in crc32c_combine_test()
718 test[i].length); in crc32c_combine_test()
719 for (j = 0; j <= test[i].length; ++j) { in crc32c_combine_test()
721 u32 len1 = j, len2 = test[i].length - j; in crc32c_combine_test()
[all …]
Dkunit_iov_iter.c48 static void *__init iov_kunit_create_buffer(struct kunit *test, in iov_kunit_create_buffer() argument
56 pages = kunit_kcalloc(test, npages, sizeof(struct page *), GFP_KERNEL); in iov_kunit_create_buffer()
57 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, pages); in iov_kunit_create_buffer()
63 KUNIT_ASSERT_EQ(test, got, npages); in iov_kunit_create_buffer()
70 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buffer); in iov_kunit_create_buffer()
72 kunit_add_action_or_reset(test, iov_kunit_unmap, buffer); in iov_kunit_create_buffer()
76 static void __init iov_kunit_load_kvec(struct kunit *test, in iov_kunit_load_kvec() argument
88 KUNIT_ASSERT_GE(test, pr->to, pr->from); in iov_kunit_load_kvec()
89 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_load_kvec()
94 KUNIT_ASSERT_LE(test, size, bufsize); in iov_kunit_load_kvec()
[all …]
Dtest_objpool.c64 struct ot_test *test; /* test parameters */ member
85 static void *ot_kzalloc(struct ot_test *test, long size) in ot_kzalloc() argument
90 atomic_long_add(size, &test->data.kmalloc.alloc); in ot_kzalloc()
94 static void ot_kfree(struct ot_test *test, void *ptr, long size) in ot_kfree() argument
98 atomic_long_add(size, &test->data.kmalloc.free); in ot_kfree()
102 static void ot_mem_report(struct ot_test *test) in ot_mem_report() argument
106 pr_info("memory allocation summary for %s\n", test->name); in ot_mem_report()
108 alloc = atomic_long_read(&test->data.kmalloc.alloc); in ot_mem_report()
109 free = atomic_long_read(&test->data.kmalloc.free); in ot_mem_report()
112 alloc = atomic_long_read(&test->data.vmalloc.alloc); in ot_mem_report()
[all …]
Dusercopy_kunit.c47 static void usercopy_test_check_nonzero_user(struct kunit *test) in usercopy_test_check_nonzero_user() argument
50 struct usercopy_test_priv *priv = test->priv; in usercopy_test_check_nonzero_user()
55 KUNIT_ASSERT_GE_MSG(test, size, 2 * PAGE_SIZE, "buffer too small"); in usercopy_test_check_nonzero_user()
89 KUNIT_EXPECT_EQ_MSG(test, copy_to_user(umem, kmem, size), 0, in usercopy_test_check_nonzero_user()
98 KUNIT_ASSERT_EQ_MSG(test, retval, expected, in usercopy_test_check_nonzero_user()
106 static void usercopy_test_copy_struct_from_user(struct kunit *test) in usercopy_test_copy_struct_from_user() argument
109 struct usercopy_test_priv *priv = test->priv; in usercopy_test_copy_struct_from_user()
115 umem_src = kunit_kmalloc(test, size, GFP_KERNEL); in usercopy_test_copy_struct_from_user()
116 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, umem_src); in usercopy_test_copy_struct_from_user()
118 expected = kunit_kmalloc(test, size, GFP_KERNEL); in usercopy_test_copy_struct_from_user()
[all …]
Dhashtable_test.c19 static void hashtable_test_hash_init(struct kunit *test) in hashtable_test_hash_init() argument
30 KUNIT_EXPECT_TRUE(test, hash_empty(hash1)); in hashtable_test_hash_init()
31 KUNIT_EXPECT_TRUE(test, hash_empty(hash2)); in hashtable_test_hash_init()
34 static void hashtable_test_hash_empty(struct kunit *test) in hashtable_test_hash_empty() argument
39 KUNIT_EXPECT_TRUE(test, hash_empty(hash)); in hashtable_test_hash_empty()
46 KUNIT_EXPECT_FALSE(test, hash_empty(hash)); in hashtable_test_hash_empty()
49 static void hashtable_test_hash_hashed(struct kunit *test) in hashtable_test_hash_hashed() argument
61 KUNIT_EXPECT_TRUE(test, hash_hashed(&a.node)); in hashtable_test_hash_hashed()
62 KUNIT_EXPECT_TRUE(test, hash_hashed(&b.node)); in hashtable_test_hash_hashed()
65 static void hashtable_test_hash_add(struct kunit *test) in hashtable_test_hash_add() argument
[all …]
Dtest_fprobe.c99 static void test_fprobe_entry(struct kunit *test) in test_fprobe_entry() argument
105 current_test = test; in test_fprobe_entry()
108 KUNIT_EXPECT_NE(test, 0, unregister_fprobe(&fp_entry)); in test_fprobe_entry()
109 KUNIT_EXPECT_EQ(test, 0, register_fprobe(&fp_entry, "fprobe_selftest_target*", NULL)); in test_fprobe_entry()
114 KUNIT_EXPECT_NE(test, 0, entry_val); in test_fprobe_entry()
115 KUNIT_EXPECT_EQ(test, 0, exit_val); in test_fprobe_entry()
120 KUNIT_EXPECT_NE(test, 0, entry_val); in test_fprobe_entry()
121 KUNIT_EXPECT_EQ(test, 0, exit_val); in test_fprobe_entry()
123 KUNIT_EXPECT_EQ(test, 0, unregister_fprobe(&fp_entry)); in test_fprobe_entry()
126 static void test_fprobe(struct kunit *test) in test_fprobe() argument
[all …]
Dtest_list_sort.c29 static void check(struct kunit *test, struct debug_el *ela, struct debug_el *elb) in check() argument
31 struct debug_el **elts = test->priv; in check()
33 KUNIT_EXPECT_LT_MSG(test, ela->serial, (unsigned int)TEST_LIST_LEN, "incorrect serial"); in check()
34 KUNIT_EXPECT_LT_MSG(test, elb->serial, (unsigned int)TEST_LIST_LEN, "incorrect serial"); in check()
36 KUNIT_EXPECT_PTR_EQ_MSG(test, elts[ela->serial], ela, "phantom element"); in check()
37 KUNIT_EXPECT_PTR_EQ_MSG(test, elts[elb->serial], elb, "phantom element"); in check()
39 KUNIT_EXPECT_EQ_MSG(test, ela->poison1, TEST_POISON1, "bad poison"); in check()
40 KUNIT_EXPECT_EQ_MSG(test, ela->poison2, TEST_POISON2, "bad poison"); in check()
42 KUNIT_EXPECT_EQ_MSG(test, elb->poison1, TEST_POISON1, "bad poison"); in check()
43 KUNIT_EXPECT_EQ_MSG(test, elb->poison2, TEST_POISON2, "bad poison"); in check()
[all …]
Dis_signed_type_kunit.c19 static void is_signed_type_test(struct kunit *test) in is_signed_type_test() argument
21 KUNIT_EXPECT_EQ(test, is_signed_type(bool), false); in is_signed_type_test()
22 KUNIT_EXPECT_EQ(test, is_signed_type(signed char), true); in is_signed_type_test()
23 KUNIT_EXPECT_EQ(test, is_signed_type(unsigned char), false); in is_signed_type_test()
24 KUNIT_EXPECT_EQ(test, is_signed_type(char), false); in is_signed_type_test()
25 KUNIT_EXPECT_EQ(test, is_signed_type(int), true); in is_signed_type_test()
26 KUNIT_EXPECT_EQ(test, is_signed_type(unsigned int), false); in is_signed_type_test()
27 KUNIT_EXPECT_EQ(test, is_signed_type(long), true); in is_signed_type_test()
28 KUNIT_EXPECT_EQ(test, is_signed_type(unsigned long), false); in is_signed_type_test()
29 KUNIT_EXPECT_EQ(test, is_signed_type(long long), true); in is_signed_type_test()
[all …]
Dtest_linear_ranges.c114 static void range_test_get_value(struct kunit *test) in range_test_get_value() argument
122 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_value()
123 KUNIT_EXPECT_EQ(test, val, range1_vals[i]); in range_test_get_value()
128 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_value()
129 KUNIT_EXPECT_EQ(test, val, range2_vals[i]); in range_test_get_value()
132 KUNIT_EXPECT_NE(test, 0, ret); in range_test_get_value()
135 static void range_test_get_selector_high(struct kunit *test) in range_test_get_selector_high() argument
144 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_selector_high()
145 KUNIT_EXPECT_EQ(test, sel, range1_sels[i]); in range_test_get_selector_high()
146 KUNIT_EXPECT_TRUE(test, found); in range_test_get_selector_high()
[all …]
Dtest_kprobes.c61 static void test_kprobe(struct kunit *test) in test_kprobe() argument
63 current_test = test; in test_kprobe()
64 KUNIT_EXPECT_EQ(test, 0, register_kprobe(&kp)); in test_kprobe()
67 KUNIT_EXPECT_NE(test, 0, preh_val); in test_kprobe()
68 KUNIT_EXPECT_NE(test, 0, posth_val); in test_kprobe()
122 static void test_kprobes(struct kunit *test) in test_kprobes() argument
126 current_test = test; in test_kprobes()
132 KUNIT_EXPECT_EQ(test, 0, register_kprobes(kps, 2)); in test_kprobes()
137 KUNIT_EXPECT_NE(test, 0, preh_val); in test_kprobes()
138 KUNIT_EXPECT_NE(test, 0, posth_val); in test_kprobes()
[all …]
Dslub_kunit.c29 static void test_clobber_zone(struct kunit *test) in test_clobber_zone() argument
39 KUNIT_EXPECT_EQ(test, 2, slab_errors); in test_clobber_zone()
47 static void test_next_pointer(struct kunit *test) in test_next_pointer() argument
67 KUNIT_EXPECT_EQ(test, 3, slab_errors); in test_next_pointer()
79 KUNIT_EXPECT_EQ(test, 2, slab_errors); in test_next_pointer()
87 KUNIT_EXPECT_EQ(test, 0, slab_errors); in test_next_pointer()
92 static void test_first_word(struct kunit *test) in test_first_word() argument
102 KUNIT_EXPECT_EQ(test, 2, slab_errors); in test_first_word()
107 static void test_clobber_50th_byte(struct kunit *test) in test_clobber_50th_byte() argument
117 KUNIT_EXPECT_EQ(test, 2, slab_errors); in test_clobber_50th_byte()
[all …]

123