/tools/lib/subcmd/ |
D | run-command.c | 29 int start_command(struct child_process *cmd) in start_command() argument 40 need_in = !cmd->no_stdin && cmd->in < 0; in start_command() 43 if (cmd->out > 0) in start_command() 44 close(cmd->out); in start_command() 47 cmd->in = fdin[1]; in start_command() 50 need_out = !cmd->no_stdout in start_command() 51 && !cmd->stdout_to_stderr in start_command() 52 && cmd->out < 0; in start_command() 57 else if (cmd->in) in start_command() 58 close(cmd->in); in start_command() [all …]
|
/tools/perf/util/ |
D | generate-cmdlist.sh | 15 while read cmd 18 /^NAME/,/perf-'"$cmd"'/H 21 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/ 23 }' "Documentation/perf-$cmd.txt" 29 while read cmd 32 /^NAME/,/perf-'"$cmd"'/H 35 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/ 37 }' "Documentation/perf-$cmd.txt" 44 while read cmd 47 /^NAME/,/perf-'"$cmd"'/H [all …]
|
/tools/perf/ |
D | perf.c | 52 const char *cmd; member 95 const char *cmd; member 102 if (strstarts(var, "pager.") && !strcmp(var + 6, c->cmd)) in pager_command_config() 108 static int check_pager_config(const char *cmd) in check_pager_config() argument 112 c.cmd = cmd; in check_pager_config() 121 if (strstarts(var, "tui.") && !strcmp(var + 4, c->cmd)) in browser_command_config() 123 if (strstarts(var, "gtk.") && !strcmp(var + 4, c->cmd)) in browser_command_config() 132 static int check_browser_config(const char *cmd) in check_browser_config() argument 136 c.cmd = cmd; in check_browser_config() 176 const char *cmd = (*argv)[0]; in handle_options() local [all …]
|
D | builtin-data.c | 21 #define for_each_cmd(cmd) \ argument 22 for (cmd = data_cmds; cmd && cmd->name; cmd++) 94 struct data_cmd *cmd; in cmd_data() local 107 for_each_cmd(cmd) { in cmd_data() 108 if (strcmp(cmd->name, cmdstr)) in cmd_data() 111 return cmd->fn(argc, argv); in cmd_data()
|
D | builtin-daemon.c | 637 union cmd { union 638 int cmd; member 642 int cmd; member 649 int cmd; member 656 int cmd; member 672 static int cmd_session_list(struct daemon *daemon, union cmd *cmd, FILE *out) in cmd_session_list() argument 674 char csv_sep = cmd->list.csv_sep; in cmd_session_list() 698 if (cmd->list.verbose) { in cmd_session_list() 738 if (!cmd->list.verbose) in cmd_session_list() 763 static int cmd_session_kill(struct daemon *daemon, union cmd *cmd, FILE *out) in cmd_session_kill() argument [all …]
|
/tools/testing/selftests/membarrier/ |
D | membarrier_test_impl.h | 12 static int sys_membarrier(int cmd, int flags) in sys_membarrier() argument 14 return syscall(__NR_membarrier, cmd, flags); in sys_membarrier() 19 int cmd = -1, flags = 0; in test_membarrier_cmd_fail() local 22 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_cmd_fail() 25 test_name, cmd, flags); in test_membarrier_cmd_fail() 36 test_name, cmd, flags, errno); in test_membarrier_cmd_fail() 42 int cmd = MEMBARRIER_CMD_QUERY, flags = 1; in test_membarrier_flags_fail() local 45 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_flags_fail() 65 int cmd = MEMBARRIER_CMD_GLOBAL, flags = 0; in test_membarrier_global_success() local 68 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_global_success() [all …]
|
/tools/perf/trace/beauty/ |
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 …]
|
D | flock.c | 31 #define P_CMD(cmd) \ in syscall_arg__scnprintf_flock() argument 32 if ((op & LOCK_##cmd) == LOCK_##cmd) { \ in syscall_arg__scnprintf_flock() 33 …ntf(bf + printed, size - printed, "%s%s%s", printed ? "|" : "", show_prefix ? prefix : "", #cmd); \ in syscall_arg__scnprintf_flock() 34 op &= ~LOCK_##cmd; \ in syscall_arg__scnprintf_flock()
|
/tools/testing/selftests/tc-testing/plugin-lib/ |
D | nsPlugin.py | 81 cmd = '$IP link add $DEV0 type veth peer name $DEV1' 82 self._exec_cmd('pre', cmd) 83 cmd = '$IP link set $DEV0 up' 84 self._exec_cmd('pre', cmd) 86 cmd = '$IP link set $DEV1 up' 87 self._exec_cmd('pre', cmd) 90 cmd = '$IP link del $DEV0' 91 self._exec_cmd('post', cmd) 100 cmd = '$IP netns add {}'.format(self.args.NAMES['NS']) 101 self._exec_cmd('pre', cmd) [all …]
|
/tools/usb/usbip/src/ |
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/vm/ |
D | gup_test.c | 20 static unsigned long cmd = GUP_FAST_BENCHMARK; variable 26 static char *cmd_to_str(unsigned long cmd) in cmd_to_str() argument 28 switch (cmd) { in cmd_to_str() 51 if ((cmd == PIN_FAST_BENCHMARK) || (cmd == GUP_FAST_BENCHMARK) || in gup_thread() 52 (cmd == PIN_LONGTERM_BENCHMARK)) { in gup_thread() 55 if (ioctl(gup_fd, cmd, &gup)) in gup_thread() 60 cmd_to_str(cmd), gup.get_delta_usec, in gup_thread() 69 if (ioctl(gup_fd, cmd, &gup)) { in gup_thread() 75 printf("%s: done\n", cmd_to_str(cmd)); in gup_thread() 96 cmd = PIN_FAST_BENCHMARK; in main() [all …]
|
/tools/testing/selftests/net/ |
D | devlink_port_split.py | 26 def run_command(cmd, should_fail=False): argument 32 p = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=True) 37 print("Error sending command: %s" % cmd) 57 cmd = "devlink -j port show" 58 stdout, stderr = run_command(cmd) 81 cmd = "devlink -j port show %s" % port 82 stdout, stderr = run_command(cmd) 99 cmd = "devlink -j port show %s" % port.name 100 stdout, stderr = run_command(cmd) 115 cmd = "devlink port split %s count %s" % (port.bus_info, k) [all …]
|
/tools/testing/selftests/bpf/prog_tests/ |
D | test_ima.c | 48 char cmd[256]; in test_test_ima() local 70 snprintf(cmd, sizeof(cmd), "./ima_setup.sh setup %s", measured_dir); in test_test_ima() 71 err = system(cmd); in test_test_ima() 72 if (CHECK(err, "failed to run command", "%s, errno = %d\n", cmd, errno)) in test_test_ima() 84 snprintf(cmd, sizeof(cmd), "./ima_setup.sh cleanup %s", measured_dir); in test_test_ima() 85 err = system(cmd); in test_test_ima() 86 CHECK(err, "failed to run command", "%s, errno = %d\n", cmd, errno); in test_test_ima()
|
D | select_reuseport.c | 247 static void check_data(int type, sa_family_t family, const struct cmd *cmd, in check_data() argument 312 expected.len += cmd ? sizeof(*cmd) : 0; in check_data() 406 static void do_test(int type, sa_family_t family, struct cmd *cmd, in do_test() argument 411 struct cmd rcv_cmd; in do_test() 414 cli_fd = send_data(type, family, cmd, cmd ? sizeof(*cmd) : 0, in do_test() 424 cmd ? cmd->reuseport_index : -1, in do_test() 425 cmd ? cmd->pass_on_failure : -1); in do_test() 427 check_data(type, family, cmd, cli_fd); in do_test() 433 cmd->reuseport_index != ev.data.u32, in do_test() 436 cmd->pass_on_failure, cmd->reuseport_index, ev.data.u32); in do_test() [all …]
|
D | test_local_storage.c | 120 char cmd[256]; in test_test_local_storage() local 145 snprintf(cmd, sizeof(cmd), "cp /bin/rm %s", tmp_exec_path); in test_test_local_storage() 146 if (CHECK_FAIL(system(cmd))) in test_test_local_storage() 173 snprintf(cmd, sizeof(cmd), "mv %s/copy_of_rm %s/check_null_ptr", in test_test_local_storage() 175 if (CHECK_FAIL(system(cmd))) in test_test_local_storage() 193 snprintf(cmd, sizeof(cmd), "rm -rf %s", tmp_dir_path); in test_test_local_storage() 194 system(cmd); in test_test_local_storage()
|
D | netcnt.c | 22 char cmd[128]; in test_netcnt() local 42 snprintf(cmd, sizeof(cmd), "%s ::1 -A -c 10000 -q > /dev/null", ping_command(AF_INET6)); in test_netcnt() 43 ASSERT_OK(system(cmd), cmd); in test_netcnt()
|
/tools/perf/tests/ |
D | python-use.c | 14 char *cmd; in test__python_use() local 17 if (asprintf(&cmd, "echo \"import sys ; sys.path.append('%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()
|
D | make | 308 cmd="cd $(PERF) && $(MAKE_F) $($@) $(PARALLEL_OPT) $(O_OPT) DESTDIR=$$TMP_DEST"; \ 309 printf "%*.*s: %s\n" $(max_width) $(max_width) "$@" "$$cmd" && echo $$cmd > $@ && \ 310 ( eval $$cmd ) >> $@ 2>&1; \ 318 cmd="cd $(PERF) && $(MAKE_F) $($@) $(PARALLEL_OPT) $(O_OPT) DESTDIR=$$TMP_DEST"; \ 319 printf "%*.*s: %s\n" $(max_width) $(max_width) "$@" "$$cmd" && echo $$cmd > $@ && \ 320 ( eval $$cmd ) >> $@ 2>&1; \ 328 cmd="cd $(PERF) && $(MAKE_F) $($@) $(PARALLEL_OPT) $(O_OPT) DESTDIR=$$TMP_DEST"; \ 329 printf "%*.*s: %s\n" $(max_width) $(max_width) "$@" "$$cmd" && echo $$cmd > $@ && \ 330 ( eval $$cmd ) >> $@ 2>&1; \ 339 …cmd="cd $(PERF) && $(MAKE_F) $($(patsubst %_O,%,$@)) $(PARALLEL_OPT) O=$$TMP_O DESTDIR=$$TMP_DEST"… [all …]
|
/tools/testing/selftests/rcutorture/bin/ |
D | kvm-test-1-run-qemu.sh | 32 echo $0: Nonexistent qemu-cmd file: $resdir/qemu-cmd 39 grep '^#' $resdir/qemu-cmd | sed -e 's/^# //' > $T/qemu-cmd-settings 40 . $T/qemu-cmd-settings 48 sed -e 's/^[^#].*$/'"$taskset_command"'& 2>\&1 \&/' < $resdir/qemu-cmd > $T/qemu-cmd 49 echo 'qemu_pid=$!' >> $T/qemu-cmd 50 echo 'echo $qemu_pid > $resdir/qemu-pid' >> $T/qemu-cmd 51 echo 'taskset -c -p $qemu_pid > $resdir/qemu-affinity' >> $T/qemu-cmd 58 ( . $T/qemu-cmd; wait `cat $resdir/qemu-pid`; echo $? > $resdir/qemu-retval ) &
|
/tools/build/ |
D | Build.include | 41 echo-cmd = $(if $($(quiet)cmd_$(1)),\ 45 # Replace >$< with >$$< to preserve $ when reloading the .cmd file 47 # Replace >#< with >$(pound)< to avoid starting a comment in the .cmd file 51 make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))) 59 # Copy dependency data into .cmd file 62 dep-cmd = $(if $(wildcard $(fixdep)), \ 63 $(fixdep) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp; \ 65 mv -f $(dot-target).tmp $(dot-target).cmd, \ 66 printf '$(pound) cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \ 67 printf '$(pound) using basic dep data\n\n' >> $(dot-target).cmd; \ [all …]
|
/tools/testing/selftests/tpm2/ |
D | tpm2.py | 380 def send_cmd(self, cmd): argument 381 self.tpm.write(cmd) 394 sys.stderr.write(hex_dump(cmd) + os.linesep) 400 cc = struct.unpack('>I', cmd[6:10])[0] 412 cmd = struct.pack(fmt, 420 rsp = self.send_cmd(cmd) 444 cmd = struct.pack( 454 self.send_cmd(cmd) 458 cmd = struct.pack(fmt, 471 return struct.unpack('>I', self.send_cmd(cmd)[10:14])[0] [all …]
|
/tools/testing/selftests/bpf/progs/ |
D | test_select_reuseport_kern.c | 71 struct cmd *cmd, cmd_copy; in _select_by_skb_data() local 122 if ((th->doff << 2) + sizeof(*cmd) > data_check.len) in _select_by_skb_data() 127 cmd = &cmd_copy; in _select_by_skb_data() 137 if (sizeof(struct udphdr) + sizeof(*cmd) > data_check.len) in _select_by_skb_data() 139 if (data + sizeof(struct udphdr) + sizeof(*cmd) > data_end) { in _select_by_skb_data() 143 cmd = &cmd_copy; in _select_by_skb_data() 145 cmd = data + sizeof(struct udphdr); in _select_by_skb_data() 155 index = cmd->reuseport_index; in _select_by_skb_data() 169 if (cmd->pass_on_failure) in _select_by_skb_data()
|
/tools/testing/selftests/net/forwarding/ |
D | ethtool_lib.sh | 6 cmd='/ETHTOOL_LINK_MODE_[^[:space:]]*_BIT[[:space:]]+=[[:space:]]+/ \ 14 awk "${cmd}" /usr/include/linux/ethtool.h 19 local cmd="$@" 20 local out=$(ethtool -s $cmd 2>&1 | wc -l) 22 check_err $out "error in configuration. $cmd"
|
/tools/perf/ui/browsers/ |
D | scripts.c | 156 void run_script(char *cmd) in run_script() argument 158 pr_debug("Running %s\n", cmd); in run_script() 160 if (system(cmd) < 0) in run_script() 161 pr_warning("Cannot run %s\n", cmd); in run_script() 174 char *cmd, script_name[SCRIPT_FULLPATH_LEN]; in script_browse() local 181 if (asprintf(&cmd, "%s%s %s %s%s 2>&1 | less", in script_browse() 189 run_script(cmd); in script_browse() 190 free(cmd); in script_browse()
|
/tools/power/cpupower/utils/ |
D | cpupower.c | 47 const char *cmd; member 75 printf("\t%s\n", commands[i].cmd); in print_help() 176 const char *cmd; in main() local 191 cmd = argv[0]; in main() 204 argv[0] = cmd = "help"; in main() 227 if (strcmp(p->cmd, cmd)) in main() 231 "privileges\n"), cmd); in main()
|