Home
last modified time | relevance | path

Searched refs:KUNIT_EXPECT_EQ (Results 1 – 16 of 16) sorted by relevance

/Linux-v5.10/drivers/base/test/
Dproperty-entry-test.c31 KUNIT_EXPECT_EQ(test, error, 0); in pe_test_uints()
32 KUNIT_EXPECT_EQ(test, (int)val_u8, 8); in pe_test_uints()
35 KUNIT_EXPECT_EQ(test, error, 0); in pe_test_uints()
36 KUNIT_EXPECT_EQ(test, (int)array_u8[0], 8); in pe_test_uints()
48 KUNIT_EXPECT_EQ(test, error, 0); in pe_test_uints()
49 KUNIT_EXPECT_EQ(test, (int)val_u16, 16); in pe_test_uints()
52 KUNIT_EXPECT_EQ(test, error, 0); in pe_test_uints()
53 KUNIT_EXPECT_EQ(test, (int)array_u16[0], 16); in pe_test_uints()
65 KUNIT_EXPECT_EQ(test, error, 0); in pe_test_uints()
66 KUNIT_EXPECT_EQ(test, (int)val_u32, 32); in pe_test_uints()
[all …]
/Linux-v5.10/drivers/base/power/
Dqos-test.c20 KUNIT_EXPECT_EQ(test, ret, 1); in freq_qos_test_min()
22 KUNIT_EXPECT_EQ(test, ret, 1); in freq_qos_test_min()
24 KUNIT_EXPECT_EQ(test, freq_qos_read_value(&qos, FREQ_QOS_MIN), 2000); in freq_qos_test_min()
27 KUNIT_EXPECT_EQ(test, ret, 1); in freq_qos_test_min()
28 KUNIT_EXPECT_EQ(test, freq_qos_read_value(&qos, FREQ_QOS_MIN), 1000); in freq_qos_test_min()
31 KUNIT_EXPECT_EQ(test, ret, 1); in freq_qos_test_min()
32 KUNIT_EXPECT_EQ(test, freq_qos_read_value(&qos, FREQ_QOS_MIN), in freq_qos_test_min()
46 KUNIT_EXPECT_EQ(test, freq_qos_read_value(&qos, FREQ_QOS_MAX), in freq_qos_test_maxdef()
51 KUNIT_EXPECT_EQ(test, ret, 0); in freq_qos_test_maxdef()
54 KUNIT_EXPECT_EQ(test, ret, 0); in freq_qos_test_maxdef()
[all …]
/Linux-v5.10/lib/
Dtest_bits.c12 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()
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()
48 KUNIT_EXPECT_EQ(test, 0, GENMASK_INPUT_CHECK(x, 0)); in genmask_input_check_test()
49 KUNIT_EXPECT_EQ(test, 0, GENMASK_INPUT_CHECK(0, x)); in genmask_input_check_test()
[all …]
Dtest_linear_ranges.c131 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_value()
132 KUNIT_EXPECT_EQ(test, val, range1_vals[i]); in range_test_get_value()
137 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_value()
138 KUNIT_EXPECT_EQ(test, val, range2_vals[i]); in range_test_get_value()
153 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_selector_high()
154 KUNIT_EXPECT_EQ(test, sel, range1_sels[i]); in range_test_get_selector_high()
164 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_selector_high()
166 KUNIT_EXPECT_EQ(test, sel, range1_sels[0]); in range_test_get_selector_high()
174 KUNIT_EXPECT_EQ(test, (int)RANGE_NUM_VALS, ret); in range_test_get_value_amount()
187 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_selector_low()
[all …]
Dlist-test.c228 KUNIT_EXPECT_EQ(test, i, 4); in list_test_list_bulk_move_tail()
234 KUNIT_EXPECT_EQ(test, i, 2); in list_test_list_bulk_move_tail()
324 KUNIT_EXPECT_EQ(test, i, 4); in list_test_list_rotate_to_front()
366 KUNIT_EXPECT_EQ(test, i, 2); in list_test_list_cut_position()
394 KUNIT_EXPECT_EQ(test, i, 1); in list_test_list_cut_before()
424 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice()
449 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice_tail()
474 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice_init()
501 KUNIT_EXPECT_EQ(test, i, 5); in list_test_list_splice_tail_init()
597 KUNIT_EXPECT_EQ(test, i, 3); in list_test_list_for_each()
[all …]
Dtest_kasan.c73 KUNIT_EXPECT_EQ(test, \
/Linux-v5.10/kernel/
Dsysctl-test.c49 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&null_data_table, in sysctl_test_api_dointvec_null_tbl_data()
52 KUNIT_EXPECT_EQ(test, (size_t)0, len); in sysctl_test_api_dointvec_null_tbl_data()
58 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&null_data_table, in sysctl_test_api_dointvec_null_tbl_data()
61 KUNIT_EXPECT_EQ(test, (size_t)0, len); in sysctl_test_api_dointvec_null_tbl_data()
95 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&data_maxlen_unset_table, in sysctl_test_api_dointvec_table_maxlen_unset()
98 KUNIT_EXPECT_EQ(test, (size_t)0, len); in sysctl_test_api_dointvec_table_maxlen_unset()
104 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&data_maxlen_unset_table, in sysctl_test_api_dointvec_table_maxlen_unset()
107 KUNIT_EXPECT_EQ(test, (size_t)0, len); in sysctl_test_api_dointvec_table_maxlen_unset()
136 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&table, KUNIT_PROC_READ, buffer, in sysctl_test_api_dointvec_table_len_is_zero()
138 KUNIT_EXPECT_EQ(test, (size_t)0, len); in sysctl_test_api_dointvec_table_len_is_zero()
[all …]
/Linux-v5.10/drivers/thunderbolt/
Dtest.c384 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_single_hop_walk()
385 KUNIT_EXPECT_EQ(test, p->port, test_data[i].port); in tb_test_path_single_hop_walk()
386 KUNIT_EXPECT_EQ(test, (enum tb_port_type)p->config.type, in tb_test_path_single_hop_walk()
391 KUNIT_EXPECT_EQ(test, i, (int)ARRAY_SIZE(test_data)); in tb_test_path_single_hop_walk()
396 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_single_hop_walk()
397 KUNIT_EXPECT_EQ(test, p->port, test_data[i].port); in tb_test_path_single_hop_walk()
398 KUNIT_EXPECT_EQ(test, (enum tb_port_type)p->config.type, in tb_test_path_single_hop_walk()
403 KUNIT_EXPECT_EQ(test, i, -1); in tb_test_path_single_hop_walk()
443 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route); in tb_test_path_daisy_chain_walk()
444 KUNIT_EXPECT_EQ(test, p->port, test_data[i].port); in tb_test_path_daisy_chain_walk()
[all …]
/Linux-v5.10/security/apparmor/
Dpolicy_unpack_test.c149 KUNIT_EXPECT_EQ(test, array_size, (u16)TEST_ARRAY_SIZE); in policy_unpack_test_unpack_array_with_null_name()
164 KUNIT_EXPECT_EQ(test, array_size, (u16)TEST_ARRAY_SIZE); in policy_unpack_test_unpack_array_with_name()
180 KUNIT_EXPECT_EQ(test, array_size, (u16)0); in policy_unpack_test_unpack_array_out_of_bounds()
227 KUNIT_EXPECT_EQ(test, size, 0); in policy_unpack_test_unpack_blob_out_of_bounds()
240 KUNIT_EXPECT_EQ(test, size, strlen(TEST_STRING_DATA) + 1); in policy_unpack_test_unpack_str_with_null_name()
252 KUNIT_EXPECT_EQ(test, size, strlen(TEST_STRING_DATA) + 1); in policy_unpack_test_unpack_str_with_name()
268 KUNIT_EXPECT_EQ(test, size, 0); in policy_unpack_test_unpack_str_out_of_bounds()
281 KUNIT_EXPECT_EQ(test, size, strlen(TEST_STRING_DATA) + 1); in policy_unpack_test_unpack_strdup_with_null_name()
296 KUNIT_EXPECT_EQ(test, size, strlen(TEST_STRING_DATA) + 1); in policy_unpack_test_unpack_strdup_with_name()
315 KUNIT_EXPECT_EQ(test, size, 0); in policy_unpack_test_unpack_strdup_out_of_bounds()
[all …]
/Linux-v5.10/lib/kunit/
Dkunit-test.c297 KUNIT_EXPECT_EQ(test, ctx->allocate_order[0], 2); in kunit_resource_test_proper_free_ordering()
298 KUNIT_EXPECT_EQ(test, ctx->allocate_order[1], 1); in kunit_resource_test_proper_free_ordering()
309 KUNIT_EXPECT_EQ(test, ctx->free_order[0], 1); in kunit_resource_test_proper_free_ordering()
310 KUNIT_EXPECT_EQ(test, ctx->free_order[1], 2); in kunit_resource_test_proper_free_ordering()
318 KUNIT_EXPECT_EQ(test, kunit_add_resource(test, NULL, NULL, &res, &ctx), in kunit_resource_test_static()
333 KUNIT_EXPECT_EQ(test, in kunit_resource_test_named()
339 KUNIT_EXPECT_EQ(test, in kunit_resource_test_named()
344 KUNIT_EXPECT_EQ(test, in kunit_resource_test_named()
356 KUNIT_EXPECT_EQ(test, kunit_destroy_named_resource(test, "resource_2"), in kunit_resource_test_named()
Dkunit-example-test.c29 KUNIT_EXPECT_EQ(test, 1 + 1, 2); in example_simple_test()
/Linux-v5.10/kernel/kcsan/
Dkcsan-test.c918 KUNIT_EXPECT_EQ(test, 42L, __atomic_load_n(&test_var, __ATOMIC_RELAXED)); in test_atomic_builtins()
920 KUNIT_EXPECT_EQ(test, 42L, __atomic_exchange_n(&test_var, 20, __ATOMIC_RELAXED)); in test_atomic_builtins()
921 KUNIT_EXPECT_EQ(test, 20L, test_var); in test_atomic_builtins()
927 KUNIT_EXPECT_EQ(test, tmp, 20L); in test_atomic_builtins()
928 KUNIT_EXPECT_EQ(test, test_var, 30L); in test_atomic_builtins()
932 KUNIT_EXPECT_EQ(test, tmp, 30L); in test_atomic_builtins()
933 KUNIT_EXPECT_EQ(test, test_var, 30L); in test_atomic_builtins()
935 KUNIT_EXPECT_EQ(test, 30L, __atomic_fetch_add(&test_var, 1, __ATOMIC_RELAXED)); in test_atomic_builtins()
936 KUNIT_EXPECT_EQ(test, 31L, __atomic_fetch_sub(&test_var, 1, __ATOMIC_RELAXED)); in test_atomic_builtins()
937 KUNIT_EXPECT_EQ(test, 30L, __atomic_fetch_and(&test_var, 0xf, __ATOMIC_RELAXED)); in test_atomic_builtins()
[all …]
/Linux-v5.10/Documentation/dev-tools/kunit/
Dusage.rst85 KUNIT_EXPECT_EQ(test, 1, add(1, 0));
86 KUNIT_EXPECT_EQ(test, 2, add(1, 1));
116 KUNIT_EXPECT_EQ(test, 1, add(1, 0));
117 KUNIT_EXPECT_EQ(test, 2, add(1, 1));
122 KUNIT_EXPECT_EQ(test, 0, add(-1, 1));
127 KUNIT_EXPECT_EQ(test, INT_MAX, add(0, INT_MAX));
128 KUNIT_EXPECT_EQ(test, -1, add(INT_MAX, INT_MIN));
133 KUNIT_EXPECT_EQ(test, INT_MIN, add(INT_MAX, 1));
164 KUNIT_EXPECT_EQ(test, -4, *((int *) ret));
382 KUNIT_EXPECT_EQ(test, fake_eeprom->contents[0], 0);
[all …]
Dstart.rst170 KUNIT_EXPECT_EQ(test, 1, misc_example_add(1, 0));
171 KUNIT_EXPECT_EQ(test, 2, misc_example_add(1, 1));
172 KUNIT_EXPECT_EQ(test, 0, misc_example_add(-1, 1));
173 KUNIT_EXPECT_EQ(test, INT_MAX, misc_example_add(0, INT_MAX));
174 KUNIT_EXPECT_EQ(test, -1, misc_example_add(INT_MAX, INT_MIN));
/Linux-v5.10/net/mptcp/
Dtoken_test.c76 KUNIT_EXPECT_EQ(test, ctx->token, msk->token); in mptcp_token_test_msk_basic()
78 KUNIT_EXPECT_EQ(test, 2, (int)refcount_read(&sk->sk_refcnt)); in mptcp_token_test_msk_basic()
/Linux-v5.10/include/kunit/
Dtest.h1233 #define KUNIT_EXPECT_EQ(test, left, right) \ macro