Home
last modified time | relevance | path

Searched +full:self +full:- +full:test (Results 1 – 25 of 727) sorted by relevance

12345678910>>...30

/linux-6.12.1/tools/testing/kunit/
Dkunit_parser.py1 # 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 …]
Dkunit_tool_test.py2 # 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 …]
/linux-6.12.1/tools/perf/tests/
Dattr.py1 # 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 …]
/linux-6.12.1/tools/testing/selftests/hid/tests/
Dbase.py2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
21 logger = logging.getLogger("hidtools.test.base")
138 def __init__(self, name, application, rdesc_str=None, rdesc=None, input_info=None): argument
140 self.application_matches = application_matches
142 name = f"uhid test {self.__class__.__name__}"
143 if not name.startswith("uhid test "):
144 name = "uhid test " + self.name
145 self.name = name
156 # List of kernel modules to load before starting the test
[all …]
/linux-6.12.1/tools/testing/selftests/tc-testing/
DTdcPlugin.py4 def __init__(self): argument
6 print(' -- {}.__init__'.format(self.sub_class))
8 def pre_suite(self, testcount, testlist): argument
9 '''run commands before test_runner goes into a test loop'''
10 self.testcount = testcount
11 self.testlist = testlist
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 …]
Dtdc.py2 # SPDX-License-Identifier: GPL-2.0
5 tdc.py - Linux tc (Traffic Control) unit test driver
31 def __init__(self, missing_pg): argument
32 self.missing_pg = missing_pg
35 def __init__(self, stage, output, message): argument
36 self.stage = stage
37 self.output = output
38 self.message = message
41 def __init__(self, argparser): argument
43 self.plugins = set()
[all …]
/linux-6.12.1/tools/perf/tests/shell/lib/
Dperf_metric_validation.py1 # SPDX-License-Identifier: GPL-2.0
11 …def __init__(self, metric: list[str], wl: str, value: list[float], low: float, up=float('nan'), de… argument
12 self.metric: list = metric # multiple metrics in relationship type tests
13 self.workloads = [wl] # multiple workloads possible
14 self.collectedValue: list = value
15 self.valueLowBound = low
16 self.valueUpBound = up
17 self.description = description
19 def __repr__(self) -> str: argument
20 if len(self.metric) > 1:
[all …]
/linux-6.12.1/tools/testing/selftests/tc-testing/plugin-lib/
DvalgrindPlugin.py2 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, testist): argument
29 '''run commands before test_runner goes into a test loop'''
30 self.testidlist = [tidx['id'] for tidx in testlist]
32 if self.args.verbose > 1:
[all …]
DnsPlugin.py21 def __init__(self): argument
22 self.sub_class = 'ns/SubPlugin'
25 def pre_suite(self, testcount, testlist): argument
28 def prepare_test(self, test): argument
29 if 'skip' in test and test['skip'] == 'yes':
32 if 'nsPlugin' not in test['plugins']:
36 self._nl_ns_create()
38 self._ipr2_ns_create()
45 self._proc_check()
47 ns = self.args.NAMES['NS']
[all …]
/linux-6.12.1/lib/
Dsiphash_kunit.c1 // 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 …]
/linux-6.12.1/tools/testing/selftests/net/af_unix/
Dunix_connect.c1 // 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 …]
/linux-6.12.1/tools/testing/selftests/tc-testing/creating-plugins/
DAddingPlugins.txt1 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 …]
/linux-6.12.1/drivers/firewire/
Dself-id-sequence-helper-test.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 // self-id-sequence-helper-test.c - An application of Kunit to test helpers of self ID sequence.
7 #include <kunit/test.h>
9 #include "phy-packet-definitions.h"
11 static void test_self_id_sequence_enumerator_valid(struct kunit *test) in test_self_id_sequence_enumerator_valid() argument
27 KUNIT_EXPECT_PTR_EQ(test, entry, &valid_sequences[0]); in test_self_id_sequence_enumerator_valid()
28 KUNIT_EXPECT_EQ(test, quadlet_count, 1); in test_self_id_sequence_enumerator_valid()
29 KUNIT_EXPECT_EQ(test, enumerator.quadlet_count, 6); in test_self_id_sequence_enumerator_valid()
32 KUNIT_EXPECT_PTR_EQ(test, entry, &valid_sequences[1]); in test_self_id_sequence_enumerator_valid()
33 KUNIT_EXPECT_EQ(test, quadlet_count, 2); in test_self_id_sequence_enumerator_valid()
[all …]
/linux-6.12.1/drivers/soc/fsl/qbman/
DKconfig1 # 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 …]
/linux-6.12.1/tools/testing/selftests/net/
Dbpf_offload.py7 # June 1991 as shown in the file COPYING in the top-level directory of this
53 log_level -= sub
116 stdout = stdout.decode("utf-8")
117 stderr = stderr.decode("utf-8")
122 if stderr[-1] == "\n":
123 stderr = stderr[:-1]
132 if len(stderr) > 0 and stderr[-1] == "\n":
133 stderr = stderr[:-1]
142 cmd("rm -f %s" % (f))
174 return tool("bpftool", args, {"json":"-p"}, JSON=JSON, ns=ns,
[all …]
Depoll_busy_poll.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 /* Basic per-epoll context busy poll test.
5 * Only tests the ioctls, but should be expanded to test two connected hosts in
55 EXPECT_NE(-1, ret) in FIXTURE_SETUP()
58 self->invalid_fd = ret; in FIXTURE_SETUP()
65 ret = close(self->invalid_fd); in FIXTURE_TEARDOWN()
73 ret = ioctl(self->invalid_fd, EPIOCGPARAMS, &self->params); in TEST_F()
75 EXPECT_EQ(-1, ret) in TEST_F()
81 memset(&self->params, 0, sizeof(struct epoll_params)); in TEST_F()
83 ret = ioctl(self->invalid_fd, EPIOCSPARAMS, &self->params); in TEST_F()
[all …]
/linux-6.12.1/tools/testing/selftests/drivers/net/lib/py/
Denv.py1 # SPDX-License-Identifier: GPL-2.0
41 def __init__(self, src_path, **kwargs): argument
42 self._ns = None
44 self.env = _load_env_file(src_path)
46 if 'NETIF' in self.env:
47 self.dev = ip("link show dev " + self.env['NETIF'], json=True)[0]
49 self._ns = NetdevSimDev(**kwargs)
50 self.dev = self._ns.nsims[0].dev
51 self.ifindex = self.dev['ifindex']
53 def __enter__(self): argument
[all …]
/linux-6.12.1/tools/testing/selftests/rtc/
Drtctest.c1 // 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 …]
/linux-6.12.1/tools/testing/selftests/sgx/
Dmain.c1 // 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 …]
/linux-6.12.1/tools/testing/selftests/seccomp/
Dseccomp_bpf.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Test code for seccomp bpf.
58 /* Attempt to de-conflict with the selftests tree. */
311 return -1; in __filecmp()
322 TH_LOG("kcmp() syscall missing (test is less accurate)");\
328 TEST(kcmp) in TEST() function
338 TEST(mode_strict_support) in TEST() function
364 /* Note! This doesn't test no new privs behavior */
365 TEST(no_new_privs_support) in TEST() function
376 TEST(mode_filter_support) in TEST() function
[all …]
/linux-6.12.1/scripts/kconfig/tests/
Dconftest.py1 # 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 …]
/linux-6.12.1/tools/testing/selftests/bpf/
Dtest_verifier.c1 // SPDX-License-Identifier: GPL-2.0-only
92 /* If specified, test engine looks for this sequence of
94 * test rewrites applied by verifier. Use values
96 * fields if content does not matter. The test case fails if
99 * The sequence could be split into sub-sequences by adding
100 * SKIP_INSNS instruction at the end of each sub-sequence. In
101 * such case sub-sequences are searched for one after another.
104 /* If specified, test engine applies same pattern matching
106 * matched test case is marked as failed.
134 * Can be a tab-separated sequence of expected strings. An empty string
[all …]
/linux-6.12.1/tools/testing/selftests/kvm/include/
Dkvm_test_harness.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Macros for defining a KVM test
19 (void)vm_create_with_one_vcpu(&self->vcpu, NULL); \
23 kvm_vm_free(self->vcpu->vm); \
26 #define KVM_ONE_VCPU_TEST(suite, test, guestcode) \ argument
27 static void __suite##_##test(struct kvm_vcpu *vcpu); \
29 TEST_F(suite, test) \
31 vcpu_arch_set_entry_point(self->vcpu, guestcode); \
32 __suite##_##test(self->vcpu); \
34 static void __suite##_##test(struct kvm_vcpu *vcpu)
/linux-6.12.1/tools/testing/selftests/alsa/
Dtest-pcmtest-driver.c1 // SPDX-License-Identifier: GPL-2.0
3 * This is the test which covers PCM middle layer data transferring using
4 * the virtual pcm test driver (snd-pcmtest).
44 return -1; in read_patterns()
51 return -1; in read_patterns()
70 return -1; in get_test_results()
96 snd_pcm_hw_params_set_access(*handle, hwparams, params->access); in setup_handle()
97 snd_pcm_hw_params_set_format(*handle, hwparams, params->format); in setup_handle()
98 snd_pcm_hw_params_set_channels(*handle, hwparams, params->channels); in setup_handle()
99 snd_pcm_hw_params_set_rate_near(*handle, hwparams, &params->rate, 0); in setup_handle()
[all …]
/linux-6.12.1/tools/testing/selftests/kvm/s390x/
Ducontrol_test.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Test code for the s390x kvm ucontrol interface
39 TEST_REQUIRE((data->effective & CAP_TO_MASK(CAP_SYS_ADMIN)) > 0); in require_ucontrol_admin()
44 /* Test program setting some registers and looping */
86 self->kvm_fd = open_kvm_dev_path_or_exit(); in FIXTURE_SETUP()
87 self->vm_fd = ioctl(self->kvm_fd, KVM_CREATE_VM, KVM_VM_S390_UCONTROL); in FIXTURE_SETUP()
88 ASSERT_GE(self->vm_fd, 0); in FIXTURE_SETUP()
90 kvm_device_attr_get(self->vm_fd, KVM_S390_VM_CPU_MODEL, in FIXTURE_SETUP()
94 self->vcpu_fd = ioctl(self->vm_fd, KVM_CREATE_VCPU, 0); in FIXTURE_SETUP()
95 ASSERT_GE(self->vcpu_fd, 0); in FIXTURE_SETUP()
[all …]

12345678910>>...30