| /tools/lib/subcmd/ |
| A D | run-command.c | 42 need_in = !cmd->no_stdin && cmd->in < 0; in start_command() 54 && cmd->out < 0; in start_command() 66 need_err = !cmd->no_stderr && cmd->err < 0; in start_command() 84 if (!cmd->pid) { in start_command() 92 close(cmd->in); in start_command() 114 if (cmd->dir && chdir(cmd->dir)) in start_command() 117 if (cmd->env) { in start_command() 118 for (; *cmd->env; cmd->env++) { in start_command() 128 exit(cmd->no_exec_cmd(cmd)); in start_command() 132 execvp(cmd->argv[0], (char *const*) cmd->argv); in start_command() [all …]
|
| /tools/perf/util/ |
| A D | generate-cmdlist.sh | 15 while read cmd 18 /^NAME/,/perf-'"$cmd"'/H 21 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/ 29 while read cmd 32 /^NAME/,/perf-'"$cmd"'/H 35 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/ 44 while read cmd 47 /^NAME/,/perf-'"$cmd"'/H 50 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/ 59 while read cmd [all …]
|
| /tools/testing/selftests/kvm/lib/arm64/ |
| A D | gic_v3_its.c | 108 cmd->raw_cmd_le[0] = cpu_to_le64(cmd->raw_cmd[0]); in its_fixup_cmd() 109 cmd->raw_cmd_le[1] = cpu_to_le64(cmd->raw_cmd[1]); in its_fixup_cmd() 110 cmd->raw_cmd_le[2] = cpu_to_le64(cmd->raw_cmd[2]); in its_fixup_cmd() 111 cmd->raw_cmd_le[3] = cpu_to_le64(cmd->raw_cmd[3]); in its_fixup_cmd() 179 its_fixup_cmd(cmd); in its_send_cmd() 181 WRITE_ONCE(*dst, *cmd); in its_send_cmd() 203 struct its_cmd_block cmd = {}; in its_send_mapd_cmd() local 209 its_encode_valid(&cmd, valid); in its_send_mapd_cmd() 211 its_send_cmd(cmdq_base, &cmd); in its_send_mapd_cmd() 216 struct its_cmd_block cmd = {}; in its_send_mapc_cmd() local [all …]
|
| /tools/perf/ |
| A D | perf.c | 124 c.cmd = cmd; in check_pager_config() 148 c.cmd = cmd; in check_browser_config() 211 if (!strcmp(cmd, "--help") || !strcmp(cmd, "--version")) in handle_options() 399 if (strcmp(p->cmd, cmd)) in handle_internal_command() 407 char *cmd; in execv_dashed_external() local 473 if (!cmd) in main() 499 cmd += 5; in main() 506 cmd -= 5; in main() 566 cmd = argv[0] = help_unknown_cmd(cmd, &main_cmds); in main() 569 if (!cmd) in main() [all …]
|
| A D | builtin-data.c | 21 #define for_each_cmd(cmd) \ argument 22 for (cmd = data_cmds; cmd && cmd->name; cmd++) 102 struct data_cmd *cmd; in cmd_data() local 115 for_each_cmd(cmd) { in cmd_data() 116 if (strcmp(cmd->name, cmdstr)) in cmd_data() 119 return cmd->fn(argc, argv); in cmd_data()
|
| A D | builtin-daemon.c | 814 union cmd cmd; in handle_server_socket() local 822 if (sizeof(cmd) != readn(fd, &cmd, sizeof(cmd))) { in handle_server_socket() 833 switch (cmd.cmd) { in handle_server_socket() 1375 if (sizeof(*cmd) != writen(fd, cmd, sizeof(*cmd))) { in send_cmd() 1405 union cmd cmd; in send_cmd_list() local 1408 cmd.list.cmd = CMD_LIST; in send_cmd_list() 1425 union cmd cmd; in __cmd_signal() local 1451 union cmd cmd; in __cmd_stop() local 1463 cmd.cmd = CMD_STOP; in __cmd_stop() 1477 union cmd cmd; in __cmd_ping() local [all …]
|
| /tools/testing/selftests/membarrier/ |
| A D | membarrier_test_impl.h | 14 static int sys_membarrier(int cmd, int flags) in sys_membarrier() argument 16 return syscall(__NR_membarrier, cmd, flags); in sys_membarrier() 25 registrations |= cmd; in test_membarrier_get_registrations() 46 int cmd = -1, flags = 0; in test_membarrier_cmd_fail() local 49 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_cmd_fail() 52 test_name, cmd, flags); in test_membarrier_cmd_fail() 63 test_name, cmd, flags, errno); in test_membarrier_cmd_fail() 72 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_flags_fail() 95 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_global_success() 134 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_register_private_expedited_success() [all …]
|
| /tools/perf/trace/beauty/ |
| A D | fcntl.c | 73 int cmd = syscall_arg__val(arg, 1); in syscall_arg__scnprintf_fcntl_arg() local 75 if (cmd == F_DUPFD) in syscall_arg__scnprintf_fcntl_arg() 78 if (cmd == F_SETFD) in syscall_arg__scnprintf_fcntl_arg() 81 if (cmd == F_SETFL) in syscall_arg__scnprintf_fcntl_arg() 84 if (cmd == F_SETOWN) in syscall_arg__scnprintf_fcntl_arg() 87 if (cmd == F_SETLEASE) in syscall_arg__scnprintf_fcntl_arg() 93 if (cmd == F_SETLK || cmd == F_SETLKW || cmd == F_GETLK || in syscall_arg__scnprintf_fcntl_arg() 94 cmd == F_OFD_SETLK || cmd == F_OFD_SETLKW || cmd == F_OFD_GETLK || in syscall_arg__scnprintf_fcntl_arg() 95 cmd == F_GETOWN_EX || cmd == F_SETOWN_EX || in syscall_arg__scnprintf_fcntl_arg() 96 cmd == F_GET_RW_HINT || cmd == F_SET_RW_HINT || in syscall_arg__scnprintf_fcntl_arg() [all …]
|
| /tools/testing/cxl/test/ |
| A D | mem.c | 283 pl = cmd->payload_out; in mock_get_event() 506 if (cmd->size_out != 0) in mock_set_timestamp() 679 if (cmd->size_in != 0) in mock_sanitize() 682 if (cmd->size_out != 0) in mock_sanitize() 709 if (cmd->size_in != 0) in mock_secure_erase() 731 if (cmd->size_in) in mock_get_security_state() 894 if (cmd->size_in != 0) in mock_freeze_security() 1526 cmd->return_code = 0; in mock_get_supported_features() 1553 rc = mock_gsl(cmd); in cxl_mock_mbox_send() 1562 rc = mock_id(cmd); in cxl_mock_mbox_send() [all …]
|
| /tools/usb/usbip/src/ |
| A D | usbip.c | 95 const struct command *cmd; in usbip_help() local 110 for (cmd = cmds; cmd->name != NULL; cmd++) in usbip_help() 111 if (cmd->help != NULL) in usbip_help() 112 printf(" %-10s %s\n", cmd->name, cmd->help); in usbip_help() 127 static int run_command(const struct command *cmd, int argc, char *argv[]) in run_command() argument 129 dbg("running command: `%s'", cmd->name); in run_command() 130 return cmd->fn(argc, argv); in run_command() 142 char *cmd; in main() local 175 cmd = argv[optind]; in main() 176 if (cmd) { in main() [all …]
|
| /tools/testing/selftests/iommu/ |
| A D | iommufd_utils.h | 104 .size = sizeof(cmd), in _test_cmd_mock_domain() 116 assert(cmd.id != 0); in _test_cmd_mock_domain() 135 .size = sizeof(cmd), in _test_cmd_mock_domain_flags() 147 assert(cmd.id != 0); in _test_cmd_mock_domain_flags() 166 .size = sizeof(cmd), in _test_cmd_mock_domain_replace() 195 .size = sizeof(cmd), in _test_cmd_hwpt_alloc() 298 .size = sizeof(cmd), in _test_cmd_hwpt_invalidate() 593 cmd.iova = *iova; in _test_ioctl_ioas_map() 596 *iova = cmd.iova; in _test_ioctl_ioas_map() 695 cmd.iova = *iova; in _test_ioctl_ioas_map_file() [all …]
|
| /tools/testing/selftests/drivers/net/hw/ |
| A D | devlink_port_split.py | 26 def run_command(cmd, should_fail=False): argument 57 cmd = "devlink -j port show" 58 stdout, stderr = run_command(cmd) 82 stdout, stderr = run_command(cmd) 100 stdout, stderr = run_command(cmd) 136 stdout, stderr = run_command(cmd) 214 cmd = "udevadm settle" 215 stdout, stderr = run_command(cmd) 262 cmd = "devlink -j dev show" 270 cmd = "devlink dev show %s" % dev [all …]
|
| /tools/testing/selftests/drivers/net/ |
| A D | ping.py | 9 from lib.py import bkg, cmd, wait_port_listen, rand_port 18 cmd("ping -c 1 -W0.5 " + cfg.remote_addr_v["4"]) 19 cmd("ping -c 1 -W0.5 " + cfg.addr_v["4"], host=cfg.remote) 20 cmd("ping -s 65000 -c 1 -W0.5 " + cfg.remote_addr_v["4"]) 27 cmd("ping -c 1 -W5 " + cfg.remote_addr_v["6"]) 28 cmd("ping -c 1 -W5 " + cfg.addr_v["6"], host=cfg.remote) 29 cmd("ping -s 65000 -c 1 -W0.5 " + cfg.remote_addr_v["6"]) 73 defer(cmd, f"ip link set dev {cfg.ifname} xdpgeneric off") 120 cmd(f"ip link set dev {cfg.ifname} mtu 1500", shell=True) 143 cmd(f"ip link set dev {cfg.ifname} mtu 1500", shell=True) [all …]
|
| /tools/testing/selftests/mm/ |
| A D | gup_test.c | 34 switch (cmd) { in cmd_to_str() 57 if ((cmd == PIN_FAST_BENCHMARK) || (cmd == GUP_FAST_BENCHMARK) || in gup_thread() 58 (cmd == PIN_LONGTERM_BENCHMARK)) { in gup_thread() 61 status = ioctl(gup_fd, cmd, &gup); in gup_thread() 76 status = ioctl(gup_fd, cmd, &gup); in gup_thread() 104 cmd = PIN_FAST_BENCHMARK; in main() 107 cmd = PIN_BASIC_TEST; in main() 110 cmd = PIN_LONGTERM_BENCHMARK; in main() 113 cmd = DUMP_USER_PAGES_TEST; in main() 150 cmd = GUP_BASIC_TEST; in main() [all …]
|
| /tools/perf/tests/ |
| A D | python-use.c | 14 char *cmd; in test__python_use() local 17 if (asprintf(&cmd, "echo \"import sys ; sys.path.insert(0, '%s'); import perf\" | %s %s", in test__python_use() 21 pr_debug("python usage test: \"%s\"\n", cmd); in test__python_use() 22 ret = system(cmd) ? -1 : 0; in test__python_use() 23 free(cmd); in test__python_use()
|
| /tools/testing/selftests/kvm/arm64/ |
| A D | vgic_irq.c | 65 kvm_inject_cmd cmd; member 96 kvm_inject_cmd cmd; member 195 .cmd = cmd, in kvm_inject_call() 249 _KVM_INJECT(cmd, intid, true); in test_inject_fail() 258 kvm_inject_cmd cmd) in guest_inject() argument 295 kvm_inject_cmd cmd) in guest_restore_active() argument 316 KVM_ACTIVATE(cmd, intid); in guest_restore_active() 363 kvm_inject_cmd cmd) in test_inject_preemption() argument 382 KVM_INJECT(cmd, intid); in test_inject_preemption() 652 kvm_inject_cmd cmd = inject_args->cmd; in run_guest_cmd() local [all …]
|
| /tools/testing/selftests/net/netfilter/ |
| A D | nft_audit.sh | 96 cmd="add rule $table c1 counter" 98 do_test "nft $cmd" \ 101 do_test "nft $cmd; $cmd" \ 104 cmd="" 108 cmd+="$sep add rule $table $chain counter" 112 do_test "nft $cmd" \ 237 cmd='delete rule t1 c1 handle' 238 do_test "nft $cmd ${handles[1]}; $cmd ${handles[2]}" \
|
| /tools/include/nolibc/sys/ |
| A D | ioctl.h | 22 long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) in sys_ioctl() argument 24 return my_syscall3(__NR_ioctl, fd, cmd, arg); in sys_ioctl() 27 #define ioctl(fd, cmd, arg) __sysret(sys_ioctl(fd, cmd, (unsigned long)(arg))) argument
|
| A D | reboot.h | 23 ssize_t sys_reboot(int magic1, int magic2, int cmd, void *arg) in sys_reboot() argument 25 return my_syscall4(__NR_reboot, magic1, magic2, cmd, arg); in sys_reboot() 29 int reboot(int cmd) in reboot() argument 31 return __sysret(sys_reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, 0)); in reboot()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | test_local_storage.c | 97 char cmd[256]; in test_test_local_storage() local 120 snprintf(cmd, sizeof(cmd), "cp /bin/rm %s", tmp_exec_path); in test_test_local_storage() 121 if (!ASSERT_OK(system(cmd), "system(cp)")) in test_test_local_storage() 147 snprintf(cmd, sizeof(cmd), "mv %s/copy_of_rm %s/check_null_ptr", in test_test_local_storage() 149 if (!ASSERT_OK(system(cmd), "system(mv)")) in test_test_local_storage() 165 snprintf(cmd, sizeof(cmd), "rm -rf %s", tmp_dir_path); in test_test_local_storage() 166 system(cmd); in test_test_local_storage()
|
| /tools/testing/selftests/bpf/progs/ |
| A D | test_cgroup1_hierarchy.c | 17 static int bpf_link_create_verify(int cmd) in bpf_link_create_verify() argument 23 if (cmd != BPF_LINK_CREATE) in bpf_link_create_verify() 54 int BPF_PROG(lsm_run, int cmd, union bpf_attr *attr, unsigned int size, bool kernel) in BPF_PROG() argument 56 return bpf_link_create_verify(cmd); in BPF_PROG() 60 int BPF_PROG(lsm_s_run, int cmd, union bpf_attr *attr, unsigned int size, bool kernel) in BPF_PROG() argument 62 return bpf_link_create_verify(cmd); in BPF_PROG()
|
| /tools/testing/selftests/rcutorture/bin/ |
| A D | kvm-test-1-run-qemu.sh | 31 echo $0: Nonexistent qemu-cmd file: $resdir/qemu-cmd 38 grep '^#' $resdir/qemu-cmd | sed -e 's/^# //' > $T/qemu-cmd-settings 39 . $T/qemu-cmd-settings 47 sed -e 's/^[^#].*$/'"$taskset_command"'& 2>\&1 \&/' < $resdir/qemu-cmd > $T/qemu-cmd 48 echo 'qemu_pid=$!' >> $T/qemu-cmd 49 echo 'echo $qemu_pid > $resdir/qemu-pid' >> $T/qemu-cmd 50 echo 'taskset -c -p $qemu_pid > $resdir/qemu-affinity' >> $T/qemu-cmd 57 ( . $T/qemu-cmd; wait `cat $resdir/qemu-pid`; echo $? > $resdir/qemu-retval ) &
|
| /tools/testing/selftests/net/ |
| A D | link_netns.py | 78 cmd = "link add" 80 cmd += f" netns {netns}" 82 cmd += f" link-netns {link_netns}" 83 cmd += f" {cargs} foo type {typ} {targs}" 84 ip(cmd, ns=src_net) 121 cmd = "link add" 123 cmd += f" netns {netns}" 125 cmd += f" link-netns {link_netns}" 126 cmd += f" foo type {typ}" 128 cmd += f" peer netns {peer_netns}" [all …]
|
| /tools/build/ |
| A D | Build.include | 43 echo-cmd = $(if $($(quiet)cmd_$(1)),\ 47 # Replace >$< with >$$< to preserve $ when reloading the .cmd file 49 # Replace >#< with >$(pound)< to avoid starting a comment in the .cmd file 53 make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))) 61 # Copy dependency data into .cmd file 71 printf '\n%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd) 76 # dependencies in the cmd file 79 $(echo-cmd) $(cmd_$(1)); \ 80 $(dep-cmd)) 86 $(echo-cmd) $(cmd_$(1)); \ [all …]
|
| /tools/testing/selftests/kvm/lib/ |
| A D | ucall_common.c | 82 void ucall_assert(uint64_t cmd, const char *exp, const char *file, in ucall_assert() argument 89 uc->cmd = cmd; in ucall_assert() 104 void ucall_fmt(uint64_t cmd, const char *fmt, ...) in ucall_fmt() argument 110 uc->cmd = cmd; in ucall_fmt() 121 void ucall(uint64_t cmd, int nargs, ...) in ucall() argument 129 WRITE_ONCE(uc->cmd, cmd); in ucall() 162 return uc->cmd; in get_ucall()
|