| /linux/tools/testing/kunit/ |
| H A D | kunit_kernel.py | 1 # SPDX-License-Identifier: GPL-2.0 32 ABS_TOOL_PATH = os.path.abspath(os.path.dirname(__file__)) 33 QEMU_CONFIGS_DIR = os.path.join(ABS_TOOL_PATH, 'qemu_configs') 50 def make_mrproper(self) -> None: 52 subprocess.check_output(['make', 'mrproper'], stderr=subprocess.STDOUT) 58 def make_arch_config(self, base_kunitconfig: kunit_config.Kconfig) -> kunit_config.Kconfig: 61 def make_olddefconfig(self, build_dir: str, make_options: Optional[List[str]]) -> None: 69 subprocess.check_output(command, stderr=subprocess.STDOUT) 75 def make(self, jobs: int, build_dir: str, make_options: Optional[List[str]]) -> None: 77 'ARCH=' + self._linux_arch, 'O=' + build_dir, '--jobs=' + str(jobs)] [all …]
|
| H A D | kunit.py | 2 # SPDX-License-Identifier: GPL-2.0 26 from kunit_printer import stdout, null_printer 72 def get_kernel_root_path() -> str: 73 path = sys.argv[0] if not __file__ else __file__ 74 parts = os.path.realpath(path).split('tools/testing/kunit') 80 request: KunitConfigRequest) -> KunitResult: 81 stdout.print_with_timestamp('Configuring KUnit Kernel ...') 87 return KunitResult(status, config_end - config_start) 90 request: KunitBuildRequest) -> KunitResult: 91 stdout.print_with_timestamp('Building KUnit Kernel ...') [all …]
|
| H A D | kunit_tool_test.py | 2 # SPDX-License-Identifier: GPL-2.0 28 from kunit_printer import stdout 36 abs_test_data_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'test_data')) 41 def _test_data_path(path): argument 42 return os.path.join(abs_test_data_dir, path) 71 kconfig_path = os.path.join(test_tmpdir, '.config') 109 self.assertContains('ok 1 - example_simple_test', result) 110 self.assertContains('ok 2 - example_mock_test', result) 111 self.assertContains('ok 1 - example', result) 118 self.assertContains('# Subtest: kunit-resource-test', result) [all …]
|
| /linux/scripts/kconfig/tests/ |
| H A D | conftest.py | 1 # SPDX-License-Identifier: GPL-2.0 18 CONF_PATH = os.path.abspath(os.path.join('scripts', 'kconfig', 'conf')) 24 This class provides methods to run text-based interface of Kconfig 26 stdout, and stderr. It also provides methods to compare those 36 self._test_dir = os.path.dirname(str(request.fspath)) 41 """Run text-based Kconfig executable and save the result. 43 mode: input mode option (--oldaskconfig, --defconfig=<file> etc.) 66 shutil.copyfile(os.path.join(self._test_dir, dot_config), 67 os.path.join(temp_dir, '.config')) 71 stdout=subprocess.PIPE, [all …]
|
| /linux/arch/powerpc/kernel/ |
| H A D | legacy_serial.c | 1 // SPDX-License-Identifier: GPL-2.0 16 #include <asm/pci-bridge.h> 17 #include <asm/ppc-pci.h> 43 {.type = "tsi-bridge",}, 46 {.compatible = "simple-bus",}, 47 {.compatible = "wrs,epld-localbus",}, 52 static int legacy_serial_console = -1; 61 offset = offset << p->regshift; in tsi_serial_in() 63 tmp = readl(p->membase + (UART_IIR & ~3)); in tsi_serial_in() 66 return readb(p->membase + offset); in tsi_serial_in() [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | testing_helpers.c | 1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) 17 int i, set_len = 0, new_len, num, start = 0, end = -1; in parse_num_list() 25 return -errno; in parse_num_list() 32 if (!parsing_end && *next == '-') { in parse_num_list() 45 return -EINVAL; in parse_num_list() 49 return -EINVAL; in parse_num_list() 56 return -ENOMEM; in parse_num_list() 68 return -EINVAL; in parse_num_list() 84 for (i = 0; i < set->cnt; i++) { in do_insert_test() 85 test = &set->tests[i]; in do_insert_test() [all …]
|
| /linux/scripts/clang-tools/ |
| H A D | run-clang-tools.py | 2 # SPDX-License-Identifier: GPL-2.0 8 """A helper routine run clang-tidy and the clang static-analyzer on 20 """Set up and parses command-line arguments. 23 Has keys: [path, type] 25 usage = """Run clang-tidy or the clang static-analyzer on a 31 choices=["clang-tidy", "clang-analyzer"], 33 path_help = "Path to the compilation database to parse" 34 parser.add_argument("path", type=str, help=path_help) 37 parser.add_argument("-checks", type=str, default=None, help=checks_help) 38 header_filter_help = "Pass the -header-filter value to the tool" [all …]
|
| /linux/arch/powerpc/platforms/powermac/ |
| H A D | udbg_scc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp 40 return -1; in udbg_scc_getc_poll() 42 return -1; in udbg_scc_getc_poll() 52 return -1; in udbg_scc_getc() 69 struct device_node *stdout = NULL, *escc = NULL, *macio = NULL; in udbg_scc_init() local 71 const char *path; in udbg_scc_init() local 80 path = of_get_property(of_chosen, "linux,stdout-path", NULL); in udbg_scc_init() 81 if (path != NULL) in udbg_scc_init() 82 stdout = of_find_node_by_path(path); in udbg_scc_init() [all …]
|
| /linux/Documentation/devicetree/bindings/arm/ |
| H A D | secure.txt | 15 can be supported by prefixing the property name with "secure-". So for 16 instance "secure-foo" would override "foo". For property names with 18 "vendor,secure-foo". If there is no "secure-" property then the Secure 20 non-prefixed property. However, only the properties listed below may 21 validly have "secure-" versions; this list will be enlarged on a 22 case-by-case basis. 25 been annotated to indicate the presence of Secure-only devices can 26 still be processed unmodified by existing Non-secure software (and in 32 secure- bindings only need to be used where both the Secure and Normal 36 ----------------------------- [all …]
|
| /linux/tools/docs/ |
| H A D | test_doc_build.py | 2 # SPDX-License-Identifier: GPL-2.0 14 import os.path 22 PYTHON = os.path.basename(sys.executable) 47 (8, 2, 3) # Latest version - covers rolling distros 68 "sphinxcontrib-applehelp": "1.0.2", 69 "sphinxcontrib-devhelp": "1.0.2", 70 "sphinxcontrib-htmlhelp": "1.0.3", 71 "sphinxcontrib-jsmath": "1.0.1", 72 "sphinxcontrib-qthelp": "1.0.3", 73 "sphinxcontrib-serializinghtml": "1.1.4", [all …]
|
| /linux/scripts/ |
| H A D | rust_is_available_test.py | 2 # SPDX-License-Identifier: GPL-2.0 6 Some of the tests require the real programs to be available in `$PATH` 28 path = pathlib.Path(cls.tempdir.name) 29 name = str(len(tuple(path.iterdir()))) 30 path = path / name 31 with open(path, "w") as file_: 33 os.chmod(path, os.stat(path).st_mode | stat.S_IXUSR) 34 return path 37 def generate_clang(cls, stdout): argument 40 if "-E" in " ".join(sys.argv): [all …]
|
| H A D | checkkconfigsymbols.py | 2 # SPDX-License-Identifier: GPL-2.0-only 6 # (c) 2014-2017 Valentin Rothberg <valentinrothberg@gmail.com> 23 SYMBOL = r"(?:\w*[A-Z0-9]\w*){2,}" 31 REGEX_FILE_KCONFIG = re.compile(r".*Kconfig[\.\w+\-]*$") 37 REGEX_FILTER_SYMBOLS = re.compile(r"[A-Za-z0-9]$") 38 REGEX_NUMERIC = re.compile(r"0[xX][0-9a-fA-F]+|[0-9]+") 47 "Please note that specifying commits will 'git reset --hard\' " \ 53 parser.add_argument('-c', '--commit', dest='commit', action='store', 58 parser.add_argument('-d', '--diff', dest='diff', action='store', 61 "(e.g., -d commmit1..commit2)") [all …]
|
| /linux/arch/sparc/kernel/ |
| H A D | prom_32.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (C) 1996-2005 Paul Mackerras. 65 regs = rprop->value; in sparc32_path_component() 68 regs->which_io, regs->phys_addr); in sparc32_path_component() 82 regs = prop->value; in sbus_path_component() 85 regs->which_io, in sbus_path_component() 86 regs->phys_addr); in sbus_path_component() 101 regs = prop->value; in pci_path_component() 102 devfn = (regs->phys_hi >> 8) & 0xff; in pci_path_component() 126 regs = prop->value; in ebus_path_component() [all …]
|
| /linux/tools/virtio/virtio-trace/ |
| H A D | README | 1 Trace Agent for virtio-trace 6 - splice a page of ring-buffer to read_pipe without memory copying 7 - splice the page from write_pipe to virtio-console without memory copying 8 - write trace data to stdout by using -o option 9 - controlled by start/stop orders from a Host 18 5) The read/write threads start to read trace data from ring-buffers and 19 write the data to virtio-serial. 28 Makefile: Makefile of trace agent for virtio-trace 29 trace-agent.c: includes main function, sets up for operating trace agent 30 trace-agent.h: includes all structures and some macros [all …]
|
| H A D | trace-agent.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Guest agent for virtio-trace 15 #include "trace-agent.h" 24 #define WRITE_PATH_FMT "/dev/virtio-ports/trace-path-cpu%d" 25 #define CTL_PATH "/dev/virtio-ports/agent-ctl-path" 59 s->pipe_size = PIPE_INIT; in agent_info_new() 60 s->use_stdout = false; in agent_info_new() 61 s->cpus = get_total_cpus(); in agent_info_new() 62 s->ctl_fd = -1; in agent_info_new() 65 for (i = 0; i < s->cpus; i++) in agent_info_new() [all …]
|
| /linux/tools/testing/selftests/rcutorture/bin/ |
| H A D | kvm-remote.sh | 2 # SPDX-License-Identifier: GPL-2.0+ 6 # Usage: kvm-remote.sh "systems" [ <kvm.sh args> ] 7 # kvm-remote.sh "systems" /path/to/old/run [ <kvm-again.sh args> ] 16 if ! test -d tools/testing/selftests/rcutorture/bin 18 echo $scriptname must be run from top-level directory of kernel source tree. 23 PATH=${RCUTORTURE}/bin:$PATH; export PATH 29 if test -z "$systems" 37 # T: /tmp/kvm-remote.sh.NNNNNN where "NNNNNN" is set by mktemp 38 # resdir: /tmp/kvm-remote.sh.NNNNNN/res 39 # rundir: /tmp/kvm-remote.sh.NNNNNN/res/$ds ("-remote" suffix) [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | bpf_offload.py | 7 # June 1991 as shown in the file COPYING in the top-level directory of this 38 bpf_test_dir = os.path.dirname(os.path.realpath(__file__)) 53 log_level -= sub 101 Run a command in subprocess and return tuple of (retval, stdout); 104 proc = subprocess.Popen(cmd, shell=shell, stdout=subprocess.PIPE, 115 stdout, stderr = proc.communicate() 116 stdout = stdout.decode("utf-8") 117 stderr = stderr.decode("utf-8") 118 proc.stdout.close() 122 if stderr[-1] == "\n": [all …]
|
| /linux/tools/testing/selftests/net/lib/py/ |
| H A D | nsim.py | 1 # SPDX-License-Identifier: GPL-2.0 30 ret = ip("-d -j link show dev %s" % ifname, ns=ns) 31 self.dev = json.loads(ret.stdout)[0] 34 def dfs_write(self, path, val): argument 35 self.nsimdev.dfs_write(f'ports/{self.port_index}/' + path, val) 43 def ctrl_write(path, val): argument 44 fullpath = os.path.join("/sys/bus/netdevsim/", path) 48 def dfs_write(self, path, val): argument 49 fullpath = os.path.join(f"/sys/kernel/debug/netdevsim/netdevsim{self.addr}/", path) 57 if not os.path.exists("/sys/bus/netdevsim"): [all …]
|
| /linux/tools/testing/selftests/exec/ |
| H A D | binfmt_script.py | 2 # SPDX-License-Identifier: GPL-2.0 4 # Test that truncation of bprm->buf doesn't cause unexpected execs paths, along 10 # b5372fe5dc84 ("exec: load_script: Do not exec truncated interpreter path") 33 # test - produce a binfmt_script hashbang line for testing 35 # @size: bytes for bprm->buf line, including hashbang but not newline 38 # @leading: any leading whitespace before the executable path 54 remaining = size - len(hashbang) - len(leading) - len(root) - len(target) - len(arg) 57 middle += fill * (NAME_MAX - 1) 59 remaining -= NAME_MAX 73 script = "binfmt_script-%s" % (name) [all …]
|
| /linux/tools/net/ynl/pyynl/ |
| H A D | cli.py | 2 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 17 # pylint: disable=no-name-in-module,wrong-import-position 18 sys.path.append(pathlib.Path(__file__).resolve().parent.as_posix()) 24 # pylint: disable=too-few-public-methods,too-many-locals 39 Colored text if stdout is a TTY, otherwise plain text 41 if sys.stdout.isatty(): 48 """ Get terminal width in columns (80 if stdout is not a terminal) """ 53 Return the effective schema directory, preferring in-tree before 56 script_dir = os.path.dirname(os.path.abspath(__file__)) 57 schema_dir_ = os.path.abspath(f"{script_dir}/{RELATIVE_SCHEMA_DIR}") [all …]
|
| /linux/arch/powerpc/boot/ |
| H A D | serial.c | 1 // SPDX-License-Identifier: GPL-2.0 23 return scdp->open(); in serial_open() 31 scdp->putc(*buf++); in serial_write() 46 if (scdp->tstc()) { in serial_edit_cmdline() 47 while (((ch = scdp->getc()) != '\n') && (ch != '\r')) { in serial_edit_cmdline() 51 cp--; in serial_edit_cmdline() 52 count--; in serial_edit_cmdline() 58 cp--; in serial_edit_cmdline() 59 count--; in serial_edit_cmdline() 65 scdp->putc(ch); in serial_edit_cmdline() [all …]
|
| /linux/tools/testing/selftests/drivers/net/hw/ |
| H A D | iou-zcrx.py | 2 # SPDX-License-Identifier: GPL-2.0 5 from os import path 14 output = ethtool(f"-X {cfg.ifname} context new start {cfg.target} equal 1").stdout 20 … output = ethtool(f"-N {cfg.ifname} flow-type tcp6 dst-port {cfg.port} action {cfg.target}").stdout 26 …output = ethtool(f"-N {cfg.ifname} flow-type tcp6 dst-port {cfg.port} context {rss_ctx_id}").stdout 32 channels = cfg.ethnl.channels_get({'header': {'dev-index': cfg.ifindex}}) 33 channels = channels['combined-count'] 37 rings = cfg.ethnl.rings_get({'header': {'dev-index': cfg.ifindex}}) 39 hds_thresh = rings.get('hds-thresh', 0) 41 cfg.ethnl.rings_set({'header': {'dev-index': cfg.ifindex}, [all …]
|
| /linux/tools/perf/ |
| H A D | perf.c | 6 * This is the main hub from which the sub-commands (perf stat, 12 #include "util/build-id.h" 16 #include <subcmd/exec-cmd.h> 18 #include <subcmd/run-command.h> 19 #include "util/parse-events.h" 20 #include <subcmd/parse-options.h> 26 #include "perf-sys.h" 42 static int use_pager = -1; 53 { "buildid-cache", cmd_buildid_cache, 0 }, 54 { "buildid-list", cmd_buildid_list, 0 }, [all …]
|
| /linux/tools/testing/selftests/x86/bugs/ |
| H A D | its_permutations.py | 2 # SPDX-License-Identifier: GPL-2.0 11 test_dir = os.path.dirname(os.path.realpath(__file__)) 12 sys.path.insert(0, test_dir + '/../../kselftest') 24 ksft.test_result_skip("Skipping its_permutations.py: virtme-ng ('vng') not found in PATH.") 30 DEBUG = " -v " 33 # https://github.com/arighi/virtme-ng 34 # apt install virtme-ng 35 BOOT_CMD = f"vng --run {test_dir}/../../../../../arch/x86/boot/bzImage " 61 r"pass:([1-9]\d*)": OKGREEN, 62 r"fail:([1-9]\d*)": FAIL, [all …]
|
| /linux/tools/perf/scripts/python/ |
| H A D | parallel-perf.py | 2 # SPDX-License-Identifier: GPL-2.0 5 # options --cpu and --time so that each job processes a different chunk 20 glb_prog_name = "parallel-perf.py" 55 def Stdout(self): member in Work 62 pathlib.Path(self.output_dir).mkdir(parents=True, exist_ok=True) 71 stdout = self.Stdout() 74 self.popen = subprocess.Popen(self.cmd, stdout=subprocess.PIPE, stderr=stderr) 76 self.consumer = subprocess.Popen(args, stdin=self.popen.stdout, stdout=stdout, stderr=stderr) 78 self.popen = subprocess.Popen(self.cmd, stdout=stdout, stderr=stderr) 81 if os.path.exists(self.stderr_name): [all …]
|