/linux-master/tools/testing/selftests/resctrl/ |
H A D | cat_test.c | 3 * Cache Allocation Technology (CAT) test 18 * Minimum difference in LLC misses between a test with n+1 bits CBM to the 19 * test with n bits is MIN_DIFF_PERCENT_PER_BIT * (n - 1). With e.g. 5 vs 4 138 * @test: Test information structure 149 * each subsequent test which keeps reducing the size of the allocated cache 150 * portion. A single test flushes the buffer, reads it to warm up the cache, 154 * Return: 0 when the test was run, < 0 on error. 156 static int cat_test(const struct resctrl_test *test, argument 202 ret = write_schemata("", schemata, uparams->cpu, test->resource); 206 ret = write_schemata(param->ctrlgrp, schemata, uparams->cpu, test 237 cat_run_test(const struct resctrl_test *test, const struct user_params *uparams) argument 294 noncont_cat_run_test(const struct resctrl_test *test, const struct user_params *uparams) argument 359 noncont_cat_feature_check(const struct resctrl_test *test) argument [all...] |
H A D | mba_test.c | 3 * Memory Bandwidth Allocation (MBA) test 25 static int mba_setup(const struct resctrl_test *test, argument 45 ret = write_schemata(p->ctrlgrp, allocation_str, uparams->cpu, test->resource); 99 ksft_print_msg("At least one test failed\n"); 145 static int mba_run_test(const struct resctrl_test *test, const struct user_params *uparams) argument 159 ret = resctrl_val(test, uparams, uparams->benchmark_cmd, ¶m); 168 static bool mba_feature_check(const struct resctrl_test *test) argument 170 return test_resource_feature_check(test) &&
|
/linux-master/drivers/gpu/drm/vc4/tests/ |
H A D | vc4_mock_plane.c | 8 #include <kunit/test.h> 25 struct vc4_dummy_plane *vc4_dummy_plane(struct kunit *test, argument 41 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dummy_plane);
|
/linux-master/drivers/platform/chrome/ |
H A D | cros_ec_proto_test_util.h | 13 struct kunit *test; member in struct:ec_xfer_mock 34 struct ec_xfer_mock *cros_kunit_ec_xfer_mock_add(struct kunit *test, size_t size); 35 struct ec_xfer_mock *cros_kunit_ec_xfer_mock_addx(struct kunit *test,
|
/linux-master/lib/ |
H A D | test_hexdump.c | 68 int groupsize, char *test, 97 p = test; 114 } while (p < test + rs * 2 + rs / gs + 1); 128 char test[TEST_HEXDUMP_BUF_SIZE]; local 137 memset(test, FILL_CHAR, sizeof(test)); 138 test_hexdump_prepare_test(len, rowsize, groupsize, test, sizeof(test), 141 if (memcmp(test, real, TEST_HEXDUMP_BUF_SIZE)) { 144 pr_err("Expect: '%s'\n", test); 67 test_hexdump_prepare_test(size_t len, int rowsize, int groupsize, char *test, size_t testlen, bool ascii) argument 164 char test[TEST_HEXDUMP_BUF_SIZE]; local [all...] |
H A D | string_helpers_kunit.c | 7 #include <kunit/test.h> 14 static void test_string_check_buf(struct kunit *test, argument 20 KUNIT_ASSERT_EQ_MSG(test, q_real, q_test, "name:%s", name); 21 KUNIT_EXPECT_MEMEQ_MSG(test, out_test, out_real, q_test, 54 static void test_string_unescape(struct kunit *test, argument 59 char *in = kunit_kzalloc(test, q_real, GFP_KERNEL); 60 char *out_test = kunit_kzalloc(test, q_real, GFP_KERNEL); 61 char *out_real = kunit_kzalloc(test, q_real, GFP_KERNEL); 64 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, in); 65 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, out_tes 395 test_string_escape_overflow(struct kunit *test, const char *in, int p, unsigned int flags, const char *esc, int q_test, const char *name) argument 405 test_string_escape(struct kunit *test, const char *name, const struct test_string_2 *s2, unsigned int flags, const char *esc) argument 470 test_string_get_size_check(struct kunit *test, const char *units, const char *exp, char *res, const u64 size, const u64 blk_size) argument 496 __test_string_get_size_one(struct kunit *test, const u64 size, const u64 blk_size, const char *exp_result10, const char *exp_result2, enum string_size_units units, const char *cut) argument 523 __test_string_get_size(struct kunit *test, const u64 size, const u64 blk_size, const char *exp_result10, const char *exp_result2) argument 546 test_get_size(struct kunit *test) argument 566 test_upper_lower(struct kunit *test) argument 596 test_unescape(struct kunit *test) argument [all...] |
H A D | memcpy_kunit.c | 7 #include <kunit/test.h> 34 KUNIT_ASSERT_EQ_MSG(test, instance.data[i], v, \ 43 KUNIT_EXPECT_EQ_MSG(test, one.data[i], two.data[i], \ 47 kunit_info(test, "ok: " TEST_OP "() " name "\n"); \ 50 static void memcpy_test(struct kunit *test) argument 110 static void memmove_test(struct kunit *test) argument 192 KUNIT_ASSERT_EQ(test, larger_array[0], 0xAAu); 193 KUNIT_ASSERT_EQ(test, larger_array[256], 0x00); 194 KUNIT_ASSERT_NULL(test, 199 KUNIT_ASSERT_EQ(test, larger_arra 207 memset_test(struct kunit *test) argument 299 set_random_nonzero(struct kunit *test, u8 *byte) argument 310 init_large(struct kunit *test) argument 327 copy_large_test(struct kunit *test, bool use_memmove) argument 366 memcpy_large_test(struct kunit *test) argument 371 memmove_large_test(struct kunit *test) argument 395 inner_loop(struct kunit *test, int bytes, int d_off, int s_off) argument 458 memmove_overlap_test(struct kunit *test) argument [all...] |
/linux-master/net/core/ |
H A D | net_test.c | 3 #include <kunit/test.h> 147 static void gso_test_func(struct kunit *test) argument 156 tcase = test->param_value; 159 KUNIT_ASSERT_NOT_NULL(test, page); 161 KUNIT_ASSERT_NOT_NULL(test, skb); 170 KUNIT_ASSERT_NOT_NULL(test, page); 178 KUNIT_ASSERT_LE(test, pg_off, PAGE_SIZE); 193 KUNIT_ASSERT_NOT_NULL(test, page); 198 KUNIT_ASSERT_NOT_NULL(test, frag_skb); 231 KUNIT_FAIL(test, "seg 352 ip_tunnel_flags_test_run(struct kunit *test) argument [all...] |
/linux-master/drivers/spi/ |
H A D | spi-loopback-test.c | 3 * linux/drivers/spi/spi-loopback-test.c 7 * Loopback test driver to test several typical spi_message conditions 23 #include "spi-test.h" 48 "if set controller will be asked to enable test loop mode. " \ 62 /* run only a specific test */ 66 "only run the test with this number (0-based !)"); 385 { .compatible = "linux,spi-loopback-test", }, 398 .name = "spi-loopback-test", 407 MODULE_DESCRIPTION("test spi_drive 572 spi_test_check_elapsed_time(struct spi_device *spi, struct spi_test *test) argument 707 spi_test_fill_pattern(struct spi_device *spi, struct spi_test *test) argument 791 _spi_test_run_iter(struct spi_device *spi, struct spi_test *test, void *tx, void *rx) argument 861 struct spi_test test; local 933 spi_test_execute_msg(struct spi_device *spi, struct spi_test *test, void *tx, void *rx) argument 1006 spi_test_run_test(struct spi_device *spi, const struct spi_test *test, void *tx, void *rx) argument 1074 struct spi_test *test; local [all...] |
H A D | spi-test.h | 3 * linux/drivers/spi/spi-test.h 38 * @description: description of the test 47 * either to add some custom filters for a specific test 53 * test also for error conditions 77 int (*run_test)(struct spi_device *spi, struct spi_test *test, 79 int (*execute_msg)(struct spi_device *spi, struct spi_test *test, 108 const struct spi_test *test, 113 struct spi_test *test, 122 /* some of the default @spi_transfer.len to test, terminated by a -1 */ 127 /* the default alignment to test */ [all...] |
/linux-master/lib/kunit/ |
H A D | debugfs.h | 9 #include <kunit/test.h>
|
/linux-master/tools/perf/arch/arm/tests/ |
H A D | vectors-page.c | 12 static int test__vectors_page(struct test_suite *test __maybe_unused, int subtest __maybe_unused)
|
/linux-master/tools/perf/tests/ |
H A D | python-use.c | 3 * Just test if we can load the python binding. 12 static int test__python_use(struct test_suite *test __maybe_unused, int subtest __maybe_unused) 21 pr_debug("python usage test: \"%s\"\n", cmd);
|
/linux-master/mm/damon/ |
H A D | sysfs-test.h | 13 #include <kunit/test.h> 41 static void damon_sysfs_test_set_targets(struct kunit *test) argument 60 KUNIT_EXPECT_EQ(test, 1u, nr_damon_targets(ctx)); 65 KUNIT_EXPECT_EQ(test, 1u, nr_damon_targets(ctx));
|
/linux-master/net/wireless/tests/ |
H A D | util.h | 34 struct kunit *test; member in struct:t_wiphy_priv 43 #define T_WIPHY(test, ctx) ({ \ 45 kunit_alloc_resource(test, t_wiphy_init, \ 49 KUNIT_ASSERT_NOT_NULL(test, __wiphy); \
|
/linux-master/include/kunit/ |
H A D | try-catch.h | 21 * @test: The test case that is currently being executed. 22 * @try_result: Contains any errno obtained while running test case. 23 * @try: The function, the test case, to attempt to run. 34 * assertions. Assertions allow stating a precondition for a test simplifying 35 * how test cases are written and presented. 39 * useful when you look at a test case as a logical statement about some piece 40 * of code, where assertions are the premises for the test case, and the 46 struct kunit *test; member in struct:kunit_try_catch
|
/linux-master/arch/arc/kernel/ |
H A D | jump_label.c | 100 #define SELFTEST_MSG "ARC: instruction generation self-test: " 108 static __init int branch_gen_test(const struct arc_gen_branch_testdata *test) argument 112 instr_got = arc_gen_branch(test->pc, test->target_address); 113 if (instr_got == test->expected_instr) 117 test->pc, test->target_address, 118 test->expected_instr, instr_got);
|
/linux-master/drivers/net/wireless/ti/wl12xx/ |
H A D | cmd.h | 20 struct wl1271_cmd_test_header test; member in struct:wl1271_general_parms_cmd 35 struct wl1271_cmd_test_header test; member in struct:wl128x_general_parms_cmd 50 struct wl1271_cmd_test_header test; member in struct:wl1271_radio_parms_cmd 66 struct wl1271_cmd_test_header test; member in struct:wl128x_radio_parms_cmd 85 struct wl1271_cmd_test_header test; member in struct:wl1271_ext_radio_parms_cmd
|
/linux-master/arch/x86/um/os-Linux/ |
H A D | task_size.c | 81 unsigned long test, original; local 124 test = bottom + (top - bottom) / 2; 125 if (page_ok(test)) 126 bottom = test; 128 top = test;
|
/linux-master/drivers/net/wireless/intel/iwlwifi/mvm/tests/ |
H A D | scan.c | 9 #include <kunit/test.h> 78 static void test_acs_average_db(struct kunit *test) argument 80 const struct acs_average_db_case *params = test->param_value; 87 KUNIT_ASSERT_EQ(test, 95 KUNIT_ASSERT_EQ(test,
|
/linux-master/kernel/ |
H A D | resource_kunit.c | 6 #include <kunit/test.h> 83 static void resource_do_test(struct kunit *test, bool ret, struct resource *r, argument 87 KUNIT_EXPECT_EQ_MSG(test, ret, exp_ret, "Resources %pR %pR", r1, r2); 88 KUNIT_EXPECT_EQ_MSG(test, r->start, exp_r->start, "Start elements are not equal"); 89 KUNIT_EXPECT_EQ_MSG(test, r->end, exp_r->end, "End elements are not equal"); 92 static void resource_do_union_test(struct kunit *test, struct result *r) argument 99 resource_do_test(test, ret, &result, r->ret, &r->r, r->r1, r->r2); 103 resource_do_test(test, ret, &result, r->ret, &r->r, r->r2, r->r1); 106 static void resource_test_union(struct kunit *test) argument 112 resource_do_union_test(test, 116 resource_do_intersection_test(struct kunit *test, struct result *r) argument 130 resource_test_intersection(struct kunit *test) argument [all...] |
/linux-master/tools/testing/selftests/bpf/ |
H A D | test_verifier.c | 92 /* If specified, test engine looks for this sequence of 94 * test rewrites applied by verifier. Use values 96 * fields if content does not matter. The test case fails if 104 /* If specified, test engine applies same pattern matching 106 * matched test case is marked as failed. 192 /* test: {skb->data[0], vlan_push} x 51 + {skb->data[0], vlan_pop} x 51 */ 286 /* test the sequence of 8k jumps */ 293 /* test to check that the long sequence of jumps is acceptable */ 312 /* test the sequence of 8k jumps in inner most function (function depth 8)*/ 324 /* test t 789 load_btf_for_test(struct bpf_test *test) argument 1011 do_test_fixup(struct bpf_test *test, enum bpf_prog_type prog_type, struct bpf_insn *prog, int *map_fds, int *fd_array) argument 1465 check_xlated_program(struct bpf_test *test, int fd_prog) argument 1513 do_test_single(struct bpf_test *test, bool unpriv, int *passes, int *errors) argument 1748 test_as_unpriv(struct bpf_test *test) argument 1779 struct bpf_test *test = &tests[i]; local [all...] |
/linux-master/fs/ext4/ |
H A D | inode-test.c | 3 * KUnit test of ext4 inode that verify the seconds part of [a/c/m] 7 #include <kunit/test.h> 222 static time64_t get_32bit_time(const struct timestamp_expectation * const test) argument 224 if (test->msb_set) { 225 if (test->lower_bound) 231 if (test->lower_bound) 241 static void inode_test_xtimestamp_decoding(struct kunit *test) argument 246 (struct timestamp_expectation *)(test->param_value); 252 KUNIT_EXPECT_EQ_MSG(test, 260 KUNIT_EXPECT_EQ_MSG(test, [all...] |
/linux-master/drivers/gpu/drm/tests/ |
H A D | drm_dp_mst_helper_test.c | 8 #include <kunit/test.h> 55 static void drm_test_dp_mst_calc_pbn_mode(struct kunit *test) argument 57 const struct drm_dp_mst_calc_pbn_mode_test *params = test->param_value; 59 KUNIT_EXPECT_EQ(test, drm_dp_calc_pbn_mode(params->clock, params->bpp << 4), 199 static void drm_test_dp_mst_calc_pbn_div(struct kunit *test) argument 201 const struct drm_dp_mst_calc_pbn_div_test *params = test->param_value; 202 /* mgr->dev is only needed by drm_dbg_kms(), but it's not called for the test cases. */ 203 struct drm_dp_mst_topology_mgr *mgr = test->priv; 205 KUNIT_EXPECT_EQ(test, drm_dp_get_vc_payload_bw(mgr, params->link_rate, params->lane_count).full, 505 struct kunit *test local 510 drm_test_dp_mst_sideband_msg_req_decode(struct kunit *test) argument 571 drm_dp_mst_helper_tests_init(struct kunit *test) argument [all...] |
/linux-master/tools/testing/selftests/x86/ |
H A D | lam.c | 23 # error This test is 64-bit only 37 /* Specified test function bits */ 64 /* Pasid test define */ 77 int (*test_func)(struct testcases *test); 260 int handle_max_bits(struct testcases *test) argument 277 * @return 0: Pass test. 1: Get failure during test 2: Get SIGSEGV 279 static int handle_malloc(struct testcases *test) argument 284 if (test->later == 0 && test 311 handle_mmap(struct testcases *test) argument 347 handle_syscall(struct testcases *test) argument 634 handle_uring(struct testcases *test) argument 652 fork_test(struct testcases *test) argument 672 handle_execve(struct testcases *test) argument 708 handle_inheritance(struct testcases *test) argument 745 struct testcases *test = arg; local 750 handle_thread(struct testcases *test) argument 785 handle_thread_enable(struct testcases *test) argument 807 run_test(struct testcases *test, int count) argument 1078 handle_pasid(struct testcases *test) argument [all...] |