Home
last modified time | relevance | path

Searched refs:tests (Results 1 – 25 of 447) sorted by relevance

12345678910>>...18

/linux/tools/testing/selftests/bpf/prog_tests/
H A Darg_parsing.c9 set->tests = NULL; in init_test_filter_set()
17 for (j = 0; j < set->tests[i].subtest_cnt; j++) in free_test_filter_set()
18 free((void *)set->tests[i].subtests[j]); in free_test_filter_set()
19 free(set->tests[i].subtests); in free_test_filter_set()
20 free(set->tests[i].name); in free_test_filter_set()
23 free(set->tests); in free_test_filter_set()
36 if (!ASSERT_OK_PTR(set.tests, "test filters initialized")) in test_parse_test_list()
38 ASSERT_EQ(set.tests[0].subtest_cnt, 0, "subtest filters count"); in test_parse_test_list()
39 ASSERT_OK(strcmp("arg_parsing", set.tests[0].name), "subtest name"); in test_parse_test_list()
46 if (!ASSERT_OK_PTR(set.tests, "test filters initialized")) in test_parse_test_list()
[all …]
H A Dobj_name.c10 } tests[] = { in test_obj_name() local
23 for (i = 0; i < ARRAY_SIZE(tests); i++) { in test_obj_name()
24 size_t name_len = strlen(tests[i].name) + 1; in test_obj_name()
37 memcpy(attr.prog_name, tests[i].name, ncopy); in test_obj_name()
40 CHECK((tests[i].success && fd < 0) || in test_obj_name()
41 (!tests[i].success && fd >= 0) || in test_obj_name()
42 (!tests[i].success && errno != tests[i].expected_errno), in test_obj_name()
45 fd, tests[i].success, errno, tests[i].expected_errno); in test_obj_name()
59 memcpy(attr.map_name, tests[i].name, ncopy); in test_obj_name()
61 CHECK((tests[i].success && fd < 0) || in test_obj_name()
[all …]
H A Dglobal_data.c18 } tests[] = { in test_global_data_number() local
32 for (i = 0; i < ARRAY_SIZE(tests); i++) { in test_global_data_number()
33 err = bpf_map_lookup_elem(map_fd, &tests[i].key, &num); in test_global_data_number()
34 CHECK(err || num != tests[i].num, tests[i].name, in test_global_data_number()
36 err, num, tests[i].num); in test_global_data_number()
53 } tests[] = { in test_global_data_string() local
61 for (i = 0; i < ARRAY_SIZE(tests); i++) { in test_global_data_string()
62 err = bpf_map_lookup_elem(map_fd, &tests[i].key, str); in test_global_data_string()
63 CHECK(err || memcmp(str, tests[i].str, sizeof(str)), in test_global_data_string()
64 tests[i].name, "err %d result \'%s\' expected \'%s\'\n", in test_global_data_string()
[all …]
H A Dempty_skb.c31 } tests[] = { in test_empty_skb()
142 for (i = 0; i < ARRAY_SIZE(tests); i++) { in test_empty_skb()
143 if (tests[i].data_in == &eth_hlen) in test_empty_skb()
144 eth_hlen.h_proto = tests[i].h_proto; in test_empty_skb()
153 if (tests[i].adjust_room != is_adjust_room)
156 expected_ret = at_egress && !at_tc ? tests[i].lwt_egress_ret : tests[i].ret;
158 tattr.data_in = tests[i].data_in;
159 tattr.data_size_in = tests[i].data_size_in;
162 bpf_obj->bss->ifindex = *tests[
29 } tests[] = { test_empty_skb() local
[all...]
H A Dfib_lookup.c105 static const struct fib_lookup_test tests[] = { variable
728 for (i = 0; i < ARRAY_SIZE(tests); i++) { in test_fib_lookup()
729 printf("Testing %s ", tests[i].desc); in test_fib_lookup()
731 if (set_lookup_params(fib_params, &tests[i], skb.ifindex)) in test_fib_lookup()
735 skel->bss->lookup_flags = tests[i].lookup_flags; in test_fib_lookup()
745 if (tests[i].lookup_flags & BPF_FIB_LOOKUP_VLAN) { in test_fib_lookup()
751 ASSERT_EQ(skel->bss->fib_lookup_ret, tests[i].expected_ret, in test_fib_lookup()
754 if (tests[i].expected_src) in test_fib_lookup()
755 assert_src_ip(fib_params, tests[i].expected_src); in test_fib_lookup()
757 if (tests[i].expected_dst) in test_fib_lookup()
[all …]
/linux/lib/crypto/tests/
H A DKconfig4 tristate "KUnit tests for AES-CMAC, AES-XCBC-MAC, and AES-CBC-MAC" if !KUNIT_ALL_TESTS
9 KUnit tests for the AES-CMAC, AES-XCBC-MAC, and AES-CBC-MAC message
13 tristate "KUnit tests for AES-CCM" if !KUNIT_ALL_TESTS
19 KUnit tests for the AES-CCM authenticated encryption algorithm.
22 tristate "KUnit tests for AES-GCM" if !KUNIT_ALL_TESTS
28 KUnit tests for the AES-GCM authenticated encryption algorithm.
31 tristate "KUnit tests for BLAKE2b" if !KUNIT_ALL_TESTS
36 KUnit tests for the BLAKE2b cryptographic hash function.
39 tristate "KUnit tests for BLAKE2s" if !KUNIT_ALL_TESTS
46 KUnit tests fo
[all...]
/linux/drivers/of/unittest-data/
H A Dtestcases_common.dtsi15 #include "tests-phandle.dtsi"
16 #include "tests-interrupts.dtsi"
17 #include "tests-match.dtsi"
18 #include "tests-address.dtsi"
19 #include "tests-platform.dtsi"
20 #include "tests-overlay.dtsi"
21 #include "tests-lifecycle.dtsi"
/linux/lib/kunit/
H A DKconfig6 tristate "KUnit - Enable support for unit tests"
9 Enables support for kernel unit tests (KUnit), a lightweight unit
10 testing and mocking framework for the Linux kernel. These tests are
29 bool "Enable KUnit tests which print BUG stacktraces"
34 Enables fault handling tests for the KUnit framework. These tests may
43 Enables the unit tests for the KUnit test framework. These tests test
44 the KUnit test framework itself; the tests are both written using
61 tristate "All KUnit tests with satisfied dependencies"
63 Enables all KUnit tests, if they can be enabled.
64 KUnit tests run during boot and output the results to the debug log
[all …]
/linux/tools/testing/selftests/clone3/
H A Dclone3.c173 static const struct test tests[] = { variable
319 ksft_set_plan(ARRAY_SIZE(tests)); in main()
322 for (i = 0; i < ARRAY_SIZE(tests); i++) { in main()
323 if (tests[i].filter && tests[i].filter()) { in main()
324 ksft_test_result_skip("%s\n", tests[i].name); in main()
328 if (tests[i].size_function) in main()
329 size = tests[i].size_function(); in main()
331 size = tests[i].size; in main()
333 ksft_print_msg("Running test '%s'\n", tests[i].name); in main()
335 ksft_test_result(test_clone3(tests[i].flags, size, in main()
[all …]
/linux/net/mptcp/
H A Dcrypto_test.c15 static struct test_case tests[] = { variable
41 for (i = 0; i < ARRAY_SIZE(tests); ++i) { in mptcp_crypto_test_basic()
43 key1 = be64_to_cpu(*((__be64 *)&tests[i].key[0])); in mptcp_crypto_test_basic()
44 key2 = be64_to_cpu(*((__be64 *)&tests[i].key[8])); in mptcp_crypto_test_basic()
45 nonce1 = be32_to_cpu(*((__be32 *)&tests[i].msg[0])); in mptcp_crypto_test_basic()
46 nonce2 = be32_to_cpu(*((__be32 *)&tests[i].msg[4])); in mptcp_crypto_test_basic()
56 KUNIT_EXPECT_STREQ(test, &hmac_hex[0], tests[i].result); in mptcp_crypto_test_basic()
/linux/tools/testing/selftests/riscv/hwprobe/
H A Dcbo.c280 } tests[] = { variable
312 tests[TEST_NO_ZICBOM].enabled = true; in main()
313 tests[TEST_NO_CBO_INVAL].enabled = true; in main()
318 tests[TEST_NO_ZICBOZ].enabled = true; in main()
319 tests[TEST_NO_CBO_INVAL].enabled = true; in main()
345 tests[TEST_ZICBOZ].enabled = true; in main()
346 tests[TEST_NO_ZICBOZ].enabled = false; in main()
352 tests[TEST_ZICBOM].enabled = true; in main()
353 tests[TEST_NO_ZICBOM].enabled = false; in main()
359 tests[TEST_ZICBOP].enabled = true; in main()
[all …]
/linux/tools/lib/perf/tests/
H A DBuild1 tests-y += main.o
2 tests-y += test-evsel.o
3 tests-y += test-evlist.o
4 tests-y += test-cpumap.o
5 tests-y += test-threadmap.o
/linux/Documentation/dev-tools/kunit/
H A Drun_manual.rst8 with other systems, or run tests on real hardware), we can
12 possible that tests may reduce the stability or security of
18 KUnit tests can run without kunit_tool. This can be useful, if:
26 tests can also be built by enabling their config options in our
27 ``.config``. KUnit tests usually (but don't always) have config options
28 ending in ``_KUNIT_TEST``. Most tests can either be built as a module,
34 automatically enable all tests with satisfied dependencies. This is
41 enabled by default. To ensure that tests are executed as expected,
45 the tests. If the tests are built-in, they will run automatically on the
49 If the tests are built as modules, they will run when the module is
[all …]
/linux/tools/testing/selftests/drivers/net/
H A DREADME.rst3 Running driver tests
6 Networking driver tests are executed within kselftest framework like any
7 other tests. They support testing both real device drivers and emulated /
13 By default, when no extra parameters are set or exported, tests execute
16 In this mode the tests are indistinguishable from other selftests and
22 Executing tests against a real device requires external preparation.
23 The netdevice against which tests will be run must exist, be running
27 the tests against a real device.
29 The current support for bash tests restricts the use of the same interface name
36 All tests in drivers/net must support running both against a software device
[all …]
/linux/tools/testing/selftests/kvm/arm64/
H A Dmmio_sign_ext.c30 static const struct mmio_test tests[] = { variable
105 for (i = 0; i < ARRAY_SIZE(tests); i++) in el0_svc_handler()
219 ksft_set_plan(ARRAY_SIZE(tests) * (be ? 2 : 1)); in main()
222 for (i = 0; i < ARRAY_SIZE(tests); i++) { in main()
223 const struct mmio_test *t = &tests[i]; in main()
237 for (i = 0; i < ARRAY_SIZE(tests); i++) { in main()
240 handle_mmio(vcpu->run, &tests[i], true); in main()
242 for (i = 0; i < ARRAY_SIZE(tests); i++) { in main()
244 expect_sync(vcpu, &uc, &tests[i]); in main()
245 ksft_test_result_pass("BE %s\n", tests[i].name); in main()
/linux/drivers/net/ethernet/sfc/falcon/
H A Dselftest.c101 static int ef4_test_phy_alive(struct ef4_nic *efx, struct ef4_self_tests *tests) in ef4_test_phy_alive() argument
107 tests->phy_alive = rc ? -1 : 1; in ef4_test_phy_alive()
113 static int ef4_test_nvram(struct ef4_nic *efx, struct ef4_self_tests *tests) in ef4_test_nvram() argument
122 tests->nvram = rc ? -1 : 1; in ef4_test_nvram()
136 struct ef4_self_tests *tests) in ef4_test_interrupts() argument
143 tests->interrupt = -1; in ef4_test_interrupts()
149 tests->interrupt = 0; in ef4_test_interrupts()
172 tests->interrupt = 1; in ef4_test_interrupts()
178 struct ef4_self_tests *tests) in ef4_test_eventq_irq() argument
226 tests->eventq_dma[channel->channel] = dma_seen ? 1 : -1; in ef4_test_eventq_irq()
[all …]
/linux/drivers/net/ethernet/sfc/
H A Dselftest.c103 static int efx_test_phy_alive(struct efx_nic *efx, struct efx_self_tests *tests) in efx_test_phy_alive() argument
108 tests->phy_alive = rc ? -1 : 1; in efx_test_phy_alive()
113 static int efx_test_nvram(struct efx_nic *efx, struct efx_self_tests *tests) in efx_test_nvram() argument
122 tests->nvram = rc ? -1 : 1; in efx_test_nvram()
136 struct efx_self_tests *tests) in efx_test_interrupts() argument
143 tests->interrupt = -1; in efx_test_interrupts()
149 tests->interrupt = 0; in efx_test_interrupts()
172 tests->interrupt = 1; in efx_test_interrupts()
178 struct efx_self_tests *tests) in efx_test_eventq_irq() argument
226 tests->eventq_dma[channel->channel] = dma_seen ? 1 : -1; in efx_test_eventq_irq()
[all …]
/linux/drivers/net/ethernet/sfc/siena/
H A Dselftest.c104 static int efx_test_phy_alive(struct efx_nic *efx, struct efx_self_tests *tests) in efx_test_phy_alive() argument
109 tests->phy_alive = rc ? -1 : 1; in efx_test_phy_alive()
114 static int efx_test_nvram(struct efx_nic *efx, struct efx_self_tests *tests) in efx_test_nvram() argument
123 tests->nvram = rc ? -1 : 1; in efx_test_nvram()
137 struct efx_self_tests *tests) in efx_test_interrupts() argument
144 tests->interrupt = -1; in efx_test_interrupts()
150 tests->interrupt = 0; in efx_test_interrupts()
173 tests->interrupt = 1; in efx_test_interrupts()
179 struct efx_self_tests *tests) in efx_test_eventq_irq() argument
227 tests->eventq_dma[channel->channel] = dma_seen ? 1 : -1; in efx_test_eventq_irq()
[all …]
/linux/tools/testing/selftests/kvm/s390/
H A Dtprot.c77 } tests[] = { variable
141 enum stage stage = tests[*i].stage; in perform_next_stage()
145 for (; tests[*i].stage == stage; (*i)++) { in perform_next_stage()
153 skip = tests[*i].addr < (void *)PAGE_SIZE && in perform_next_stage()
154 tests[*i].expected != TRANSL_UNAVAIL && in perform_next_stage()
157 result = test_protection(tests[*i].addr, tests[*i].key); in perform_next_stage()
158 __GUEST_ASSERT(result == tests[*i].expected, in perform_next_stage()
160 tests[*i].expected, result, *i); in perform_next_stage()
/linux/tools/testing/selftests/mm/
H A Drun_vmtests.sh22 -a: run all tests, including extra ones (other than destructive ones)
23 -t: specify specific categories to tests to run
26 -d: run destructive tests
28 The default behavior is to run required tests only. If -a is specified,
29 will run all tests.
31 Alternatively, specific groups tests can be run by passing a string
35 tests for mmap(2)
37 tests for gup
39 tests for userfaultfd(2)
43 tests fo
[all...]
/linux/tools/memory-model/
H A DREADME12 the state space of small litmus tests.
67 explore the state space of small litmus tests. Documentation describing
69 tests is available in tools/memory-model/Documentation/litmus-tests.txt.
71 Example litmus tests may be found in the Linux-kernel source tree:
73 tools/memory-model/litmus-tests/
74 Documentation/litmus-tests/
76 Several thousand more example litmus tests are available here:
82 Documentation describing litmus tests and how to use them may be found
85 tools/memory-model/Documentation/litmus-tests
[all...]
/linux/tools/perf/tests/
H A Dtests-scripts.c19 #include "tests-scripts.h"
26 #include "tests.h"
36 "./tools/perf/tests/shell", in shell_tests__dir_fd()
37 "./tests/shell", in shell_tests__dir_fd()
38 "./source/tests/shell" in shell_tests__dir_fd()
67 scnprintf(path, sizeof(path), "%s/tests/shell", path2); in shell_tests__dir_fd()
71 scnprintf(path, sizeof(path), "%s/source/tests/shell", path2); in shell_tests__dir_fd()
78 scnprintf(path, sizeof(path), "%s/tests/shell", exec_path); in shell_test__description()
188 struct test_case *tests; in append_script()
201 tests in append_script()
176 struct test_case *tests; append_script() local
[all...]
/linux/tools/testing/selftests/cgroup/
H A Dtest_pids.c140 } tests[] = { variable
151 ksft_set_plan(ARRAY_SIZE(tests)); in main()
166 for (int i = 0; i < ARRAY_SIZE(tests); i++) { in main()
167 switch (tests[i].fn(root)) { in main()
169 ksft_test_result_pass("%s\n", tests[i].name); in main()
172 ksft_test_result_skip("%s\n", tests[i].name); in main()
175 ksft_test_result_fail("%s\n", tests[i].name); in main()
/linux/drivers/gpu/drm/vc4/
H A DMakefile29 tests/vc4_mock.o \
30 tests/vc4_mock_crtc.o \
31 tests/vc4_mock_output.o \
32 tests/vc4_mock_plane.o \
33 tests/vc4_test_pv_muxing.o
/linux/tools/testing/selftests/livepatch/
H A DREADME5 This is a small set of sanity tests for the kernel livepatching.
9 buffer and parsed for expected messages. (Note: the tests will compare
19 Building the tests
22 To only build the tests without running them, run:
29 Running the tests
35 tested on systems with different kABI, ensuring they the tests are backwards
47 Adding tests
53 "livepatch:" and "test_klp" strings, so tests be sure to include one of

12345678910>>...18