| /kernel/linux/linux-6.6/tools/testing/kunit/ |
| D | kunit_parser.py | 1 # SPDX-License-Identifier: GPL-2.0 3 # Parses KTAP test results from a kernel dmesg log and incrementally prints 4 # results with reader-friendly format. Stores and returns test results in a 5 # Test object. 22 class Test: class 24 A class to represent a test parsed from KTAP results. All KTAP 25 results within a test log are stored in a main Test object as 29 status : TestStatus - status of the test 30 name : str - name of the test 31 expected_count : int - expected number of subtests (0 if single [all …]
|
| D | kunit_tool_test.py | 2 # SPDX-License-Identifier: GPL-2.0 43 def test_is_subset_of(self): argument 45 self.assertTrue(kconfig0.is_subset_of(kconfig0)) 48 kconfig1.add_entry('TEST', 'y') 49 self.assertTrue(kconfig1.is_subset_of(kconfig1)) 50 self.assertTrue(kconfig0.is_subset_of(kconfig1)) 51 self.assertFalse(kconfig1.is_subset_of(kconfig0)) 53 def test_read_from_file(self): argument 61 expected_kconfig.add_entry('TEST', 'y') 65 self.assertEqual(kconfig, expected_kconfig) [all …]
|
| /kernel/linux/linux-6.6/tools/perf/tests/ |
| D | attr.py | 1 # SPDX-License-Identifier: GPL-2.0 36 def __init__(self, test, msg): argument 37 self.msg = msg 38 self.test = test 39 def getMsg(self): argument 40 return '\'%s\' - %s' % (self.test.path, self.msg) 43 def __init__(self, test, arch): argument 44 self.arch = arch 45 self.test = test 46 def getMsg(self): argument [all …]
|
| /kernel/linux/linux-5.10/tools/perf/tests/ |
| D | attr.py | 1 # SPDX-License-Identifier: GPL-2.0 33 def __init__(self, test, msg): argument 34 self.msg = msg 35 self.test = test 36 def getMsg(self): argument 37 return '\'%s\' - %s' % (self.test.path, self.msg) 40 def __init__(self, test, arch): argument 41 self.arch = arch 42 self.test = test 43 def getMsg(self): argument [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/tc-testing/ |
| D | TdcPlugin.py | 4 def __init__(self): argument 6 print(' -- {}.__init__'.format(self.sub_class)) 8 def pre_suite(self, testcount, testidlist): argument 9 '''run commands before test_runner goes into a test loop''' 10 self.testcount = testcount 11 self.testidlist = testidlist 12 if self.args.verbose > 1: 13 print(' -- {}.pre_suite'.format(self.sub_class)) 15 def post_suite(self, index): argument 16 '''run commands after test_runner completes the test loop [all …]
|
| D | tdc.py | 2 # SPDX-License-Identifier: GPL-2.0 5 tdc.py - Linux tc (Traffic Control) unit test driver 29 def __init__(self, missing_pg): argument 30 self.missing_pg = missing_pg 33 def __init__(self, stage, output, message): argument 34 self.stage = stage 35 self.output = output 36 self.message = message 39 def __init__(self, argparser): argument 41 self.plugins = {} [all …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/tc-testing/ |
| D | TdcPlugin.py | 4 def __init__(self): argument 6 print(' -- {}.__init__'.format(self.sub_class)) 8 def pre_suite(self, testcount, testidlist): argument 9 '''run commands before test_runner goes into a test loop''' 10 self.testcount = testcount 11 self.testidlist = testidlist 12 if self.args.verbose > 1: 13 print(' -- {}.pre_suite'.format(self.sub_class)) 15 def post_suite(self, index): argument 16 '''run commands after test_runner completes the test loop [all …]
|
| D | tdc.py | 2 # SPDX-License-Identifier: GPL-2.0 5 tdc.py - Linux tc (Traffic Control) unit test driver 29 def __init__(self, missing_pg): argument 30 self.missing_pg = missing_pg 33 def __init__(self, stage, output, message): argument 34 self.stage = stage 35 self.output = output 36 self.message = message 39 def __init__(self, argparser): argument 41 self.plugins = {} [all …]
|
| /kernel/linux/linux-6.6/tools/perf/tests/shell/lib/ |
| D | perf_metric_validation.py | 1 #SPDX-License-Identifier: GPL-2.0 10 …def __init__(self, rulefname, reportfname='', t=5, debug=False, datafname='', fullrulefname='', wo… argument 11 self.rulefname = rulefname 12 self.reportfname = reportfname 13 self.rules = None 14 self.collectlist:str = metrics 15 self.metrics = self.__set_metrics(metrics) 16 self.skiplist = set() 17 self.tolerance = t 19 self.workloads = [x for x in workload.split(",") if x] [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/hid/tests/ |
| D | base.py | 2 # SPDX-License-Identifier: GPL-2.0 3 # -*- coding: utf-8 -*- 19 logger = logging.getLogger("hidtools.test.base") 136 def __init__(self, name, application, rdesc_str=None, rdesc=None, input_info=None): argument 138 self.application_matches = application_matches 140 name = f"uhid test {self.__class__.__name__}" 141 if not name.startswith("uhid test "): 142 name = "uhid test " + self.name 143 self.name = name 154 # List of kernel modules to load before starting the test [all …]
|
| /kernel/linux/linux-5.10/tools/testing/kunit/ |
| D | kunit_tool_test.py | 2 # SPDX-License-Identifier: GPL-2.0 37 def test_is_subset_of(self): argument 39 self.assertTrue(kconfig0.is_subset_of(kconfig0)) 42 kconfig1.add_entry(kunit_config.KconfigEntry('TEST', 'y')) 43 self.assertTrue(kconfig1.is_subset_of(kconfig1)) 44 self.assertTrue(kconfig0.is_subset_of(kconfig1)) 45 self.assertFalse(kconfig1.is_subset_of(kconfig0)) 47 def test_read_from_file(self): argument 60 kunit_config.KconfigEntry('TEST', 'y')) 66 self.assertEqual(kconfig.entries(), expected_kconfig.entries()) [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/tc-testing/plugin-lib/ |
| D | valgrindPlugin.py | 2 run the command under test, under valgrind and collect memory leak info 3 as a separate test. 22 def __init__(self): argument 23 self.sub_class = 'valgrind/SubPlugin' 24 self.tap = '' 25 self._tsr = TestSuiteReport() 28 def pre_suite(self, testcount, testidlist): argument 29 '''run commands before test_runner goes into a test loop''' 31 if self.args.verbose > 1: 32 print('{}.pre_suite'.format(self.sub_class)) [all …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/tc-testing/plugin-lib/ |
| D | valgrindPlugin.py | 2 run the command under test, under valgrind and collect memory leak info 3 as a separate test. 22 def __init__(self): argument 23 self.sub_class = 'valgrind/SubPlugin' 24 self.tap = '' 25 self._tsr = TestSuiteReport() 28 def pre_suite(self, testcount, testidlist): argument 29 '''run commands before test_runner goes into a test loop''' 31 if self.args.verbose > 1: 32 print('{}.pre_suite'.format(self.sub_class)) [all …]
|
| /kernel/linux/linux-6.6/lib/ |
| D | siphash_kunit.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 /* Copyright (C) 2016-2022 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 * Test cases for siphash.c 6 * SipHash: a fast short-input PRF 9 * This implementation is specifically for SipHash2-4 for a secure PRF 10 * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for 16 #include <kunit/test.h> 23 /* Test vectors taken from reference source available at: 114 KUNIT_EXPECT_EQ_MSG(test, hash, vector, fmt) 116 static void siphash_test(struct kunit *test) in siphash_test() argument [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/net/af_unix/ |
| D | unix_connect.c | 1 // SPDX-License-Identifier: GPL-2.0 33 .sun_path = "test", in FIXTURE_VARIANT_ADD() 42 .sun_path = "\0test", in FIXTURE_VARIANT_ADD() 51 .sun_path = "test", in FIXTURE_VARIANT_ADD() 60 .sun_path = "\0test", in FIXTURE_VARIANT_ADD() 69 .sun_path = "test", in FIXTURE_VARIANT_ADD() 78 .sun_path = "\0test", in FIXTURE_VARIANT_ADD() 87 .sun_path = "test", in FIXTURE_VARIANT_ADD() 96 .sun_path = "\0test", in FIXTURE_VARIANT_ADD() 104 self->family = AF_UNIX; in FIXTURE_SETUP() [all …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/tc-testing/creating-plugins/ |
| D | AddingPlugins.txt | 1 tdc - Adding plugins for tdc 3 Author: Brenda J. Butler - bjb@mojatatu.com 6 -------------- 9 There are some examples in plugin-lib. 11 The plugin can be used to add functionality to the test framework, 14 - adding commands to be run before and/or after the test suite 15 - adding commands to be run before and/or after the test cases 16 - adding commands to be run before and/or after the execute phase of the test cases 17 - ability to alter the command to be run in any phase: 18 pre (the pre-suite stage) [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/tc-testing/creating-plugins/ |
| D | AddingPlugins.txt | 1 tdc - Adding plugins for tdc 3 Author: Brenda J. Butler - bjb@mojatatu.com 6 -------------- 9 There are some examples in plugin-lib. 11 The plugin can be used to add functionality to the test framework, 14 - adding commands to be run before and/or after the test suite 15 - adding commands to be run before and/or after the test cases 16 - adding commands to be run before and/or after the execute phase of the test cases 17 - ability to alter the command to be run in any phase: 18 pre (the pre-suite stage) [all …]
|
| /kernel/linux/linux-5.10/lib/ |
| D | test_siphash.c | 1 /* Test cases for siphash.c 7 * SipHash: a fast short-input PRF 10 * This implementation is specifically for SipHash2-4 for a secure PRF 11 * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for 23 /* Test vectors taken from reference source available at: 125 pr_info("siphash self-test aligned %u: FAIL\n", i + 1); in siphash_test_init() 126 ret = -EINVAL; in siphash_test_init() 130 pr_info("siphash self-test unaligned %u: FAIL\n", i + 1); in siphash_test_init() 131 ret = -EINVAL; in siphash_test_init() 135 pr_info("hsiphash self-test aligned %u: FAIL\n", i + 1); in siphash_test_init() [all …]
|
| /kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
| D | test_offload.py | 7 # June 1991 as shown in the file COPYING in the top-level directory of this 50 log_level -= sub 113 stdout = stdout.decode("utf-8") 114 stderr = stderr.decode("utf-8") 119 if stderr[-1] == "\n": 120 stderr = stderr[:-1] 129 if len(stderr) > 0 and stderr[-1] == "\n": 130 stderr = stderr[:-1] 139 cmd("rm -f %s" % (f)) 169 return tool("bpftool", args, {"json":"-p"}, JSON=JSON, ns=ns, [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/bpf/ |
| D | test_offload.py | 7 # June 1991 as shown in the file COPYING in the top-level directory of this 50 log_level -= sub 113 stdout = stdout.decode("utf-8") 114 stderr = stderr.decode("utf-8") 119 if stderr[-1] == "\n": 120 stderr = stderr[:-1] 129 if len(stderr) > 0 and stderr[-1] == "\n": 130 stderr = stderr[:-1] 139 cmd("rm -f %s" % (f)) 169 return tool("bpftool", args, {"json":"-p"}, JSON=JSON, ns=ns, [all …]
|
| /kernel/linux/linux-5.10/drivers/soc/fsl/qbman/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 26 Compiles in additional checks, to sanity-check the drivers and 30 tristate "BMan self-tests" 32 Compile the BMan self-test code. These tests will 37 bool "High-level API self-test" 41 This requires the presence of cpu-affine portals, and performs 42 high-level API testing with them (whichever portal(s) are affine 43 to the cpu(s) the test executes on). 46 tristate "QMan self-tests" 48 Compile self-test code for QMan. [all …]
|
| /kernel/linux/linux-6.6/drivers/soc/fsl/qbman/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 26 Compiles in additional checks, to sanity-check the drivers and 30 tristate "BMan self-tests" 32 Compile the BMan self-test code. These tests will 37 bool "High-level API self-test" 41 This requires the presence of cpu-affine portals, and performs 42 high-level API testing with them (whichever portal(s) are affine 43 to the cpu(s) the test executes on). 46 tristate "QMan self-tests" 48 Compile self-test code for QMan. [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/sgx/ |
| D | main.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2016-20 Intel Corporation. */ 30 * instructions (eg. ENCLU[EACCEPT] and ENCLU[EMODPE]) holds meta-data 49 Elf64_Phdr *phdrtab = addr + ehdr->e_phoff; in vdso_get_dyntab() 52 for (i = 0; i < ehdr->e_phnum; i++) in vdso_get_dyntab() 74 symtab->elf_symtab = vdso_get_dyn(addr, dyntab, DT_SYMTAB); in vdso_get_symtab() 75 if (!symtab->elf_symtab) in vdso_get_symtab() 78 symtab->elf_symstrtab = vdso_get_dyn(addr, dyntab, DT_STRTAB); in vdso_get_symtab() 79 if (!symtab->elf_symstrtab) in vdso_get_symtab() 82 symtab->elf_hashtab = vdso_get_dyn(addr, dyntab, DT_HASH); in vdso_get_symtab() [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/rtc/ |
| D | rtctest.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Real Time Clock Driver Test Program 33 self->fd = open(rtc_file, O_RDONLY); in FIXTURE_SETUP() 37 close(self->fd); in FIXTURE_TEARDOWN() 44 if (self->fd == -1 && errno == ENOENT) in TEST_F() 45 SKIP(return, "Skipping test since %s does not exist", rtc_file); in TEST_F() 46 ASSERT_NE(-1, self->fd); in TEST_F() 49 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm); in TEST_F() 50 ASSERT_NE(-1, rc); in TEST_F() 60 .tm_sec = rtc_time->tm_sec, in rtc_time_to_timestamp() [all …]
|
| /kernel/linux/linux-5.10/scripts/kconfig/tests/ |
| D | conftest.py | 1 # SPDX-License-Identifier: GPL-2.0 9 This provides fixture functions commonly used from test files. 24 This class provides methods to run text-based interface of Kconfig 30 def __init__(self, request): argument 33 request: object to introspect the requesting test module 35 # the directory of the test being run 36 self._test_dir = os.path.dirname(str(request.fspath)) 39 def _run_conf(self, mode, dot_config=None, out_file='.config', argument 41 """Run text-based Kconfig executable and save the result. 43 mode: input mode option (--oldaskconfig, --defconfig=<file> etc.) [all …]
|