/kernel/events/ |
D | hw_breakpoint_test.c | 15 #define TEST_REQUIRES_BP_SLOTS(test, slots) \ argument 18 kunit_skip((test), "Requires breakpoint slots: %d > %d", slots, \ 23 #define TEST_EXPECT_NOSPC(expr) KUNIT_EXPECT_EQ(test, -ENOSPC, PTR_ERR(expr)) 65 static void fill_one_bp_slot(struct kunit *test, int *id, int cpu, struct task_struct *tsk) in fill_one_bp_slot() argument 69 KUNIT_ASSERT_NOT_NULL(test, bp); in fill_one_bp_slot() 70 KUNIT_ASSERT_FALSE(test, IS_ERR(bp)); in fill_one_bp_slot() 71 KUNIT_ASSERT_NULL(test, test_bps[*id]); in fill_one_bp_slot() 80 static bool fill_bp_slots(struct kunit *test, int *id, int cpu, struct task_struct *tsk, int skip) in fill_bp_slots() argument 83 fill_one_bp_slot(test, id, cpu, tsk); in fill_bp_slots() 93 static struct task_struct *get_other_task(struct kunit *test) in get_other_task() argument [all …]
|
/kernel/ |
D | sysctl-test.c | 16 static void sysctl_test_api_dointvec_null_tbl_data(struct kunit *test) in sysctl_test_api_dointvec_null_tbl_data() argument 36 void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int), in sysctl_test_api_dointvec_null_tbl_data() 46 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&null_data_table, in sysctl_test_api_dointvec_null_tbl_data() 49 KUNIT_EXPECT_EQ(test, 0, len); in sysctl_test_api_dointvec_null_tbl_data() 55 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&null_data_table, in sysctl_test_api_dointvec_null_tbl_data() 58 KUNIT_EXPECT_EQ(test, 0, len); in sysctl_test_api_dointvec_null_tbl_data() 66 static void sysctl_test_api_dointvec_table_maxlen_unset(struct kunit *test) in sysctl_test_api_dointvec_table_maxlen_unset() argument 82 void __user *buffer = (void __user *)kunit_kzalloc(test, sizeof(int), in sysctl_test_api_dointvec_table_maxlen_unset() 92 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&data_maxlen_unset_table, in sysctl_test_api_dointvec_table_maxlen_unset() 95 KUNIT_EXPECT_EQ(test, 0, len); in sysctl_test_api_dointvec_table_maxlen_unset() [all …]
|
D | resource_kunit.c | 83 static void resource_do_test(struct kunit *test, bool ret, struct resource *r, in resource_do_test() argument 87 KUNIT_EXPECT_EQ_MSG(test, ret, exp_ret, "Resources %pR %pR", r1, r2); in resource_do_test() 88 KUNIT_EXPECT_EQ_MSG(test, r->start, exp_r->start, "Start elements are not equal"); in resource_do_test() 89 KUNIT_EXPECT_EQ_MSG(test, r->end, exp_r->end, "End elements are not equal"); in resource_do_test() 92 static void resource_do_union_test(struct kunit *test, struct result *r) in resource_do_union_test() argument 99 resource_do_test(test, ret, &result, r->ret, &r->r, r->r1, r->r2); in resource_do_union_test() 103 resource_do_test(test, ret, &result, r->ret, &r->r, r->r2, r->r1); in resource_do_union_test() 106 static void resource_test_union(struct kunit *test) in resource_test_union() argument 112 resource_do_union_test(test, &r[i]); in resource_test_union() 116 static void resource_do_intersection_test(struct kunit *test, struct result *r) in resource_do_intersection_test() argument [all …]
|
/kernel/kcsan/ |
D | kcsan_test.c | 35 #define KCSAN_TEST_REQUIRES(test, cond) do { \ argument 37 kunit_skip((test), "Test requires: " #cond); \ 525 static void test_barrier_nothreads(struct kunit *test) in test_barrier_nothreads() argument 535 KCSAN_TEST_REQUIRES(test, reorder_access != NULL); in test_barrier_nothreads() 536 KCSAN_TEST_REQUIRES(test, IS_ENABLED(CONFIG_SMP)); in test_barrier_nothreads() 543 KUNIT_EXPECT_EQ_MSG(test, reorder_access->size, \ in test_barrier_nothreads() 564 KUNIT_ASSERT_EQ(test, reorder_access->size, sizeof(test_var)); in test_barrier_nothreads() 713 static void test_basic(struct kunit *test) in test_basic() argument 735 KUNIT_EXPECT_TRUE(test, match_expect); in test_basic() 736 KUNIT_EXPECT_FALSE(test, match_never); in test_basic() [all …]
|
D | .kunitconfig | 11 # Need some level of concurrency to test a concurrency sanitizer. 21 # This prevents the test from timing out on many setups. Feel free to remove 22 # (or alter) this, in conjunction with setting a different test timeout with,
|
/kernel/time/ |
D | time_test.c | 53 static void time64_to_tm_test_date_range(struct kunit *test) in time64_to_tm_test_date_range() argument 79 KUNIT_ASSERT_EQ_MSG(test, year - 1900, result.tm_year, FAIL_MSG); in time64_to_tm_test_date_range() 80 KUNIT_ASSERT_EQ_MSG(test, month - 1, result.tm_mon, FAIL_MSG); in time64_to_tm_test_date_range() 81 KUNIT_ASSERT_EQ_MSG(test, mdday, result.tm_mday, FAIL_MSG); in time64_to_tm_test_date_range() 82 KUNIT_ASSERT_EQ_MSG(test, yday, result.tm_yday, FAIL_MSG); in time64_to_tm_test_date_range()
|
D | Kconfig | 68 tristate "KUnit test for kernel/time functions" if !KUNIT_ALL_TESTS 72 Enable this option to test RTC library functions. 171 Without the full dynticks, there is no way to test the support
|
D | timekeeping.c | 1194 static bool cycle_between(u64 before, u64 test, u64 after) in cycle_between() argument 1196 if (test > before && test < after) in cycle_between() 1198 if (test < before && before > after) in cycle_between()
|
/kernel/trace/ |
D | trace_events_trigger.c | 568 struct event_trigger_data *test; in register_trigger() local 573 list_for_each_entry(test, &file->triggers, list) { in register_trigger() 574 if (test->cmd_ops->trigger_type == data->cmd_ops->trigger_type) { in register_trigger() 610 struct event_trigger_data *test, in unregister_trigger() argument 618 if (iter->cmd_ops->trigger_type == test->cmd_ops->trigger_type) { in unregister_trigger() 1140 bool is_named_trigger(struct event_trigger_data *test) in is_named_trigger() argument 1145 if (test == data) in is_named_trigger() 1184 struct event_trigger_data *test; in __pause_named_trigger() local 1186 list_for_each_entry(test, &named_triggers, named_list) { in __pause_named_trigger() 1187 if (strcmp(test->name, data->name) == 0) { in __pause_named_trigger() [all …]
|
D | trace_events_hist.c | 1130 struct event_trigger_data *test; in find_var() local 1139 list_for_each_entry(test, &file->triggers, list) { in find_var() 1140 if (test->cmd_ops->trigger_type == ETT_EVENT_HIST) { in find_var() 1141 test_data = test->private_data; in find_var() 1186 struct event_trigger_data *test; in find_file_var() local 1191 list_for_each_entry(test, &file->triggers, list) { in find_file_var() 1192 if (test->cmd_ops->trigger_type == ETT_EVENT_HIST) { in find_file_var() 1193 test_data = test->private_data; in find_file_var() 2815 struct event_trigger_data *test; in find_trigger_filter() local 2819 list_for_each_entry(test, &file->triggers, list) { in find_trigger_filter() [all …]
|
D | Kconfig | 544 into the C conditionals to test which path a branch takes. 857 This option creates a test to stress the ring buffer and benchmark it. 952 bool "Perform a startup test on ftrace" 966 This option performs a test on all trace events in the system. 980 TBD - enable a way to actually call the syscalls as we test their 998 bool "Ring buffer startup self test" 1001 Run a simple self test on the ring buffer on boot up. Late in the 1002 kernel boot sequence, the test will start that kicks off 1006 to the ring buffer, to test/stress the nesting ability. 1010 The test runs for 10 seconds. This will slow your boot time [all …]
|
D | trace_events_filter_test.h | 3 #define TRACE_SYSTEM test
|
D | trace.h | 1583 struct event_trigger_data *test, 1594 extern bool is_named_trigger(struct event_trigger_data *test);
|
/kernel/bpf/ |
D | syscall.c | 3626 #define BPF_PROG_TEST_RUN_LAST_FIELD test.batch_size 3637 if ((attr->test.ctx_size_in && !attr->test.ctx_in) || in bpf_prog_test_run() 3638 (!attr->test.ctx_size_in && attr->test.ctx_in)) in bpf_prog_test_run() 3641 if ((attr->test.ctx_size_out && !attr->test.ctx_out) || in bpf_prog_test_run() 3642 (!attr->test.ctx_size_out && attr->test.ctx_out)) in bpf_prog_test_run() 3645 prog = bpf_prog_get(attr->test.prog_fd); in bpf_prog_test_run() 5141 if (attr->test.data_in || attr->test.data_out || in kern_sys_bpf() 5142 attr->test.ctx_out || attr->test.duration || in kern_sys_bpf() 5143 attr->test.repeat || attr->test.flags) in kern_sys_bpf() 5146 prog = bpf_prog_get_type(attr->test.prog_fd, BPF_PROG_TYPE_SYSCALL); in kern_sys_bpf() [all …]
|
/kernel/module/ |
D | sysfs.c | 308 if (!attr->test || attr->test(mod)) { in module_add_modinfo_attrs()
|
D | main.c | 524 .test = modinfo_##field##_exists, \
|
/kernel/trace/rv/ |
D | Kconfig | 48 The model is borken on purpose: it serves to test reactors.
|
/kernel/sched/ |
D | rt.c | 1669 bool test; in select_task_rq_rt() local 1718 test = curr && in select_task_rq_rt() 1731 if (test || !rt_task_fits_cpu(p, cpu)) { in select_task_rq_rt() 1738 if (!test && target != -1 && !rt_task_fits_cpu(p, target)) in select_task_rq_rt()
|
/kernel/power/ |
D | Kconfig | 222 linked, ensuring that it's available when this test runs.
|
/kernel/rcu/ |
D | Kconfig | 158 itself, small RCU_FANOUT values allow you to test large-system
|