Home
last modified time | relevance | path

Searched refs:test_case (Results 1 - 25 of 60) sorted by relevance

123

/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/
H A Dmigrate_reuseport.c185 static int drop_ack(struct migrate_reuseport_test_case *test_case, in drop_ack() argument
188 if (test_case->family == AF_INET) in drop_ack()
190 &test_case->addr)->sin_port; in drop_ack()
193 &test_case->addr)->sin6_port; in drop_ack()
195 test_case->link = bpf_program__attach_xdp(skel->progs.drop_ack, in drop_ack()
197 if (!ASSERT_OK_PTR(test_case->link, "bpf_program__attach_xdp")) in drop_ack()
203 static int pass_ack(struct migrate_reuseport_test_case *test_case) in pass_ack() argument
207 err = bpf_link__destroy(test_case->link); in pass_ack()
211 test_case->link = NULL; in pass_ack()
216 static int start_servers(struct migrate_reuseport_test_case *test_case, in start_servers() argument
278 start_clients(struct migrate_reuseport_test_case *test_case) start_clients() argument
321 update_maps(struct migrate_reuseport_test_case *test_case, struct test_migrate_reuseport *skel) update_maps() argument
351 migrate_dance(struct migrate_reuseport_test_case *test_case) migrate_dance() argument
407 count_requests(struct migrate_reuseport_test_case *test_case, struct test_migrate_reuseport *skel) count_requests() argument
456 run_test(struct migrate_reuseport_test_case *test_case, struct test_migrate_reuseport *skel) run_test() argument
[all...]
H A Dcore_reloc.c1001 struct core_reloc_test_case *test_case, test_case_copy; in run_core_reloc_tests() local
1018 test_case = &test_case_copy; in run_core_reloc_tests()
1020 if (!test__start_subtest(test_case->case_name)) in run_core_reloc_tests()
1023 if (test_case->needs_testmod && !env.has_testmod) { in run_core_reloc_tests()
1031 if (!test_case->btf_src_file || test_case->run_btfgen_fails) { in run_core_reloc_tests()
1040 err = run_btfgen(test_case->btf_src_file, btf_file, in run_core_reloc_tests()
1041 test_case->bpf_obj_file); in run_core_reloc_tests()
1045 test_case->btf_src_file = btf_file; in run_core_reloc_tests()
1048 if (test_case in run_core_reloc_tests()
[all...]
/kernel/linux/linux-5.10/lib/kunit/
H A Ddebugfs.c41 struct kunit_case *test_case) in debugfs_print_result()
43 if (!test_case || !test_case->log) in debugfs_print_result()
46 seq_printf(seq, "%s", test_case->log); in debugfs_print_result()
56 struct kunit_case *test_case; in debugfs_print_results() local
63 kunit_suite_for_each_test_case(suite, test_case) in debugfs_print_results()
64 debugfs_print_result(seq, suite, test_case); in debugfs_print_results()
94 struct kunit_case *test_case; in kunit_debugfs_create_suite() local
98 kunit_suite_for_each_test_case(suite, test_case) in kunit_debugfs_create_suite()
99 test_case in kunit_debugfs_create_suite()
39 debugfs_print_result(struct seq_file *seq, struct kunit_suite *suite, struct kunit_case *test_case) debugfs_print_result() argument
110 struct kunit_case *test_case; kunit_debugfs_destroy_suite() local
[all...]
H A Dtest.c46 struct kunit_case *test_case; in kunit_suite_num_test_cases() local
49 kunit_suite_for_each_test_case(suite, test_case) in kunit_suite_num_test_cases()
93 const struct kunit_case *test_case; in kunit_suite_has_succeeded() local
95 kunit_suite_for_each_test_case(suite, test_case) { in kunit_suite_has_succeeded()
96 if (!test_case->success) in kunit_suite_has_succeeded()
115 struct kunit_case *test_case) in kunit_test_case_num()
121 if (tc == test_case) in kunit_test_case_num()
229 struct kunit_case *test_case) in kunit_run_case_internal()
242 test_case->run_case(test); in kunit_run_case_internal()
266 struct kunit_case *test_case; member
114 kunit_test_case_num(struct kunit_suite *suite, struct kunit_case *test_case) kunit_test_case_num() argument
227 kunit_run_case_internal(struct kunit *test, struct kunit_suite *suite, struct kunit_case *test_case) kunit_run_case_internal() argument
274 struct kunit_case *test_case = ctx->test_case; kunit_try_run_case() local
327 kunit_run_case_catch_errors(struct kunit_suite *suite, struct kunit_case *test_case) kunit_run_case_catch_errors() argument
355 struct kunit_case *test_case; kunit_run_tests() local
[all...]
/kernel/linux/linux-6.6/lib/kunit/
H A Dtest.c163 struct kunit_case *test_case; in kunit_suite_num_test_cases() local
166 kunit_suite_for_each_test_case(suite, test_case) in kunit_suite_num_test_cases()
237 const struct kunit_case *test_case; in kunit_suite_has_succeeded() local
243 kunit_suite_for_each_test_case(suite, test_case) { in kunit_suite_has_succeeded()
244 if (test_case->status == KUNIT_FAILURE) in kunit_suite_has_succeeded()
246 else if (test_case->status == KUNIT_SUCCESS) in kunit_suite_has_succeeded()
266 struct kunit_case *test_case) in kunit_test_case_num()
272 if (tc == test_case) in kunit_test_case_num()
388 struct kunit_case *test_case, in kunit_run_case_check_speed()
393 enum kunit_speed speed = test_case in kunit_run_case_check_speed()
265 kunit_test_case_num(struct kunit_suite *suite, struct kunit_case *test_case) kunit_test_case_num() argument
387 kunit_run_case_check_speed(struct kunit *test, struct kunit_case *test_case, struct timespec64 duration) kunit_run_case_check_speed() argument
409 kunit_run_case_internal(struct kunit *test, struct kunit_suite *suite, struct kunit_case *test_case) kunit_run_case_internal() argument
456 struct kunit_case *test_case; global() member
464 struct kunit_case *test_case = ctx->test_case; kunit_try_run_case() local
548 kunit_run_case_catch_errors(struct kunit_suite *suite, struct kunit_case *test_case, struct kunit *test) kunit_run_case_catch_errors() argument
634 struct kunit_case *test_case; kunit_run_tests() local
[all...]
H A Ddebugfs.c42 struct kunit_case *test_case) in debugfs_print_result()
44 if (!test_case || !test_case->log) in debugfs_print_result()
47 seq_printf(seq, "%s", test_case->log); in debugfs_print_result()
57 struct kunit_case *test_case; in debugfs_print_results() local
73 kunit_suite_for_each_test_case(suite, test_case) in debugfs_print_results()
74 debugfs_print_result(seq, suite, test_case); in debugfs_print_results()
107 struct kunit_case *test_case; in kunit_debugfs_create_suite() local
111 kunit_suite_for_each_test_case(suite, test_case) in kunit_debugfs_create_suite()
112 test_case in kunit_debugfs_create_suite()
40 debugfs_print_result(struct seq_file *seq, struct kunit_suite *suite, struct kunit_case *test_case) debugfs_print_result() argument
123 struct kunit_case *test_case; kunit_debugfs_destroy_suite() local
[all...]
H A Dexecutor.c105 struct kunit_case *filtered, *test_case; in kunit_filter_glob_tests() local
108 kunit_suite_for_each_test_case(suite, test_case) { in kunit_filter_glob_tests()
109 if (!test_glob || glob_match(test_glob, test_case->name)) in kunit_filter_glob_tests()
127 kunit_suite_for_each_test_case(suite, test_case) { in kunit_filter_glob_tests()
128 if (!test_glob || glob_match(test_glob, test_case->name)) in kunit_filter_glob_tests()
129 filtered[n++] = *test_case; in kunit_filter_glob_tests()
279 struct kunit_case *test_case; in kunit_exec_list_tests() local
291 kunit_suite_for_each_test_case((*suites), test_case) { in kunit_exec_list_tests()
292 pr_info("%s.%s\n", (*suites)->name, test_case->name); in kunit_exec_list_tests()
294 kunit_print_attr((void *)test_case, tru in kunit_exec_list_tests()
[all...]
H A Dattributes.c188 // Suites get their module attribute from their first test_case in attr_module_get()
341 struct kunit_case *filtered, *test_case; in kunit_filter_attr_tests() local
351 kunit_suite_for_each_test_case(suite, test_case) { n++; } in kunit_filter_attr_tests()
373 kunit_suite_for_each_test_case(suite, test_case) { in kunit_filter_attr_tests()
374 test_val = filter.attr->get_attr((void *) test_case, true); in kunit_filter_attr_tests()
375 test_result = filter.attr->filter(filter.attr->get_attr(test_case, true), in kunit_filter_attr_tests()
397 filtered[n++] = *test_case; in kunit_filter_attr_tests()
399 test_case->status = KUNIT_SKIPPED; in kunit_filter_attr_tests()
400 filtered[n++] = *test_case; in kunit_filter_attr_tests()
/kernel/linux/linux-5.10/tools/testing/kunit/
H A Dkunit_parser.py104 def save_non_diagnositic(lines: List[str], test_case: TestCase) -> None:
106 test_case.log.append(lines[0])
115 def parse_ok_not_ok_test_case(lines: List[str], test_case: TestCase) -> bool:
116 save_non_diagnositic(lines, test_case)
118 test_case.status = TestStatus.TEST_CRASHED
126 test_case.log.append(lines.pop(0))
127 test_case.name = match.group(2)
128 if test_case.status == TestStatus.TEST_CRASHED:
131 test_case.status = TestStatus.SUCCESS
133 test_case
[all...]
H A Dkunit_json.py33 # TODO: Add attachments attribute in test_case with detailed
36 test_case = {"name": case.name, "status": "FAIL"}
38 test_case["status"] = "PASS"
40 test_case["status"] = "ERROR"
41 test_cases.append(test_case)
/kernel/linux/linux-6.6/drivers/virt/nitro_enclaves/
H A Dne_misc_dev_test.c123 struct ne_phys_regions_test *test_case = &phys_regions_test_cases[i]; in ne_misc_dev_test_merge_phys_contig_memory_regions() local
127 test_case->paddr, test_case->size); in ne_misc_dev_test_merge_phys_contig_memory_regions()
128 KUNIT_EXPECT_EQ(test, rc, test_case->expect_rc); in ne_misc_dev_test_merge_phys_contig_memory_regions()
129 KUNIT_EXPECT_EQ(test, phys_contig_mem_regions.num, test_case->expect_num); in ne_misc_dev_test_merge_phys_contig_memory_regions()
131 if (test_case->expect_last_paddr == INVALID_VALUE) in ne_misc_dev_test_merge_phys_contig_memory_regions()
136 test_case->expect_last_paddr); in ne_misc_dev_test_merge_phys_contig_memory_regions()
138 test_case->expect_last_size); in ne_misc_dev_test_merge_phys_contig_memory_regions()
/kernel/linux/linux-6.6/tools/testing/selftests/mm/
H A Dcow.c961 struct test_case { struct
970 static const struct test_case anon_test_cases[] = {
1088 static void run_anon_test_case(struct test_case const *test_case) in run_anon_test_case() argument
1092 run_with_base_page(test_case->fn, test_case->desc); in run_anon_test_case()
1093 run_with_base_page_swap(test_case->fn, test_case->desc); in run_anon_test_case()
1095 run_with_thp(test_case->fn, test_case in run_anon_test_case()
1338 struct test_case const *test_case = &anon_thp_test_cases[i]; run_anon_thp_test_cases() local
1646 run_non_anon_test_case(struct non_anon_test_case const *test_case) run_non_anon_test_case() argument
[all...]
H A Dgup_longterm.c319 struct test_case { struct
376 static const struct test_case test_cases[] = {
421 static void run_test_case(struct test_case const *test_case) in run_test_case() argument
425 run_with_memfd(test_case->fn, test_case->desc); in run_test_case()
426 run_with_tmpfile(test_case->fn, test_case->desc); in run_test_case()
427 run_with_local_tmpfile(test_case->fn, test_case in run_test_case()
[all...]
H A Dmremap_test.c368 static void run_mremap_test_case(struct test test_case, int *failures, in run_mremap_test_case() argument
372 long long remap_time = remap_region(test_case.config, threshold_mb, in run_mremap_test_case()
376 if (test_case.expect_failure) in run_mremap_test_case()
378 test_case.name); in run_mremap_test_case()
380 ksft_test_result_fail("%s\n", test_case.name); in run_mremap_test_case()
389 test_case.config.region_size <= threshold_mb * _1MB) in run_mremap_test_case()
391 test_case.name, remap_time); in run_mremap_test_case()
393 ksft_test_result_pass("%s\n", test_case.name); in run_mremap_test_case()
/kernel/linux/linux-6.6/tools/testing/selftests/kvm/
H A Dsystem_counter_offset_test.c19 struct test_case { struct
23 static struct test_case test_cases[] = {
36 static void setup_system_counter(struct kvm_vcpu *vcpu, struct test_case *test) in setup_system_counter()
42 static uint64_t guest_read_system_counter(struct test_case *test) in guest_read_system_counter()
47 static uint64_t host_read_guest_system_counter(struct test_case *test) in host_read_guest_system_counter()
66 struct test_case *test = &test_cases[i]; in guest_main()
96 struct test_case *test = &test_cases[i]; in enter_guest()
/kernel/linux/linux-5.10/tools/testing/vsock/
H A Dutil.h24 struct test_case { struct
44 void run_tests(const struct test_case *test_cases,
46 void list_tests(const struct test_case *test_cases);
47 void skip_test(struct test_case *test_cases, size_t test_cases_len,
/kernel/linux/linux-5.10/samples/bpf/
H A Dtest_map_in_map_kern.c110 u16 test_case, port, dst6[8]; in trace_sys_connect() local
131 test_case = dst6[7]; in trace_sys_connect()
142 if (test_case == 0) { in trace_sys_connect()
144 } else if (test_case == 1) { in trace_sys_connect()
146 } else if (test_case == 2) { in trace_sys_connect()
163 if (test_case == 0 || test_case == 1) in trace_sys_connect()
H A Dmap_perf_test_kern.c179 u16 test_case; in stress_lru_hmap_alloc() local
199 test_case = test_params.tcase; in stress_lru_hmap_alloc()
200 if (test_case != 3) in stress_lru_hmap_alloc()
203 if (test_case == 0) { in stress_lru_hmap_alloc()
205 } else if (test_case == 1) { in stress_lru_hmap_alloc()
208 } else if (test_case == 2) { in stress_lru_hmap_alloc()
221 } else if (test_case == 3) { in stress_lru_hmap_alloc()
/kernel/linux/linux-6.6/tools/testing/selftests/kvm/x86_64/
H A Dkvm_clock_test.c19 struct test_case { struct
24 static struct test_case test_cases[] = {
77 static void setup_clock(struct kvm_vm *vm, struct test_case *test_case) in setup_clock() argument
83 data.clock = test_case->kvmclock_base; in setup_clock()
84 if (test_case->realtime_offset) { in setup_clock()
99 data.realtime += test_case->realtime_offset; in setup_clock()
/kernel/linux/linux-6.6/samples/bpf/
H A Dtest_map_in_map.bpf.c109 u16 test_case, port, dst6[8]; in BPF_KSYSCALL() local
127 test_case = dst6[7]; in BPF_KSYSCALL()
138 if (test_case == 0) { in BPF_KSYSCALL()
140 } else if (test_case == 1) { in BPF_KSYSCALL()
142 } else if (test_case == 2) { in BPF_KSYSCALL()
159 if (test_case == 0 || test_case == 1) in BPF_KSYSCALL()
H A Dmap_perf_test.bpf.c188 u16 test_case; in BPF_KSYSCALL() local
205 test_case = test_params.tcase; in BPF_KSYSCALL()
206 if (test_case != 3) in BPF_KSYSCALL()
209 if (test_case == 0) { in BPF_KSYSCALL()
211 } else if (test_case == 1) { in BPF_KSYSCALL()
214 } else if (test_case == 2) { in BPF_KSYSCALL()
227 } else if (test_case == 3) { in BPF_KSYSCALL()
/kernel/linux/linux-6.6/tools/testing/vsock/
H A Dutil.h24 struct test_case { struct
47 void run_tests(const struct test_case *test_cases,
49 void list_tests(const struct test_case *test_cases);
50 void skip_test(struct test_case *test_cases, size_t test_cases_len,
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
H A Dcore_reloc.c770 struct core_reloc_test_case *test_case; in test_core_reloc() local
784 test_case = &test_cases[i]; in test_core_reloc()
785 if (!test__start_subtest(test_case->case_name)) in test_core_reloc()
788 if (test_case->setup) { in test_core_reloc()
789 err = test_case->setup(test_case); in test_core_reloc()
794 obj = bpf_object__open_file(test_case->bpf_obj_file, NULL); in test_core_reloc()
796 test_case->bpf_obj_file, PTR_ERR(obj))) in test_core_reloc()
800 if (test_case->direct_raw_tp) { in test_core_reloc()
814 if (test_case in test_core_reloc()
[all...]
/kernel/linux/linux-5.10/lib/
H A Dtest_kmod.c84 enum kmod_test_case test_case; member
147 static const char *test_case_str(enum kmod_test_case test_case) in test_case_str() argument
149 switch (test_case) { in test_case_str()
203 switch (config->test_case) { in test_kmod_put_module()
223 switch (config->test_case) { in run_request()
255 switch (config->test_case) { in tally_work_test()
430 test_case_str(config->test_case), in run_test_driver()
431 config->test_case); in run_test_driver()
447 test_case_str(config->test_case), in run_test_fs_type()
448 config->test_case); in run_test_fs_type()
730 trigger_config_run_type(struct kmod_test_device *test_dev, enum kmod_test_case test_case, const char *test_str) trigger_config_run_type() argument
[all...]
/kernel/linux/linux-6.6/lib/
H A Dtest_kmod.c73 enum kmod_test_case test_case; member
136 static const char *test_case_str(enum kmod_test_case test_case) in test_case_str() argument
138 switch (test_case) { in test_case_str()
192 switch (config->test_case) { in test_kmod_put_module()
212 switch (config->test_case) { in run_request()
244 switch (config->test_case) { in tally_work_test()
419 test_case_str(config->test_case), in run_test_driver()
420 config->test_case); in run_test_driver()
436 test_case_str(config->test_case), in run_test_fs_type()
437 config->test_case); in run_test_fs_type()
719 trigger_config_run_type(struct kmod_test_device *test_dev, enum kmod_test_case test_case, const char *test_str) trigger_config_run_type() argument
[all...]

Completed in 15 milliseconds

123