Home
last modified time | relevance | path

Searched refs:test (Results 1 – 25 of 373) sorted by relevance

12345678910>>...15

/tools/pci/
Dpcitest.c39 static int run_test(struct pci_test *test) in run_test() argument
45 fd = open(test->device, O_RDWR); in run_test()
51 if (test->barnum >= 0 && test->barnum <= 5) { in run_test()
52 ret = ioctl(fd, PCITEST_BAR, test->barnum); in run_test()
53 fprintf(stdout, "BAR%d:\t\t", test->barnum); in run_test()
60 if (test->set_irqtype) { in run_test()
61 ret = ioctl(fd, PCITEST_SET_IRQTYPE, test->irqtype); in run_test()
62 fprintf(stdout, "SET IRQ TYPE TO %s:\t\t", irq[test->irqtype]); in run_test()
69 if (test->get_irqtype) { in run_test()
78 if (test->clear_irq) { in run_test()
[all …]
/tools/perf/tests/
DBuild3 perf-test-y += builtin-test.o
4 perf-test-y += tests-scripts.o
5 perf-test-y += parse-events.o
6 perf-test-y += dso-data.o
7 perf-test-y += attr.o
8 perf-test-y += vmlinux-kallsyms.o
9 perf-test-$(CONFIG_LIBTRACEEVENT) += openat-syscall.o
10 perf-test-$(CONFIG_LIBTRACEEVENT) += openat-syscall-all-cpus.o
11 perf-test-$(CONFIG_LIBTRACEEVENT) += openat-syscall-tp-fields.o
12 perf-test-$(CONFIG_LIBTRACEEVENT) += mmap-basic.o
[all …]
Dexpr.c60 static int test(struct expr_parse_ctx *ctx, const char *e, double val2) in test() function
93 ret = test(ctx, "1+1", 2); in test__expr()
94 ret |= test(ctx, "FOO+BAR", 3); in test__expr()
95 ret |= test(ctx, "(BAR/2)%2", 1); in test__expr()
96 ret |= test(ctx, "1 - -4", 5); in test__expr()
97 ret |= test(ctx, "(FOO-1)*2 + (BAR/2)%2 - -4", 5); in test__expr()
98 ret |= test(ctx, "1-1 | 1", 1); in test__expr()
99 ret |= test(ctx, "1-1 & 1", 0); in test__expr()
100 ret |= test(ctx, "min(1,2) + 1", 2); in test__expr()
101 ret |= test(ctx, "max(1,2) + 1", 3); in test__expr()
[all …]
Dunit_number__scnprintf.c15 } 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/testing/scatterlist/
Dmain.c8 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/testing/selftests/sched_ext/
Drunner.c41 static void print_test_preamble(const struct scx_test *test, bool quiet) in print_test_preamble() argument
44 printf("TEST: %s\n", test->name); in print_test_preamble()
46 printf("DESCRIPTION: %s\n", test->description); in print_test_preamble()
63 static void print_test_result(const struct scx_test *test, in print_test_result() argument
70 printf("%s %u %s # %s\n", result, testnum, test->name, directive); in print_test_result()
74 static bool should_skip_test(const struct scx_test *test, const char * filter) in should_skip_test() argument
76 return !strstr(test->name, filter); in should_skip_test()
79 static enum scx_test_status run_test(const struct scx_test *test) in run_test() argument
84 if (test->setup) { in run_test()
85 status = test->setup(&context); in run_test()
[all …]
/tools/testing/kunit/
Dkunit_parser.py254 version_type: str, test: Test) -> None:
268 test.add_error(f'{version_type} version lower than expected!')
270 test.add_error(f'{version_type} version higer than expected!')
272 def parse_ktap_header(lines: LineStream, test: Test) -> bool:
292 check_version(version_num, KTAP_VERSIONS, 'KTAP', test)
295 check_version(version_num, TAP_VERSIONS, 'TAP', test)
303 def parse_test_header(lines: LineStream, test: Test) -> bool:
321 test.name = match.group(1)
327 def parse_test_plan(lines: LineStream, test: Test) -> bool:
346 test.expected_count = None
[all …]
/tools/testing/selftests/bpf/
Dxskxceiver.c127 #define busy_poll_string(test) (test)->ifobj_tx->busy_poll ? "BUSY-POLL " : "" argument
128 static char *mode_string(struct test_spec *test) in mode_string() argument
130 switch (test->mode) { in mode_string()
142 static void report_failure(struct test_spec *test) in report_failure() argument
144 if (test->fail) in report_failure()
147 ksft_test_result_fail("FAIL: %s %s%s\n", mode_string(test), busy_poll_string(test), in report_failure()
148 test->name); in report_failure()
149 test->fail = true; in report_failure()
474 static void __test_spec_init(struct test_spec *test, struct ifobject *ifobj_tx, in __test_spec_init() argument
506 ifobj->xsk_arr[j].pkt_stream = test->tx_pkt_stream_default; in __test_spec_init()
[all …]
/tools/testing/selftests/powerpc/vphn/
Dtest-vphn.c21 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/
Dbinfmt_script.py45 def test(name, size, good=True, leading="", root="./", target="/perl", function
117 test(name="too-big", size=SIZE+80, good=False)
119 test(name="exact", size=SIZE, good=False)
121 test(name="exact-space", size=SIZE, good=False, leading=" ")
123 test(name="whitespace-too-big", size=SIZE+71, good=False, root="",
126 test(name="truncated", size=SIZE+17, good=False, leading=" " * 19)
128 test(name="empty", size=2, good=False, root="",
131 test(name="spaces", size=SIZE-1, good=False, root="", fill=" ",
134 test(name="newline-prefix", size=SIZE-1, good=False, leading="\n",
141 test(name="test.pl", size=439, leading=" ",
[all …]
/tools/perf/tests/attr/
DREADME1 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/perf/arch/x86/tests/
DBuild1 perf-test-$(CONFIG_DWARF_UNWIND) += regs_load.o
2 perf-test-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o
4 perf-test-y += arch-tests.o
5 perf-test-y += sample-parsing.o
6 perf-test-y += hybrid.o
7 perf-test-$(CONFIG_AUXTRACE) += intel-pt-test.o
9 perf-test-$(CONFIG_AUXTRACE) += insn-x86.o
11 perf-test-$(CONFIG_X86_64) += bp-modify.o
12 perf-test-y += amd-ibs-via-core-pmu.o
24 $(Q)$(call echo-cmd,test)shellcheck -a -S warning "$<" > $@ || (cat $@ && rm $@ && false)
[all …]
/tools/testing/selftests/ftrace/
DREADME5 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/perf/arch/x86/include/
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);
/tools/testing/selftests/resctrl/
Dresctrl_tests.c84 static int test_prepare(const struct resctrl_test *test) in test_prepare() argument
88 res = signal_handler_register(test); in test_prepare()
103 static void test_cleanup(const struct resctrl_test *test) in test_cleanup() argument
105 if (test->cleanup) in test_cleanup()
106 test->cleanup(); in test_cleanup()
111 static bool test_vendor_specific_check(const struct resctrl_test *test) in test_vendor_specific_check() argument
113 if (!test->vendor_specific) in test_vendor_specific_check()
116 return get_vendor() & test->vendor_specific; in test_vendor_specific_check()
119 static void run_single_test(const struct resctrl_test *test, const struct user_params *uparams) in run_single_test() argument
123 if (test->disabled) in run_single_test()
[all …]
/tools/testing/selftests/lkdtm/
Drun.sh29 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"
93 echo "$test" | cat >"$TRIGGER" || true
102 echo "$test: saw '$expect': ok"
106 echo "$test: saw 'XFAIL': [SKIP]"
[all …]
/tools/testing/selftests/bpf/prog_tests/
Dsection_names.c208 static void test_prog_type_by_name(const struct sec_name_test *test) in test_prog_type_by_name() argument
214 rc = libbpf_prog_type_by_name(test->sec_name, &prog_type, in test_prog_type_by_name()
217 CHECK(rc != test->expected_load.rc, "check_code", in test_prog_type_by_name()
218 "prog: unexpected rc=%d for %s\n", rc, test->sec_name); in test_prog_type_by_name()
223 CHECK(prog_type != test->expected_load.prog_type, "check_prog_type", in test_prog_type_by_name()
225 prog_type, test->sec_name); in test_prog_type_by_name()
227 CHECK(expected_attach_type != test->expected_load.expected_attach_type, in test_prog_type_by_name()
229 expected_attach_type, test->sec_name); in test_prog_type_by_name()
232 static void test_attach_type_by_name(const struct sec_name_test *test) in test_attach_type_by_name() argument
237 rc = libbpf_attach_type_by_name(test->sec_name, &attach_type); in test_attach_type_by_name()
[all …]
Dhelper_restricted.c11 struct test_helper_restricted *test; in test_helper_restricted() local
14 test = test_helper_restricted__open(); in test_helper_restricted()
15 if (!ASSERT_OK_PTR(test, "open")) in test_helper_restricted()
18 prog_cnt = test->skeleton->prog_cnt; in test_helper_restricted()
21 struct bpf_program *prog = *test->skeleton->progs[j].prog; in test_helper_restricted()
26 err = test_helper_restricted__load(test); in test_helper_restricted()
29 test_helper_restricted__destroy(test); in test_helper_restricted()
/tools/testing/selftests/kvm/
Dsystem_counter_offset_test.c36 static void setup_system_counter(struct kvm_vcpu *vcpu, struct test_case *test) in setup_system_counter() argument
39 &test->tsc_offset); in setup_system_counter()
42 static uint64_t guest_read_system_counter(struct test_case *test) in guest_read_system_counter() argument
47 static uint64_t host_read_guest_system_counter(struct test_case *test) in host_read_guest_system_counter() argument
49 return rdtsc() + test->tsc_offset; in host_read_guest_system_counter()
54 #error test not implemented for this architecture!
66 struct test_case *test = &test_cases[i]; in guest_main() local
68 GUEST_SYNC_CLOCK(i, guest_read_system_counter(test)); in guest_main()
96 struct test_case *test = &test_cases[i]; in enter_guest() local
98 setup_system_counter(vcpu, test); in enter_guest()
[all …]
/tools/testing/selftests/arm64/fp/
D.gitignore4 fpsimd-test
5 kernel-test
10 sve-test
11 ssve-test
16 za-test
18 zt-test
/tools/perf/Documentation/
Dperf-test.txt1 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'.
46 Do not fork child for each test, run all tests within single process, this
50 Specify a DSO for the "Symbols" test.
/tools/perf/tests/workloads/
DBuild3 perf-test-y += noploop.o
4 perf-test-y += thloop.o
5 perf-test-y += leafloop.o
6 perf-test-y += sqrtloop.o
7 perf-test-y += brstack.o
8 perf-test-y += datasym.o
9 perf-test-y += landlock.o
/tools/testing/selftests/timens/
Dgettime_perf.c47 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/
Dopenat2_test.c90 struct struct_test *test = &tests[i]; in test_openat2_struct() local
91 struct open_how_ext how_ext = test->arg; in test_openat2_struct()
121 fd = raw_openat2(AT_FDCWD, ".", how_copy, test->size); in test_openat2_struct()
122 if (test->err >= 0) in test_openat2_struct()
125 failed = (fd != test->err); in test_openat2_struct()
142 if (test->err >= 0) in test_openat2_struct()
144 test->name, misalign); in test_openat2_struct()
147 test->name, misalign, test->err, in test_openat2_struct()
148 strerror(-test->err)); in test_openat2_struct()
250 struct flag_test *test = &tests[i]; in test_openat2_flags() local
[all …]
/tools/perf/tests/shell/
Drecord_lbr.sh34 echo "$test"
37 echo "$test [Failed support missing]"
48 echo "$test [Failed in perf report]"
53 echo "$test [Success]"
66 echo "$test"
69 echo "$test [Failed support missing]"
82 echo "$test [Failed no samples captured]"
86 echo "$test: $sam_nr samples"
91 echo "$test [Failed samples missing branch stacks]"
99 echo "$test [Failed empty br stack ratio exceed $threshold%: $r%]"
[all …]

12345678910>>...15