/tools/perf/tests/ |
D | tests.h | 30 struct test { struct 32 int (*func)(struct test *test, int subtest); argument 44 int test__vmlinux_matches_kallsyms(struct test *test, int subtest); argument 45 int test__openat_syscall_event(struct test *test, int subtest); 46 int test__openat_syscall_event_on_all_cpus(struct test *test, int subtest); 47 int test__basic_mmap(struct test *test, int subtest); 48 int test__PERF_RECORD(struct test *test, int subtest); 49 int test__perf_evsel__roundtrip_name_test(struct test *test, int subtest); 50 int test__perf_evsel__tp_sched_test(struct test *test, int subtest); 51 int test__syscall_openat_tp_fields(struct test *test, int subtest); [all …]
|
D | expr.c | 9 static int test(struct expr_parse_ctx *ctx, const char *e, double val2) in test() function 19 int test__expr(struct test *t __maybe_unused, int subtest __maybe_unused) in test__expr() 31 ret = test(&ctx, "1+1", 2); in test__expr() 32 ret |= test(&ctx, "FOO+BAR", 3); in test__expr() 33 ret |= test(&ctx, "(BAR/2)%2", 1); in test__expr() 34 ret |= test(&ctx, "1 - -4", 5); in test__expr() 35 ret |= test(&ctx, "(FOO-1)*2 + (BAR/2)%2 - -4", 5); in test__expr() 36 ret |= test(&ctx, "1-1 | 1", 1); in test__expr() 37 ret |= test(&ctx, "1-1 & 1", 0); in test__expr() 38 ret |= test(&ctx, "min(1,2) + 1", 2); in test__expr() [all …]
|
D | unit_number__scnprintf.c | 10 int test__unit_number__scnprint(struct test *t __maybe_unused, int subtest __maybe_unused) in test__unit_number__scnprint() 15 } test[] = { in test__unit_number__scnprint() local 25 while (test[i].str) { in test__unit_number__scnprint() 28 unit_number__scnprintf(buf, sizeof(buf), test[i].n); in test__unit_number__scnprint() 31 test[i].n, test[i].str, buf); in test__unit_number__scnprint() 33 if (strcmp(test[i].str, buf)) in test__unit_number__scnprint()
|
/tools/pci/ |
D | pcitest.c | 41 static int run_test(struct pci_test *test) in run_test() argument 47 fd = open(test->device, O_RDWR); in run_test() 53 if (test->barnum >= 0 && test->barnum <= 5) { in run_test() 54 ret = ioctl(fd, PCITEST_BAR, test->barnum); in run_test() 55 fprintf(stdout, "BAR%d:\t\t", test->barnum); in run_test() 62 if (test->set_irqtype) { in run_test() 63 ret = ioctl(fd, PCITEST_SET_IRQTYPE, test->irqtype); in run_test() 64 fprintf(stdout, "SET IRQ TYPE TO %s:\t\t", irq[test->irqtype]); in run_test() 71 if (test->get_irqtype) { in run_test() 80 if (test->clear_irq) { in run_test() [all …]
|
/tools/testing/scatterlist/ |
D | main.c | 8 struct test { struct 30 static void fail(struct test *test, struct sg_table *st, const char *cond) in fail() argument 37 test->size, test->max_seg, test->expected_segments, st->nents, in fail() 40 printf("%u input PFNs:", test->num_pages); in fail() 41 for (i = 0; i < test->num_pages; i++) in fail() 42 printf(" %x", test->pfn[i]); in fail() 48 #define VALIDATE(cond, st, test) \ argument 50 fail((test), (st), #cond); 55 struct test *test, tests[] = { in main() local 86 for (i = 0, test = tests; test->expected_segments; test++, i++) { in main() [all …]
|
/tools/perf/arch/x86/include/ |
D | arch-tests.h | 5 struct test; 8 int test__rdpmc(struct test *test, int subtest); 9 int test__insn_x86(struct test *test, int subtest); 10 int test__intel_pt_pkt_decoder(struct test *test, int subtest); 11 int test__bp_modify(struct test *test, int subtest); 12 int test__x86_sample_parsing(struct test *test, int subtest); 14 extern struct test arch_tests[];
|
/tools/testing/selftests/powerpc/vphn/ |
D | test-vphn.c | 21 static struct test { struct 366 static int test_one(struct test *test) in test_one() argument 371 vphn_unpack_associativity(test->input, output); in test_one() 374 if (len != test->expected[0]) { in test_one() 375 printf("expected %d elements, got %d\n", test->expected[0], in test_one() 382 if (val != test->expected[i]) { in test_one() 384 test->expected[i]); in test_one() 394 static struct test *test; in test_vphn() local 396 for (test = all_tests; test->descr; test++) { in test_vphn() 399 ret = test_one(test); in test_vphn() [all …]
|
/tools/testing/selftests/exec/ |
D | binfmt_script | 43 def test(name, size, good=True, leading="", root="./", target="/perl", function 111 test(name="too-big", size=SIZE+80, good=False) 113 test(name="exact", size=SIZE, good=False) 115 test(name="exact-space", size=SIZE, good=False, leading=" ") 117 test(name="whitespace-too-big", size=SIZE+71, good=False, root="", 120 test(name="truncated", size=SIZE+17, good=False, leading=" " * 19) 122 test(name="empty", size=2, good=False, root="", 125 test(name="spaces", size=SIZE-1, good=False, root="", fill=" ", 128 test(name="newline-prefix", size=SIZE-1, good=False, leading="\n", 135 test(name="test.pl", size=439, leading=" ", [all …]
|
/tools/perf/tests/attr/ |
D | README | 1 The struct perf_event_attr test (attr tests) support 28 the test definition, executes it and checks results. 32 Directory containing all attr test definitions. 35 perf record kill (test-record-basic) 36 perf record -b kill (test-record-branch-any) 37 perf record -j any kill (test-record-branch-filter-any) 38 perf record -j any_call kill (test-record-branch-filter-any_call) 39 perf record -j any_ret kill (test-record-branch-filter-any_ret) 40 perf record -j hv kill (test-record-branch-filter-hv) 41 perf record -j ind_call kill (test-record-branch-filter-ind_call) [all …]
|
/tools/testing/selftests/bpf/ |
D | test_sock_addr.c | 59 typedef int (*load_fn)(const struct sock_addr_test *test); 90 static int bind4_prog_load(const struct sock_addr_test *test); 91 static int bind6_prog_load(const struct sock_addr_test *test); 92 static int connect4_prog_load(const struct sock_addr_test *test); 93 static int connect6_prog_load(const struct sock_addr_test *test); 94 static int sendmsg_allow_prog_load(const struct sock_addr_test *test); 95 static int sendmsg_deny_prog_load(const struct sock_addr_test *test); 96 static int recvmsg_allow_prog_load(const struct sock_addr_test *test); 97 static int recvmsg_deny_prog_load(const struct sock_addr_test *test); 98 static int sendmsg4_rw_asm_prog_load(const struct sock_addr_test *test); [all …]
|
D | test_progs.c | 95 static void dump_test_log(const struct prog_test_def *test, bool failed) in dump_test_log() argument 102 if (env.verbosity > VERBOSE_NONE || test->force_log || failed) { in dump_test_log() 116 if (env.test->skip_cnt) { in skip_account() 118 env.test->skip_cnt = 0; in skip_account() 170 struct prog_test_def *test = env.test; in test__end_subtest() local 171 int sub_error_cnt = test->error_cnt - test->old_error_cnt; in test__end_subtest() 173 dump_test_log(test, sub_error_cnt); in test__end_subtest() 176 test->test_num, test->subtest_num, test->test_name, test->subtest_name, in test__end_subtest() 177 sub_error_cnt ? "FAIL" : (test->skip_cnt ? "SKIP" : "OK")); in test__end_subtest() 181 else if (test->skip_cnt == 0) in test__end_subtest() [all …]
|
D | test_verifier.c | 704 static void do_test_fixup(struct bpf_test *test, enum bpf_prog_type prog_type, in do_test_fixup() argument 707 int *fixup_map_hash_8b = test->fixup_map_hash_8b; in do_test_fixup() 708 int *fixup_map_hash_48b = test->fixup_map_hash_48b; in do_test_fixup() 709 int *fixup_map_hash_16b = test->fixup_map_hash_16b; in do_test_fixup() 710 int *fixup_map_array_48b = test->fixup_map_array_48b; in do_test_fixup() 711 int *fixup_map_sockmap = test->fixup_map_sockmap; in do_test_fixup() 712 int *fixup_map_sockhash = test->fixup_map_sockhash; in do_test_fixup() 713 int *fixup_map_xskmap = test->fixup_map_xskmap; in do_test_fixup() 714 int *fixup_map_stacktrace = test->fixup_map_stacktrace; in do_test_fixup() 715 int *fixup_prog1 = test->fixup_prog1; in do_test_fixup() [all …]
|
/tools/testing/selftests/ftrace/ |
D | README | 5 shell scripts for testing. Feel free to add new test cases. 17 # ./ftracetest test.d/basic3.tc 21 # ./ftracetest test.d/kprobe/ 26 Copy test.d/template to your testcase (whose filename must have *.tc 27 extension) and rewrite the test description line. 36 * You can add a directory for your testcases under test.d/ if needed. 38 * The test cases should run on dash (busybox shell) for testing on 42 command fails, the test will be terminated immediately. 52 * PASS: The test succeeded as expected. The test which exits with 0 is 53 counted as passed test. [all …]
|
/tools/testing/selftests/bpf/prog_tests/ |
D | section_names.c | 163 static void test_prog_type_by_name(const struct sec_name_test *test) in test_prog_type_by_name() argument 169 rc = libbpf_prog_type_by_name(test->sec_name, &prog_type, in test_prog_type_by_name() 172 CHECK(rc != test->expected_load.rc, "check_code", in test_prog_type_by_name() 173 "prog: unexpected rc=%d for %s\n", rc, test->sec_name); in test_prog_type_by_name() 178 CHECK(prog_type != test->expected_load.prog_type, "check_prog_type", in test_prog_type_by_name() 180 prog_type, test->sec_name); in test_prog_type_by_name() 182 CHECK(expected_attach_type != test->expected_load.expected_attach_type, in test_prog_type_by_name() 184 expected_attach_type, test->sec_name); in test_prog_type_by_name() 187 static void test_attach_type_by_name(const struct sec_name_test *test) in test_attach_type_by_name() argument 192 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); in test_attach_type_by_name() [all …]
|
/tools/testing/selftests/lkdtm/ |
D | run.sh | 29 line=$(grep -E '^#?'"$test"'\b' tests.txt) 31 echo "Skipped: missing test '$test' in tests.txt" 35 if ! grep -E -q '^'"$test"'$' "$TRIGGER" ; then 36 echo "Skipped: test '$test' missing in $TRIGGER!" 49 if echo "$test" | grep -q '^#' ; then 50 test=$(echo "$test" | cut -c2-) 54 echo "Skipping $test: $expect" 86 echo "$test" | cat >"$TRIGGER" || true 94 echo "$test: saw '$expect': ok" 98 echo "$test: saw 'XFAIL': [SKIP]" [all …]
|
/tools/perf/Documentation/ |
D | perf-test.txt | 1 perf-test(1) 6 perf-test - Runs sanity tests. 11 'perf test [<options>] [{list <test-name-fragment>|[<test-name-fragments>|<test-numbers>]}]' 18 To get a list of available tests use 'perf test list', specifying a test name 21 To run just specific tests, inform test name fragments or the numbers obtained 22 from 'perf test list'. 36 Do not fork child for each test, run all tests within single process.
|
/tools/testing/selftests/timens/ |
D | gettime_perf.c | 47 static void test(clock_t clockid, char *clockstr, bool in_ns) in test() function 74 test(CLOCK_MONOTONIC, "monotonic", false); in main() 75 test(CLOCK_MONOTONIC_COARSE, "monotonic-coarse", false); in main() 76 test(CLOCK_MONOTONIC_RAW, "monotonic-raw", false); in main() 77 test(CLOCK_BOOTTIME, "boottime", false); in main() 96 test(CLOCK_MONOTONIC, "monotonic", true); in main() 97 test(CLOCK_MONOTONIC_COARSE, "monotonic-coarse", true); in main() 98 test(CLOCK_MONOTONIC_RAW, "monotonic-raw", true); in main() 99 test(CLOCK_BOOTTIME, "boottime", true); in main()
|
/tools/testing/selftests/openat2/ |
D | openat2_test.c | 89 struct struct_test *test = &tests[i]; in test_openat2_struct() local 90 struct open_how_ext how_ext = test->arg; in test_openat2_struct() 120 fd = raw_openat2(AT_FDCWD, ".", how_copy, test->size); in test_openat2_struct() 121 if (test->err >= 0) in test_openat2_struct() 124 failed = (fd != test->err); in test_openat2_struct() 141 if (test->err >= 0) in test_openat2_struct() 143 test->name, misalign); in test_openat2_struct() 146 test->name, misalign, test->err, in test_openat2_struct() 147 strerror(-test->err)); in test_openat2_struct() 249 struct flag_test *test = &tests[i]; in test_openat2_flags() local [all …]
|
/tools/testing/selftests/resctrl/ |
D | README | 1 resctrl_tests - resctrl file system test suit 10 Currently it supports Memory Bandwidth Monitoring test and Memory Bandwidth 11 Allocation test on Intel RDT hardware. More tests will be added in the future. 12 And the test suit can be extended to cover AMD QoS and ARM MPAM hardware 24 the test needs to mount resctrl file system and change contents in the file 27 Executing the test without any parameter will run all supported tests: 34 A test case has four stages: 36 - setup: mount resctrl file system, create group, setup schemata, move test 48 usage: resctrl_tests [-h] [-b "benchmark_cmd [options]"] [-t test list] [-n no_of_bits] 50 -t test list: run tests specified in the test list, e.g. -t mbm,mba,cmt,cat [all …]
|
/tools/lib/perf/tests/ |
D | Build | 2 tests-y += test-evsel.o 3 tests-y += test-evlist.o 4 tests-y += test-cpumap.o 5 tests-y += test-threadmap.o
|
/tools/testing/selftests/net/ |
D | gro.sh | 18 "--smac" "${CLIENT_MAC}" "--test" "${test}" "--verbose" ) 46 echo "running test ${proto} ${test}" >&2 49 failed_tests+=("${proto}_${test}") 95 if [[ "${test}" == "all" ]]; then 98 run_test "${proto}" "${test}"
|
/tools/testing/kunit/test_data/ |
D | test_config_printk_time.log | 5 [ 0.060000] # Subtest: kunit-resource-test 12 [ 0.060000] ok 1 - kunit-resource-test 13 [ 0.060000] # Subtest: kunit-try-catch-test 17 [ 0.060000] ok 2 - kunit-try-catch-test 18 [ 0.060000] # Subtest: string-stream-test 23 [ 0.060000] ok 3 - string-stream-test
|
D | test_pound_sign.log | 5 [ 0.060000] # Subtest: kunit-resource-test 13 [ 0.060000] ok 1 - kunit-resource-test 15 [ 0.060000] # Subtest: kunit-try-catch-test 19 [ 0.060000] ok 2 - kunit-try-catch-test 20 [ 0.060000] # Subtest: string-stream-test 25 [ 0.060000] ok 3 - string-stream-test
|
D | test_output_with_prefix_isolated_correctly.log | 4 [ 0.060000] # Subtest: kunit-resource-test 12 [ 0.060000] ok 1 - kunit-resource-test 14 [ 0.060000] # Subtest: kunit-try-catch-test 18 [ 0.060000] ok 2 - kunit-try-catch-test 19 [ 0.060000] # Subtest: string-stream-test 24 [ 0.060000] ok 3 - string-stream-test
|
D | test_pound_no_prefix.log | 5 # Subtest: kunit-resource-test 13 ok 1 - kunit-resource-test 15 # Subtest: kunit-try-catch-test 19 ok 2 - kunit-try-catch-test 20 # Subtest: string-stream-test 25 ok 3 - string-stream-test
|