Searched refs:test (Results 226 - 250 of 686) sorted by relevance

1234567891011>>

/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dsock_addr.c370 /* Expected test result */
2283 static int test_bind(struct sock_addr_test *test) argument
2289 serv = test->ops->start_server(test->socket_family, test->socket_type,
2290 test->requested_addr,
2291 test->requested_port, 0);
2297 err = make_sockaddr(test->socket_family,
2298 test->expected_addr, test
2324 test_connect(struct sock_addr_test *test) argument
2384 test_xmsg(struct sock_addr_test *test) argument
2489 test_getsockname(struct sock_addr_test *test) argument
2517 test_getpeername(struct sock_addr_test *test) argument
2610 struct sock_addr_test *test = &tests[i]; local
[all...]
H A Dsk_assign.c257 struct test_sk_cfg *test = &tests[i]; local
262 if (!test__start_subtest(test->name))
264 prepare_addr(test->addr, test->family, BIND_PORT, false);
265 addr = (const struct sockaddr *)test->addr;
266 server = start_server_addr(test->type,
268 test->len, NULL);
279 prepare_addr(test->addr, test->family, CONNECT_PORT,
280 test
[all...]
H A Dcls_redirect.c173 static int test_str(void *buf, size_t len, const struct test_cfg *test, argument
183 if (test->type == UDP)
187 if (test->conn == UNKNOWN_CONN)
191 if (test->hops == ONE_HOP)
195 if (test->result == FORWARD)
199 if (test->flags == SYN)
201 else if (test->flags == ACK)
244 static size_t build_input(const struct test_cfg *test, void *const buf, argument
261 encap_init(&encap, test->hops == ONE_HOP ? 1 : 0, proto);
264 if (test
368 struct test_cfg *test = &tests[i]; local
[all...]
H A Dctx_rewrite.c17 /* The code in this file serves the sole purpose of executing test cases
18 * specified in the test_cases array. Each test case specifies a program
23 * For each test case, up to three programs are created:
29 * specified in the test case.
757 static void run_one_testcase(struct btf *btf, struct test_case *test) argument
762 if (!test__start_subtest(test->name))
765 switch (test->field_sz) {
779 PRINT_FAIL("Unexpected field size: %d, want 8,4,2 or 1\n", test->field_sz);
783 pinfo.prog_type = test->prog_type;
784 pinfo.expected_attach_type = test
[all...]
H A Dsockopt.c1044 * and simplify the test.
1071 static int run_test(int cgroup_fd, struct sockopt_test *test, bool use_io_uring, argument
1079 if (test->prog_type)
1080 prog_type = test->prog_type;
1082 prog_fd = load_prog(test->insns, prog_type, test->expected_attach_type);
1084 if (test->error == DENY_LOAD)
1092 err = bpf_link_create(prog_fd, cgroup_fd, test->attach_type, NULL);
1095 err = bpf_prog_attach(prog_fd, cgroup_fd, test->attach_type, 0);
1098 if (test
[all...]
/linux-master/lib/
H A Dtest-kstrtox.c5 #define for_each_test(i, test) \
6 for (i = 0; i < ARRAY_SIZE(test); i++)
13 #define DEFINE_TEST_FAIL(test) \
14 const struct test_fail test[] __initconst
23 #define DEFINE_TEST_OK(type, test) \
24 const type test[] __initconst
26 #define TEST_FAIL(fn, type, fmt, test) \
30 for_each_test(i, test) { \
31 const struct test_fail *t = &test[i]; \
45 #define TEST_OK(fn, type, fmt, test) \
[all...]
H A Doverflow_kunit.c10 #include <kunit/test.h>
22 kunit_skip(test, reason); \
260 KUNIT_EXPECT_EQ_MSG(test, _of, of, \
263 KUNIT_EXPECT_EQ_MSG(test, _r, r, \
268 KUNIT_EXPECT_EQ_MSG(test, _a_orig, _a_bump, \
270 KUNIT_EXPECT_EQ_MSG(test, _b_orig, _b_bump, \
274 KUNIT_EXPECT_TRUE_MSG(test, _r == r, \
281 KUNIT_EXPECT_EQ_MSG(test, _a_orig, _a_bump, \
283 KUNIT_EXPECT_EQ_MSG(test, _b_orig, _b_bump, \
311 KUNIT_EXPECT_TRUE_MSG(test, _
418 shift_sane_test(struct kunit *test) argument
467 shift_overflow_test(struct kunit *test) argument
521 shift_truncate_test(struct kunit *test) argument
559 shift_nonsense_test(struct kunit *test) argument
669 overflow_allocation_test(struct kunit *test) argument
707 overflow_size_helpers_test(struct kunit *test) argument
797 overflows_type_test(struct kunit *test) argument
1009 same_type_test(struct kunit *test) argument
1084 castable_to_type_test(struct kunit *test) argument
1181 DEFINE_FLEX_test(struct kunit *test) argument
[all...]
/linux-master/fs/unicode/
H A Dutf8-selftest.c27 pr_err("test %s:%d Failed: %s%s", \
34 #define test(cond) _test(cond, __func__, __LINE__, "") macro
119 /* Cherokee letters are interesting test-cases because they fold
184 test((utf8len(um, UTF8_NFDI, nfdi_test_data[i].str) == nlen));
185 test((utf8nlen(um, UTF8_NFDI, nfdi_test_data[i].str, len) ==
198 test((j == nlen));
213 test((utf8len(um, UTF8_NFDICF, nfdicf_test_data[i].str) ==
215 test((utf8nlen(um, UTF8_NFDICF, nfdicf_test_data[i].str, len) ==
229 test((j == nlen));
261 test(utf8version_is_supporte
[all...]
/linux-master/arch/x86/events/
H A Dprobe.c43 if (msr[bit].test && !msr[bit].test(bit, data))
/linux-master/lib/kunit/
H A Dstring-stream.h32 struct string_stream *kunit_alloc_string_stream(struct kunit *test, gfp_t gfp);
33 void kunit_free_string_stream(struct kunit *test, struct string_stream *stream);
H A Dattributes.c3 * KUnit API to save and access test attributes
9 #include <kunit/test.h>
13 * PRINT_ALWAYS - attribute is printed for every test case and suite if set
14 * PRINT_SUITE - attribute is printed for every suite if set but not for test cases
24 * struct kunit_attr - represents a test attribute and holds flexible
27 * @name: name of test attribute, eg. speed
28 * @get_attr: function to return attribute value given a test
216 struct kunit_case *test = is_test ? test_or_suite : NULL; local
218 if (test)
219 return ((void *) test
227 struct kunit_case *test = is_test ? test_or_suite : NULL; local
241 struct kunit_case *test = is_test ? test_or_suite : NULL; local
292 struct kunit_case *test = is_test ? test_or_suite : NULL; local
[all...]
/linux-master/drivers/gpu/drm/xe/tests/
H A Dxe_pci.c10 #include <kunit/test-bug.h>
11 #include <kunit/test.h>
12 #include <kunit/test-bug.h>
62 kunit_skip(current->kunit_test, "test runs only on hardware\n");
114 struct kunit *test = kunit_get_current_test(); local
115 struct xe_pci_fake_data *data = test->priv;
128 struct kunit *test = kunit_get_current_test(); local
129 struct xe_pci_fake_data *data = test->priv;
162 kunit_activate_static_stub(test, read_gmdid, fake_read_gmdid);
/linux-master/tools/testing/selftests/bpf/progs/
H A Dtailcall_poke.c16 int BPF_PROG(test, int a)
/linux-master/scripts/kconfig/tests/choice_randomize/
H A D__init__.py11 def test(conf): function
/linux-master/net/mptcp/
H A Dcrypto_test.c2 #include <kunit/test.h>
12 /* we can't reuse RFC 4231 test vectors, as we have constraint on the
33 static void mptcp_crypto_test_basic(struct kunit *test) argument
56 KUNIT_EXPECT_STREQ(test, &hmac_hex[0], tests[i].result);
/linux-master/tools/testing/selftests/net/
H A Dudpgso.c392 static void run_one(struct testcase *test, int fdt, int fdr, argument
400 test->tlen, test->gso_len,
401 test->tfail ? "(fail)" : "");
403 val = test->gso_len;
409 sent = send_one(fdt, test->tlen, test->gso_len, addr, alen);
410 if (sent && test->tfail)
412 if (!sent && !test->tfail)
417 if (test
446 struct testcase *tests, *test; local
[all...]
/linux-master/crypto/
H A Dtestmgr.c57 MODULE_PARM_DESC(fuzz_iterations, "number of fuzz test iterations");
142 int (*test)(const struct alg_test_desc *desc, const char *driver, member in struct:alg_test_desc
255 * crypto test vector.
259 * scales to fit any test vector
276 * struct testvec_config - configuration for testing a crypto test vector
279 * crypto test vector can be tested.
281 * @name: name of this config, logged for debugging purposes if a test fails
314 * The following are the lists of testvec_configs to test for each algorithm
316 * CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is unset. They aim to provide good test
317 * coverage, while keeping the test tim
3794 drbg_cavs_test(const struct drbg_testvec *test, int pr, const char *driver, u32 type, u32 mask) argument
[all...]
/linux-master/drivers/net/wireless/mediatek/mt76/mt7615/
H A Dtestmode.c70 if (mphy->test.state != MT76_TM_STATE_OFF)
71 tx_power = mphy->test.tx_power;
101 u32 *b = phy->test.reg_backup;
106 if (phy->mt76->test.state == MT76_TM_STATE_OFF) {
124 phy->test.reg_backup = b;
141 mt7615_mcu_set_sku_en(phy, phy->mt76->test.state == MT76_TM_STATE_OFF);
175 struct mt76_testmode_data *td = &phy->mt76->test;
229 struct sk_buff *skb = phy->mt76->test.tx_skb;
245 struct mt76_testmode_data *td = &phy->mt76->test;
246 bool en = phy->mt76->test
[all...]
/linux-master/tools/testing/selftests/resctrl/
H A Dmbm_test.c3 * Memory Bandwidth Monitoring (MBM) test
89 static int mbm_setup(const struct resctrl_test *test, argument
101 ret = write_schemata(p->ctrlgrp, "100", uparams->cpu, test->resource);
113 static int mbm_run_test(const struct resctrl_test *test, const struct user_params *uparams) argument
127 ret = resctrl_val(test, uparams, uparams->benchmark_cmd, &param);
138 static bool mbm_feature_check(const struct resctrl_test *test) argument
/linux-master/net/bpf/
H A Dtest_run.c99 * repetition of the test run.
442 void __user *data_out = u64_to_user_ptr(kattr->test.data_out);
449 if (kattr->test.data_size_out &&
450 copy_size > kattr->test.data_size_out) {
451 copy_size = kattr->test.data_size_out;
491 if (copy_to_user(&uattr->test.data_size_out, &size, sizeof(size)))
493 if (copy_to_user(&uattr->test.retval, &retval, sizeof(retval)))
495 if (copy_to_user(&uattr->test.duration, &duration, sizeof(duration)))
649 void __user *data_in = u64_to_user_ptr(kattr->test.data_in);
680 if (kattr->test
[all...]
/linux-master/net/wireless/tests/
H A Dchan.c8 #include <kunit/test.h>
31 /* we test both ways around, so c2 should always be the compat one */
129 /* similar to previous test but one has lower BW */
193 static void test_chandef_compat(struct kunit *test) argument
195 const struct chandef_compat_case *params = test->param_value;
203 KUNIT_EXPECT_EQ(test, cfg80211_chandef_valid(&c1), true);
204 KUNIT_EXPECT_EQ(test, cfg80211_chandef_valid(&params->c2), true);
209 KUNIT_EXPECT_PTR_EQ(test, ret, expect);
215 KUNIT_EXPECT_PTR_EQ(test, ret, expect);
/linux-master/tools/testing/selftests/kvm/aarch64/
H A Dpage_fault_test.c5 * This test tries different combinations of guest accesses (e.g., write,
20 /* Guest virtual addresses that point to the test page and its PTE. */
52 /* Skip the test if any prepare function returns false */
252 static bool guest_prepare(struct test_desc *test) argument
258 prepare_fn = test->guest_prepare[i];
266 static void guest_test_check(struct test_desc *test) argument
272 check_fn = test->guest_test_check[i];
278 static void guest_code(struct test_desc *test) argument
280 if (!guest_prepare(test))
283 GUEST_SYNC(test
366 struct test_desc *test = p->test_desc; local
387 free_uffd(struct test_desc *test, struct uffd_desc *pt_uffd, struct uffd_desc *data_uffd) argument
540 setup_abort_handlers(struct kvm_vm *vm, struct kvm_vcpu *vcpu, struct test_desc *test) argument
621 setup_default_handlers(struct test_desc *test) argument
630 check_event_counts(struct test_desc *test) argument
639 struct test_desc *test = p->test_desc; local
656 vcpu_run_loop(struct kvm_vm *vm, struct kvm_vcpu *vcpu, struct test_desc *test) argument
700 struct test_desc *test = p->test_desc; local
[all...]
/linux-master/net/sunrpc/auth_gss/
H A Dgss_krb5_test.c5 * KUnit test of SunRPC's GSS Kerberos mechanism. Subsystem
9 #include <kunit/test.h>
43 static void kdf_case(struct kunit *test) argument
45 const struct gss_krb5_test_param *param = test->param_value;
53 kunit_skip(test, "Encryption type is not available");
55 derivedkey.data = kunit_kzalloc(test, param->expected_result->len,
57 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, derivedkey.data);
63 KUNIT_ASSERT_EQ(test, err, 0);
66 KUNIT_EXPECT_EQ_MSG(test,
72 static void checksum_case(struct kunit *test) argument
303 rfc3961_nfold_case(struct kunit *test) argument
527 rfc3962_encrypt_case(struct kunit *test) argument
1114 rfc6803_encrypt_case(struct kunit *test) argument
1609 rfc8009_encrypt_case(struct kunit *test) argument
1784 encrypt_selftest_case(struct kunit *test) argument
[all...]
/linux-master/sound/soc/
H A Dsoc-utils-test.c5 #include <kunit/test.h>
118 static void test_tdm_params_to_bclk_one(struct kunit *test, argument
141 KUNIT_ASSERT_EQ(test, expected_bclk, (unsigned int)got_bclk);
144 static void test_tdm_params_to_bclk(struct kunit *test) argument
149 test_tdm_params_to_bclk_one(test,
162 test_tdm_params_to_bclk_one(test,
173 static void test_snd_soc_params_to_bclk_one(struct kunit *test, argument
193 KUNIT_ASSERT_EQ(test, expected_bclk, (unsigned int)got_bclk);
196 static void test_snd_soc_params_to_bclk(struct kunit *test) argument
202 * snd_soc_params_to_bclk() is all the test case
[all...]
/linux-master/tools/testing/selftests/bpf/
H A Dtesting_helpers.c79 struct test_filter *tmp, *test; local
84 test = &set->tests[i];
86 if (strcmp(test_str, test->name) == 0) {
92 tmp = realloc(set->tests, sizeof(*test) * (set->cnt + 1));
97 test = &set->tests[set->cnt];
99 test->name = test_str;
100 test->subtests = NULL;
101 test->subtest_cnt = 0;
109 for (i = 0; i < test->subtest_cnt; i++) {
110 if (strcmp(subtest_str, test
[all...]

Completed in 314 milliseconds

1234567891011>>