Home
last modified time | relevance | path

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

12345678910>>...34

/Linux-v4.19/tools/perf/tests/
Dtests.h30 struct test { struct
32 int (*func)(struct test *test, int subtest); argument
43 int test__vmlinux_matches_kallsyms(struct test *test, int subtest); argument
44 int test__openat_syscall_event(struct test *test, int subtest);
45 int test__openat_syscall_event_on_all_cpus(struct test *test, int subtest);
46 int test__basic_mmap(struct test *test, int subtest);
47 int test__PERF_RECORD(struct test *test, int subtest);
48 int test__perf_evsel__roundtrip_name_test(struct test *test, int subtest);
49 int test__perf_evsel__tp_sched_test(struct test *test, int subtest);
50 int test__syscall_openat_tp_fields(struct test *test, int subtest);
[all …]
Dexpr.c7 static int test(struct parse_ctx *ctx, const char *e, double val2) in test() function
17 int test__expr(struct test *t __maybe_unused, int subtest __maybe_unused) in test__expr()
30 ret = test(&ctx, "1+1", 2); in test__expr()
31 ret |= test(&ctx, "FOO+BAR", 3); in test__expr()
32 ret |= test(&ctx, "(BAR/2)%2", 1); in test__expr()
33 ret |= test(&ctx, "1 - -4", 5); in test__expr()
34 ret |= test(&ctx, "(FOO-1)*2 + (BAR/2)%2 - -4", 5); in test__expr()
35 ret |= test(&ctx, "1-1 | 1", 1); in test__expr()
36 ret |= test(&ctx, "1-1 & 1", 0); in test__expr()
37 ret |= test(&ctx, "min(1,2) + 1", 2); in test__expr()
[all …]
Dunit_number__scnprintf.c9 int test__unit_number__scnprint(struct test *t __maybe_unused, int subtest __maybe_unused) in test__unit_number__scnprint()
14 } test[] = { in test__unit_number__scnprint() local
24 while (test[i].str) { in test__unit_number__scnprint()
27 unit_number__scnprintf(buf, sizeof(buf), test[i].n); in test__unit_number__scnprint()
30 test[i].n, test[i].str, buf); in test__unit_number__scnprint()
32 if (strcmp(test[i].str, buf)) in test__unit_number__scnprint()
/Linux-v4.19/tools/pci/
Dpcitest.c51 static int run_test(struct pci_test *test) in run_test() argument
58 fd = open(test->device, O_RDWR); in run_test()
64 if (test->barnum >= 0 && test->barnum <= 5) { in run_test()
65 ret = ioctl(fd, PCITEST_BAR, test->barnum); in run_test()
66 fprintf(stdout, "BAR%d:\t\t", test->barnum); in run_test()
73 if (test->set_irqtype) { in run_test()
74 ret = ioctl(fd, PCITEST_SET_IRQTYPE, test->irqtype); in run_test()
75 fprintf(stdout, "SET IRQ TYPE TO %s:\t\t", irq[test->irqtype]); in run_test()
82 if (test->get_irqtype) { in run_test()
91 if (test->legacyirq) { in run_test()
[all …]
/Linux-v4.19/drivers/misc/
Dpci_endpoint_test.c120 static inline u32 pci_endpoint_test_readl(struct pci_endpoint_test *test, in pci_endpoint_test_readl() argument
123 return readl(test->base + offset); in pci_endpoint_test_readl()
126 static inline void pci_endpoint_test_writel(struct pci_endpoint_test *test, in pci_endpoint_test_writel() argument
129 writel(value, test->base + offset); in pci_endpoint_test_writel()
132 static inline u32 pci_endpoint_test_bar_readl(struct pci_endpoint_test *test, in pci_endpoint_test_bar_readl() argument
135 return readl(test->bar[bar] + offset); in pci_endpoint_test_bar_readl()
138 static inline void pci_endpoint_test_bar_writel(struct pci_endpoint_test *test, in pci_endpoint_test_bar_writel() argument
141 writel(value, test->bar[bar] + offset); in pci_endpoint_test_bar_writel()
146 struct pci_endpoint_test *test = dev_id; in pci_endpoint_test_irqhandler() local
149 reg = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_STATUS); in pci_endpoint_test_irqhandler()
[all …]
/Linux-v4.19/drivers/mmc/core/
Dmmc_test.c181 static int mmc_test_set_blksize(struct mmc_test_card *test, unsigned size) in mmc_test_set_blksize() argument
183 return mmc_set_blocklen(test->card, size); in mmc_test_set_blksize()
192 static void mmc_test_prepare_sbc(struct mmc_test_card *test, in mmc_test_prepare_sbc() argument
195 struct mmc_card *card = test->card; in mmc_test_prepare_sbc()
212 static void mmc_test_prepare_mrq(struct mmc_test_card *test, in mmc_test_prepare_mrq() argument
228 if (!mmc_card_blockaddr(test->card)) in mmc_test_prepare_mrq()
247 mmc_test_prepare_sbc(test, mrq, blocks); in mmc_test_prepare_mrq()
249 mmc_set_data_timeout(mrq->data, test->card); in mmc_test_prepare_mrq()
261 static int mmc_test_wait_busy(struct mmc_test_card *test) in mmc_test_wait_busy() argument
271 cmd.arg = test->card->rca << 16; in mmc_test_wait_busy()
[all …]
/Linux-v4.19/lib/
Dtest_printf.c128 #define test(expect, fmt, ...) \ macro
137 test("", &nul); in test_basic()
138 test("100%", "100%%"); in test_basic()
139 test("xxx%yyy", "xxx%cyyy", '%'); in test_basic()
146 test("0x1234abcd ", "%#-12x", 0x1234abcd); in test_number()
147 test(" 0x1234abcd", "%#12x", 0x1234abcd); in test_number()
148test("0|001| 12|+123| 1234|-123|-1234", "%d|%03d|%3d|%+d|% d|%+d|% d", 0, 1, 12, 123, 1234, -123, … in test_number()
149 test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1); in test_number()
150 test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1); in test_number()
151 test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627); in test_number()
[all …]
Dcrc32test.c558 } const test[] __initconst = variable
678 bytes += 2*test[i].length; in crc32c_test()
680 crc ^= __crc32c_le(test[i].crc, test_buf + in crc32c_test()
681 test[i].start, test[i].length); in crc32c_test()
690 if (test[i].crc32c_le != __crc32c_le(test[i].crc, test_buf + in crc32c_test()
691 test[i].start, test[i].length)) in crc32c_test()
719 crc_full = __crc32c_le(test[i].crc, test_buf + test[i].start, in crc32c_combine_test()
720 test[i].length); in crc32c_combine_test()
721 for (j = 0; j <= test[i].length; ++j) { in crc32c_combine_test()
723 u32 len1 = j, len2 = test[i].length - j; in crc32c_combine_test()
[all …]
Dtest_user_copy.c42 #define test(condition, msg) \ macro
84 ret |= test(copy_to_user(usermem, kmem, PAGE_SIZE), in test_user_copy_init()
87 ret |= test(copy_from_user(kmem, usermem, PAGE_SIZE), in test_user_copy_init()
89 ret |= test(memcmp(kmem, kmem + PAGE_SIZE, PAGE_SIZE), in test_user_copy_init()
95 ret |= test(put_user(val_##size, (size __user *)usermem), \ in test_user_copy_init()
98 ret |= test(get_user(val_##size, (size __user *)usermem), \ in test_user_copy_init()
100 ret |= test(val_##size != check, \ in test_user_copy_init()
126 ret |= test(!copy_from_user(kmem, (char __user *)(kmem + PAGE_SIZE), in test_user_copy_init()
131 ret |= test(memcmp(kmem + PAGE_SIZE, kmem, PAGE_SIZE), in test_user_copy_init()
141 ret |= test(!copy_from_user(bad_usermem, (char __user *)kmem, in test_user_copy_init()
[all …]
Dtest_hexdump.c68 int groupsize, char *test, in test_hexdump_prepare_test() argument
97 p = test; in test_hexdump_prepare_test()
114 } while (p < test + rs * 2 + rs / gs + 1); in test_hexdump_prepare_test()
128 char test[TEST_HEXDUMP_BUF_SIZE]; in test_hexdump() local
137 memset(test, FILL_CHAR, sizeof(test)); in test_hexdump()
138 test_hexdump_prepare_test(len, rowsize, groupsize, test, sizeof(test), in test_hexdump()
141 if (memcmp(test, real, TEST_HEXDUMP_BUF_SIZE)) { in test_hexdump()
144 pr_err("Expect: '%s'\n", test); in test_hexdump()
164 char test[TEST_HEXDUMP_BUF_SIZE]; in test_hexdump_overflow() local
190 test_hexdump_prepare_test(len, rs, gs, test, sizeof(test), ascii); in test_hexdump_overflow()
[all …]
/Linux-v4.19/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 …]
/Linux-v4.19/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 …]
/Linux-v4.19/samples/kfifo/
Dbytestream-example.c42 static struct kfifo test; variable
44 static DECLARE_KFIFO(test, unsigned char, FIFO_SIZE);
63 kfifo_in(&test, "hello", 5); in testfunc()
67 kfifo_put(&test, i); in testfunc()
70 printk(KERN_INFO "fifo len: %u\n", kfifo_len(&test)); in testfunc()
73 i = kfifo_out(&test, buf, 5); in testfunc()
77 ret = kfifo_out(&test, buf, 2); in testfunc()
80 ret = kfifo_in(&test, buf, ret); in testfunc()
85 kfifo_skip(&test); in testfunc()
88 for (i = 20; kfifo_put(&test, i); i++) in testfunc()
[all …]
Dinttype-example.c42 static DECLARE_KFIFO_PTR(test, int);
44 static DEFINE_KFIFO(test, int, FIFO_SIZE);
64 kfifo_put(&test, i); in testfunc()
67 printk(KERN_INFO "fifo len: %u\n", kfifo_len(&test)); in testfunc()
70 ret = kfifo_out(&test, buf, 2); in testfunc()
73 ret = kfifo_in(&test, buf, ret); in testfunc()
78 kfifo_skip(&test); in testfunc()
81 for (i = 20; kfifo_put(&test, i); i++) in testfunc()
84 printk(KERN_INFO "queue len: %u\n", kfifo_len(&test)); in testfunc()
87 if (kfifo_peek(&test, &i)) in testfunc()
[all …]
Drecord-example.c50 struct kfifo_rec_ptr_1 test; variable
55 static mytest test; variable
80 kfifo_in(&test, &hello, sizeof(hello)); in testfunc()
83 printk(KERN_INFO "fifo peek len: %u\n", kfifo_peek_len(&test)); in testfunc()
88 kfifo_in(&test, buf, i + 1); in testfunc()
93 kfifo_skip(&test); in testfunc()
95 printk(KERN_INFO "fifo len: %u\n", kfifo_len(&test)); in testfunc()
98 ret = kfifo_out_peek(&test, buf, sizeof(buf)); in testfunc()
104 while (!kfifo_is_empty(&test)) { in testfunc()
105 ret = kfifo_out(&test, buf, sizeof(buf)); in testfunc()
[all …]
/Linux-v4.19/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 …]
/Linux-v4.19/drivers/of/unittest-data/
Dtests-overlay.dtsi7 /* test bus */
8 unittest_test_bus: test-bus {
13 unittest100: test-unittest100 {
19 unittest101: test-unittest101 {
25 unittest0: test-unittest0 {
31 unittest1: test-unittest1 {
37 unittest2: test-unittest2 {
43 unittest3: test-unittest3 {
49 unittest5: test-unittest5 {
55 unittest6: test-unittest6 {
[all …]
Dtests-platform.dtsi9 test-device@0 {
10 compatible = "test-device";
17 compatible = "test-sub-device";
22 test-device@1 {
23 compatible = "test-device";
30 compatible = "test-sub-device",
31 "test-compat2",
32 "test-compat3";
/Linux-v4.19/drivers/spi/
Dspi-loopback-test.c538 struct spi_test *test) in spi_test_check_elapsed_time() argument
544 for (i = 0; i < test->transfer_count; i++) { in spi_test_check_elapsed_time()
545 struct spi_transfer *xfer = test->transfers + i; in spi_test_check_elapsed_time()
556 if (test->elapsed_time < estimated_time) { in spi_test_check_elapsed_time()
559 test->elapsed_time, estimated_time); in spi_test_check_elapsed_time()
673 struct spi_test *test) in spi_test_fill_pattern() argument
675 struct spi_transfer *xfers = test->transfers; in spi_test_fill_pattern()
689 for (i = 0; i < test->transfer_count; i++) { in spi_test_fill_pattern()
701 switch (test->fill_option) { in spi_test_fill_pattern()
703 *tx_buf = test->fill_pattern; in spi_test_fill_pattern()
[all …]
/Linux-v4.19/tools/testing/selftests/bpf/
Dtest_sock_addr.c54 typedef int (*load_fn)(const struct sock_addr_test *test);
84 static int bind4_prog_load(const struct sock_addr_test *test);
85 static int bind6_prog_load(const struct sock_addr_test *test);
86 static int connect4_prog_load(const struct sock_addr_test *test);
87 static int connect6_prog_load(const struct sock_addr_test *test);
88 static int sendmsg_deny_prog_load(const struct sock_addr_test *test);
89 static int sendmsg4_rw_asm_prog_load(const struct sock_addr_test *test);
90 static int sendmsg4_rw_c_prog_load(const struct sock_addr_test *test);
91 static int sendmsg6_rw_asm_prog_load(const struct sock_addr_test *test);
92 static int sendmsg6_rw_c_prog_load(const struct sock_addr_test *test);
[all …]
/Linux-v4.19/tools/perf/arch/x86/include/
Darch-tests.h6 struct test;
9 int test__rdpmc(struct test *test __maybe_unused, int subtest);
10 int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest);
11 int test__insn_x86(struct test *test __maybe_unused, int subtest);
12 int test__bp_modify(struct test *test, int subtest);
21 extern struct test arch_tests[];
/Linux-v4.19/drivers/usb/musb/
Dmusb_debugfs.c118 unsigned test; in musb_test_mode_show() local
121 test = musb_readb(musb->mregs, MUSB_TESTMODE); in musb_test_mode_show()
125 if (test == (MUSB_TEST_FORCE_HOST | MUSB_TEST_FORCE_FS)) in musb_test_mode_show()
128 else if (test == (MUSB_TEST_FORCE_HOST | MUSB_TEST_FORCE_HS)) in musb_test_mode_show()
131 else if (test == MUSB_TEST_FORCE_HOST) in musb_test_mode_show()
134 else if (test == MUSB_TEST_FIFO_ACCESS) in musb_test_mode_show()
137 else if (test == MUSB_TEST_FORCE_FS) in musb_test_mode_show()
140 else if (test == MUSB_TEST_FORCE_HS) in musb_test_mode_show()
143 else if (test == MUSB_TEST_PACKET) in musb_test_mode_show()
146 else if (test == MUSB_TEST_K) in musb_test_mode_show()
[all …]
/Linux-v4.19/tools/testing/scatterlist/
Dmain.c23 struct test { in main() struct
30 } *test, tests[] = { in main() local
55 for (i = 0, test = tests; test->expected_segments; test++, i++) { in main()
60 set_pages(pages, test->pfn, test->num_pages); in main()
62 ret = __sg_alloc_table_from_pages(&st, pages, test->num_pages, in main()
63 0, test->size, test->max_seg, in main()
65 assert(ret == test->alloc_ret); in main()
67 if (test->alloc_ret) in main()
70 assert(st.nents == test->expected_segments); in main()
71 assert(st.orig_nents == test->expected_segments); in main()
/Linux-v4.19/crypto/
Dtestmgr.c125 int (*test)(const struct alg_test_desc *desc, const char *driver, member
1956 static int drbg_cavs_test(const struct drbg_testvec *test, int pr, in drbg_cavs_test() argument
1963 unsigned char *buf = kzalloc(test->expectedlen, GFP_KERNEL); in drbg_cavs_test()
1977 drbg_string_fill(&testentropy, test->entropy, test->entropylen); in drbg_cavs_test()
1978 drbg_string_fill(&pers, test->pers, test->perslen); in drbg_cavs_test()
1985 drbg_string_fill(&addtl, test->addtla, test->addtllen); in drbg_cavs_test()
1987 drbg_string_fill(&testentropy, test->entpra, test->entprlen); in drbg_cavs_test()
1989 buf, test->expectedlen, &addtl, &test_data); in drbg_cavs_test()
1992 buf, test->expectedlen, &addtl); in drbg_cavs_test()
2000 drbg_string_fill(&addtl, test->addtlb, test->addtllen); in drbg_cavs_test()
[all …]
/Linux-v4.19/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'.
36 Do not fork child for each test, run all tests within single process.

12345678910>>...34