Searched refs:test (Results 1 - 25 of 680) sorted by relevance

1234567891011>>

/linux-master/tools/build/feature/
H A Dtest-clang-bpf-co-re.c4 struct test { struct
9 volatile struct test global_value_for_test = {};
/linux-master/lib/kunit/
H A Dkunit-example-test.c3 * Example KUnit test to show how to use KUnit.
9 #include <kunit/test.h>
13 * This is the most fundamental element of KUnit, the test case. A test case
15 * any expectations or assertions are not met, the test fails; otherwise, the
16 * test passes.
18 * In KUnit, a test case is just a function with the signature
20 * information about the current test.
22 static void example_simple_test(struct kunit *test) argument
26 * to test
37 example_test_init(struct kunit *test) argument
48 example_test_exit(struct kunit *test) argument
78 example_skip_test(struct kunit *test) argument
93 example_mark_skipped_test(struct kunit *test) argument
108 example_all_expect_macros_test(struct kunit *test) argument
184 example_static_stub_test(struct kunit *test) argument
208 example_static_stub_using_fn_ptr_test(struct kunit *test) argument
243 example_params_test(struct kunit *test) argument
261 example_priv_test(struct kunit *test) argument
275 example_slow_test(struct kunit *test) argument
348 example_init_test(struct kunit *test) argument
[all...]
H A Dkunit-test.c3 * KUnit test for core test infrastructure.
9 #include <kunit/test.h>
10 #include <kunit/test-bug.h>
25 struct kunit *test = data; local
26 struct kunit_try_catch_test_context *ctx = test->priv;
33 struct kunit *test = data; local
35 KUNIT_FAIL(test, "Catch should not be called\n");
38 static void kunit_test_try_catch_successful_try_no_catch(struct kunit *test) argument
40 struct kunit_try_catch_test_context *ctx = test
54 struct kunit *test = data; local
64 struct kunit *test = data; local
70 kunit_test_try_catch_unsuccessful_try_does_catch(struct kunit *test) argument
84 kunit_try_catch_test_init(struct kunit *test) argument
117 struct kunit test; member in struct:kunit_test_resource_context
139 kunit_resource_test_init_resources(struct kunit *test) argument
148 kunit_resource_test_alloc_resource(struct kunit *test) argument
170 kunit_resource_instance_match(struct kunit *test, struct kunit_resource *res, void *match_data) argument
185 kunit_resource_test_destroy_resource(struct kunit *test) argument
206 kunit_resource_test_remove_resource(struct kunit *test) argument
240 kunit_resource_test_cleanup_resources(struct kunit *test) argument
327 kunit_resource_test_proper_free_ordering(struct kunit *test) argument
360 kunit_resource_test_static(struct kunit *test) argument
375 kunit_resource_test_named(struct kunit *test) argument
417 kunit_resource_test_action(struct kunit *test) argument
436 kunit_resource_test_remove_action(struct kunit *test) argument
447 kunit_resource_test_release_action(struct kunit *test) argument
475 kunit_resource_test_action_ordering(struct kunit *test) argument
493 kunit_resource_test_init(struct kunit *test) argument
507 kunit_resource_test_exit(struct kunit *test) argument
547 kunit_log_test(struct kunit *test) argument
583 kunit_log_newline_test(struct kunit *test) argument
599 kunit_log_test(struct kunit *test) argument
604 kunit_log_newline_test(struct kunit *test) argument
621 kunit_status_set_failure_test(struct kunit *test) argument
632 kunit_status_mark_skipped_test(struct kunit *test) argument
661 kunit_current_test(struct kunit *test) argument
670 kunit_current_fail_test(struct kunit *test) argument
699 kunit_device_test(struct kunit *test) argument
717 kunit_device_cleanup_test(struct kunit *test) argument
744 struct kunit *test = kunit_get_current_test(); local
753 struct kunit *test = kunit_get_current_test(); local
760 kunit_device_driver_test(struct kunit *test) argument
[all...]
H A Dstring-stream-test.c3 * KUnit test for struct string_stream.
10 #include <kunit/test.h>
38 static char *get_concatenated_string(struct kunit *test, struct string_stream *stream) argument
42 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, str);
43 kunit_add_action(test, kfree_wrapper, (void *)str);
49 static void string_stream_managed_init_test(struct kunit *test) argument
54 stream = kunit_alloc_string_stream(test, GFP_KERNEL);
55 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, stream);
57 KUNIT_EXPECT_EQ(test, stream->length, 0);
58 KUNIT_EXPECT_TRUE(test, list_empt
65 string_stream_unmanaged_init_test(struct kunit *test) argument
105 string_stream_managed_free_test(struct kunit *test) argument
128 string_stream_resource_free_test(struct kunit *test) argument
171 string_stream_line_add_test(struct kunit *test) argument
224 string_stream_variable_length_line_test(struct kunit *test) argument
280 string_stream_append_test(struct kunit *test) argument
348 string_stream_append_auto_newline_test(struct kunit *test) argument
387 string_stream_append_empty_string_test(struct kunit *test) argument
410 string_stream_no_auto_newline_test(struct kunit *test) argument
433 string_stream_auto_newline_test(struct kunit *test) argument
463 string_stream_performance_test(struct kunit *test) argument
510 string_stream_test_init(struct kunit *test) argument
[all...]
/linux-master/drivers/gpu/drm/tests/
H A Ddrm_format_test.c8 #include <kunit/test.h>
12 static void drm_test_format_block_width_invalid(struct kunit *test) argument
16 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, 0), 0);
17 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, -1), 0);
18 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, 1), 0);
21 static void drm_test_format_block_width_one_plane(struct kunit *test) argument
25 KUNIT_ASSERT_NOT_NULL(test, info);
27 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, 0), 1);
28 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, 1), 0);
29 KUNIT_EXPECT_EQ(test, drm_format_info_block_widt
32 drm_test_format_block_width_two_plane(struct kunit *test) argument
44 drm_test_format_block_width_three_plane(struct kunit *test) argument
57 drm_test_format_block_width_tiled(struct kunit *test) argument
68 drm_test_format_block_height_invalid(struct kunit *test) argument
77 drm_test_format_block_height_one_plane(struct kunit *test) argument
88 drm_test_format_block_height_two_plane(struct kunit *test) argument
100 drm_test_format_block_height_three_plane(struct kunit *test) argument
113 drm_test_format_block_height_tiled(struct kunit *test) argument
124 drm_test_format_min_pitch_invalid(struct kunit *test) argument
133 drm_test_format_min_pitch_one_plane_8bpp(struct kunit *test) argument
156 drm_test_format_min_pitch_one_plane_16bpp(struct kunit *test) argument
179 drm_test_format_min_pitch_one_plane_24bpp(struct kunit *test) argument
202 drm_test_format_min_pitch_one_plane_32bpp(struct kunit *test) argument
225 drm_test_format_min_pitch_two_plane(struct kunit *test) argument
260 drm_test_format_min_pitch_three_plane_8bpp(struct kunit *test) argument
307 drm_test_format_min_pitch_tiled(struct kunit *test) argument
[all...]
H A Ddrm_cmdline_parser_test.c7 #include <kunit/test.h>
14 static void drm_test_cmdline_force_e_only(struct kunit *test) argument
19 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline,
21 KUNIT_EXPECT_FALSE(test, mode.specified);
22 KUNIT_EXPECT_FALSE(test, mode.refresh_specified);
23 KUNIT_EXPECT_FALSE(test, mode.bpp_specified);
25 KUNIT_EXPECT_FALSE(test, mode.rb);
26 KUNIT_EXPECT_FALSE(test, mode.cvt);
27 KUNIT_EXPECT_FALSE(test, mode.interlace);
28 KUNIT_EXPECT_FALSE(test, mod
32 drm_test_cmdline_force_D_only_not_digital(struct kunit *test) argument
54 drm_test_cmdline_force_D_only_hdmi(struct kunit *test) argument
76 drm_test_cmdline_force_D_only_dvi(struct kunit *test) argument
94 drm_test_cmdline_force_d_only(struct kunit *test) argument
112 drm_test_cmdline_res(struct kunit *test) argument
134 drm_test_cmdline_res_vesa(struct kunit *test) argument
156 drm_test_cmdline_res_vesa_rblank(struct kunit *test) argument
178 drm_test_cmdline_res_rblank(struct kunit *test) argument
200 drm_test_cmdline_res_bpp(struct kunit *test) argument
223 drm_test_cmdline_res_refresh(struct kunit *test) argument
246 drm_test_cmdline_res_bpp_refresh(struct kunit *test) argument
270 drm_test_cmdline_res_bpp_refresh_interlaced(struct kunit *test) argument
294 drm_test_cmdline_res_bpp_refresh_margins(struct kunit *test) argument
318 drm_test_cmdline_res_bpp_refresh_force_off(struct kunit *test) argument
342 drm_test_cmdline_res_bpp_refresh_force_on(struct kunit *test) argument
366 drm_test_cmdline_res_bpp_refresh_force_on_analog(struct kunit *test) argument
390 drm_test_cmdline_res_bpp_refresh_force_on_digital(struct kunit *test) argument
417 drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on(struct kunit *test) argument
441 drm_test_cmdline_res_margins_force_on(struct kunit *test) argument
463 drm_test_cmdline_res_vesa_margins(struct kunit *test) argument
485 drm_test_cmdline_name(struct kunit *test) argument
497 drm_test_cmdline_name_bpp(struct kunit *test) argument
512 drm_test_cmdline_name_option(struct kunit *test) argument
524 drm_test_cmdline_name_bpp_option(struct kunit *test) argument
538 drm_test_cmdline_rotate_0(struct kunit *test) argument
561 drm_test_cmdline_rotate_90(struct kunit *test) argument
584 drm_test_cmdline_rotate_180(struct kunit *test) argument
607 drm_test_cmdline_rotate_270(struct kunit *test) argument
630 drm_test_cmdline_hmirror(struct kunit *test) argument
653 drm_test_cmdline_vmirror(struct kunit *test) argument
676 drm_test_cmdline_margin_options(struct kunit *test) argument
703 drm_test_cmdline_multiple_options(struct kunit *test) argument
726 drm_test_cmdline_bpp_extra_and_option(struct kunit *test) argument
750 drm_test_cmdline_extra_and_option(struct kunit *test) argument
772 drm_test_cmdline_freestanding_options(struct kunit *test) argument
795 drm_test_cmdline_freestanding_force_e_and_options(struct kunit *test) argument
818 drm_test_cmdline_panel_orientation(struct kunit *test) argument
843 drm_test_cmdline_invalid(struct kunit *test) argument
955 drm_test_cmdline_tv_options(struct kunit *test) argument
[all...]
H A Ddrm_modes_test.c3 * Kunit test for drm_modes functions
10 #include <kunit/test.h>
19 static int drm_test_modes_init(struct kunit *test) argument
23 priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL);
24 KUNIT_ASSERT_NOT_NULL(test, priv);
26 priv->dev = drm_kunit_helper_alloc_device(test);
27 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, priv->dev);
29 priv->drm = __drm_kunit_helper_alloc_drm_device(test, priv->dev,
32 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, priv->drm);
34 test
39 drm_test_modes_analog_tv_ntsc_480i(struct kunit *test) argument
69 drm_test_modes_analog_tv_ntsc_480i_inlined(struct kunit *test) argument
86 drm_test_modes_analog_tv_pal_576i(struct kunit *test) argument
116 drm_test_modes_analog_tv_pal_576i_inlined(struct kunit *test) argument
[all...]
H A Ddrm_gem_shmem_test.c3 * KUnit test suite for GEM objects backed by shmem buffers
14 #include <kunit/test.h>
51 * Test creating a shmem GEM object backed by shmem buffer. The test
56 static void drm_gem_shmem_test_obj_create(struct kunit *test) argument
58 struct drm_device *drm_dev = test->priv;
62 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, shmem);
63 KUNIT_EXPECT_EQ(test, shmem->base.size, TEST_SIZE);
64 KUNIT_EXPECT_NOT_NULL(test, shmem->base.filp);
65 KUNIT_EXPECT_NOT_NULL(test, shmem->base.funcs);
72 * via a DMA-BUF. The test cas
76 drm_gem_shmem_test_obj_create_private(struct kunit *test) argument
130 drm_gem_shmem_test_pin_pages(struct kunit *test) argument
163 drm_gem_shmem_test_vmap(struct kunit *test) argument
199 drm_gem_shmem_test_get_pages_sgt(struct kunit *test) argument
238 drm_gem_shmem_test_get_sg_table(struct kunit *test) argument
273 drm_gem_shmem_test_madvise(struct kunit *test) argument
308 drm_gem_shmem_test_purge(struct kunit *test) argument
340 drm_gem_shmem_test_init(struct kunit *test) argument
[all...]
/linux-master/lib/
H A Dis_signed_type_kunit.c7 #include <kunit/test.h>
19 static void is_signed_type_test(struct kunit *test) argument
21 KUNIT_EXPECT_EQ(test, is_signed_type(bool), false);
22 KUNIT_EXPECT_EQ(test, is_signed_type(signed char), true);
23 KUNIT_EXPECT_EQ(test, is_signed_type(unsigned char), false);
24 KUNIT_EXPECT_EQ(test, is_signed_type(char), false);
25 KUNIT_EXPECT_EQ(test, is_signed_type(int), true);
26 KUNIT_EXPECT_EQ(test, is_signed_type(unsigned int), false);
27 KUNIT_EXPECT_EQ(test, is_signed_type(long), true);
28 KUNIT_EXPECT_EQ(test, is_signed_typ
[all...]
H A Dstrcat_kunit.c8 #include <kunit/test.h>
13 static void strcat_test(struct kunit *test) argument
19 KUNIT_EXPECT_EQ(test, strlen(dest), 0);
21 KUNIT_EXPECT_TRUE(test, strcat(dest, "") == dest);
22 KUNIT_EXPECT_STREQ(test, dest, "");
24 KUNIT_EXPECT_TRUE(test, strcat(dest, "four\000123") == dest);
25 KUNIT_EXPECT_STREQ(test, dest, "four");
26 KUNIT_EXPECT_EQ(test, dest[5], '\0');
28 KUNIT_EXPECT_TRUE(test, strcat(dest, "AB") == dest);
29 KUNIT_EXPECT_STREQ(test, des
32 strncat_test(struct kunit *test) argument
59 strlcat_test(struct kunit *test) argument
[all...]
H A Dstrscpy_kunit.c8 #include <kunit/test.h>
12 * tc() - Run a specific test case.
25 static void tc(struct kunit *test, char *src, int count, int expected, argument
36 KUNIT_ASSERT_TRUE_MSG(test, src != NULL,
40 /* Future proofing test suite, validate args */
44 KUNIT_ASSERT_LE_MSG(test, count, max_count,
46 KUNIT_EXPECT_LE_MSG(test, expected, max_expected,
51 KUNIT_ASSERT_EQ(test, written, expected);
54 KUNIT_ASSERT_EQ_MSG(test, 0, strncmp(buf, src, count - 1),
56 KUNIT_ASSERT_EQ_MSG(test, bu
82 strscpy_test(struct kunit *test) argument
[all...]
H A Dtest_bits.c6 #include <kunit/test.h>
10 static void genmask_test(struct kunit *test) argument
12 KUNIT_EXPECT_EQ(test, 1ul, GENMASK(0, 0));
13 KUNIT_EXPECT_EQ(test, 3ul, GENMASK(1, 0));
14 KUNIT_EXPECT_EQ(test, 6ul, GENMASK(2, 1));
15 KUNIT_EXPECT_EQ(test, 0xFFFFFFFFul, GENMASK(31, 0));
27 static void genmask_ull_test(struct kunit *test) argument
29 KUNIT_EXPECT_EQ(test, 1ull, GENMASK_ULL(0, 0));
30 KUNIT_EXPECT_EQ(test, 3ull, GENMASK_ULL(1, 0));
31 KUNIT_EXPECT_EQ(test,
42 genmask_input_check_test(struct kunit *test) argument
[all...]
H A Dcpumask_kunit.c8 #include <kunit/test.h>
16 #define EXPECT_FOR_EACH_CPU_EQ(test, mask) \
23 KUNIT_EXPECT_EQ_MSG((test), mask_weight, iter, MASK_MSG(mask)); \
26 #define EXPECT_FOR_EACH_CPU_OP_EQ(test, op, mask1, mask2) \
36 KUNIT_EXPECT_EQ((test), weight, iter); \
39 #define EXPECT_FOR_EACH_CPU_WRAP_EQ(test, mask) \
46 KUNIT_EXPECT_EQ_MSG((test), mask_weight, iter, MASK_MSG(mask)); \
49 #define EXPECT_FOR_EACH_CPU_BUILTIN_EQ(test, name) \
55 KUNIT_EXPECT_EQ_MSG((test), mask_weight, iter, MASK_MSG(cpu_##name##_mask)); \
62 static void test_cpumask_weight(struct kunit *test) argument
73 test_cpumask_first(struct kunit *test) argument
83 test_cpumask_last(struct kunit *test) argument
91 test_cpumask_next(struct kunit *test) argument
103 test_cpumask_iterators(struct kunit *test) argument
117 test_cpumask_iterators_builtin(struct kunit *test) argument
130 test_cpumask_init(struct kunit *test) argument
[all...]
/linux-master/tools/perf/arch/x86/include/
H A Darch-tests.h8 int test__rdpmc(struct test_suite *test, int subtest);
10 int test__insn_x86(struct test_suite *test, int subtest);
12 int test__intel_pt_pkt_decoder(struct test_suite *test, int subtest);
13 int test__intel_pt_hybrid_compat(struct test_suite *test, int subtest);
14 int test__bp_modify(struct test_suite *test, int subtest);
15 int test__x86_sample_parsing(struct test_suite *test, int subtest);
16 int test__amd_ibs_via_core_pmu(struct test_suite *test, int subtest);
17 int test__hybrid(struct test_suite *test, int subtest);
/linux-master/drivers/gpu/drm/xe/tests/
H A Dxe_bo_test.h11 void xe_ccs_migrate_kunit(struct kunit *test);
12 void xe_bo_evict_kunit(struct kunit *test);
H A Dxe_mocs_test.h11 void xe_live_mocs_kernel_kunit(struct kunit *test);
12 void xe_live_mocs_reset_kunit(struct kunit *test);
H A Dxe_kunit_helpers.h13 struct xe_device *xe_kunit_helper_alloc_xe_device(struct kunit *test,
15 int xe_kunit_helper_xe_device_test_init(struct kunit *test);
H A Dxe_guc_db_mgr_test.c6 #include <kunit/test.h>
11 static int guc_dbm_test_init(struct kunit *test) argument
15 xe_kunit_helper_xe_device_test_init(test);
16 dbm = &xe_device_get_gt(test->priv, 0)->uc.guc.dbm;
19 test->priv = dbm;
23 static void test_empty(struct kunit *test) argument
25 struct xe_guc_db_mgr *dbm = test->priv;
27 KUNIT_ASSERT_EQ(test, xe_guc_db_mgr_init(dbm, 0), 0);
28 KUNIT_ASSERT_EQ(test, dbm->count, 0);
31 KUNIT_EXPECT_LT(test, xe_guc_db_mgr_reserve_id_locke
37 test_default(struct kunit *test) argument
59 test_size(struct kunit *test) argument
83 test_reuse(struct kunit *test) argument
111 test_range_overlap(struct kunit *test) argument
149 test_range_compact(struct kunit *test) argument
168 test_range_spare(struct kunit *test) argument
[all...]
/linux-master/drivers/firewire/
H A Duapi-test.c8 #include <kunit/test.h>
12 static void structure_layout_event_response(struct kunit *test) argument
16 KUNIT_EXPECT_EQ(test, 20, sizeof(struct fw_cdev_event_response));
19 KUNIT_EXPECT_EQ(test, 24, sizeof(struct fw_cdev_event_response));
22 KUNIT_EXPECT_EQ(test, 0, offsetof(struct fw_cdev_event_response, closure));
23 KUNIT_EXPECT_EQ(test, 8, offsetof(struct fw_cdev_event_response, type));
24 KUNIT_EXPECT_EQ(test, 12, offsetof(struct fw_cdev_event_response, rcode));
25 KUNIT_EXPECT_EQ(test, 16, offsetof(struct fw_cdev_event_response, length));
26 KUNIT_EXPECT_EQ(test, 20, offsetof(struct fw_cdev_event_response, data));
30 static void structure_layout_event_request3(struct kunit *test) argument
49 structure_layout_event_response2(struct kunit *test) argument
63 structure_layout_event_phy_packet2(struct kunit *test) argument
[all...]
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dhelper_restricted.c11 struct test_helper_restricted *test; local
14 test = test_helper_restricted__open();
15 if (!ASSERT_OK_PTR(test, "open"))
18 prog_cnt = test->skeleton->prog_cnt;
21 struct bpf_program *prog = *test->skeleton->progs[j].prog;
26 err = test_helper_restricted__load(test);
29 test_helper_restricted__destroy(test);
/linux-master/drivers/mmc/host/
H A Dsdhci-of-aspeed-test.c4 #include <kunit/test.h>
6 static void aspeed_sdhci_phase_ddr52(struct kunit *test) argument
10 KUNIT_EXPECT_EQ(test, 0,
12 KUNIT_EXPECT_EQ(test, 0,
14 KUNIT_EXPECT_EQ(test, 1,
16 KUNIT_EXPECT_EQ(test, 1,
18 KUNIT_EXPECT_EQ(test, 2,
20 KUNIT_EXPECT_EQ(test, 3,
22 KUNIT_EXPECT_EQ(test, 14,
24 KUNIT_EXPECT_EQ(test, 1
49 aspeed_sdhci_phase_hs200(struct kunit *test) argument
[all...]
/linux-master/include/kunit/
H A Ddevice.h16 #include <kunit/test.h>
23 * @test: The test context object.
27 * This driver will automatically be cleaned up on test exit.
31 struct device_driver *kunit_driver_create(struct kunit *test, const char *name);
35 * @test: The test context object.
39 * and a corresponding driver. The device and driver will be cleaned up on test
44 * Return: a pointer to a struct device which will be cleaned up when the test
47 struct device *kunit_device_register(struct kunit *test, cons
[all...]
/linux-master/tools/perf/util/
H A Dperf-hooks-list.h3 PERF_HOOK(test)
/linux-master/tools/testing/scatterlist/
H A Dmain.c8 struct test { struct
30 static void fail(struct test *test, struct sg_table *st, const char *cond) argument
37 test->size, test->max_seg, test->expected_segments, st->nents,
40 printf("%u input PFNs:", test->num_pages);
41 for (i = 0; i < test->num_pages; i++)
42 printf(" %x", test->pfn[i]);
48 #define VALIDATE(cond, st, test) \
55 struct test *test, tests[] = { local
[all...]
/linux-master/drivers/hid/
H A Dhid-input-test.c8 #include <kunit/test.h>
10 static void hid_test_input_set_battery_charge_status(struct kunit *test) argument
15 dev = kunit_kzalloc(test, sizeof(*dev), GFP_KERNEL);
16 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dev);
19 KUNIT_EXPECT_FALSE(test, handled);
20 KUNIT_EXPECT_EQ(test, dev->battery_charge_status, POWER_SUPPLY_STATUS_UNKNOWN);
23 KUNIT_EXPECT_TRUE(test, handled);
24 KUNIT_EXPECT_EQ(test, dev->battery_charge_status, POWER_SUPPLY_STATUS_DISCHARGING);
27 KUNIT_EXPECT_TRUE(test, handled);
28 KUNIT_EXPECT_EQ(test, de
31 hid_test_input_get_battery_property(struct kunit *test) argument
[all...]

Completed in 678 milliseconds

1234567891011>>