Home
last modified time | relevance | path

Searched refs:child (Results 1 – 25 of 59) sorted by relevance

123

/tools/perf/arch/x86/tests/
Dbp-modify.c32 int child = fork(); in spawn_child() local
34 if (child == 0) { in spawn_child()
52 return child; in spawn_child()
61 pid_t child; in bp_modify1() local
65 child = spawn_child(); in bp_modify1()
67 waitpid(child, &status, 0); in bp_modify1()
81 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1()
88 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1()
95 if (ptrace(PTRACE_POKEUSER, child, in bp_modify1()
101 if (ptrace(PTRACE_CONT, child, NULL, NULL)) { in bp_modify1()
[all …]
/tools/testing/selftests/powerpc/ptrace/
Dptrace.h60 int start_trace(pid_t child) in start_trace() argument
64 ret = ptrace(PTRACE_ATTACH, child, NULL, NULL); in start_trace()
69 ret = waitpid(child, NULL, 0); in start_trace()
70 if (ret != child) { in start_trace()
77 int stop_trace(pid_t child) in stop_trace() argument
81 ret = ptrace(PTRACE_DETACH, child, NULL, NULL); in stop_trace()
89 int cont_trace(pid_t child) in cont_trace() argument
93 ret = ptrace(PTRACE_CONT, child, NULL, NULL); in cont_trace()
101 int ptrace_read_regs(pid_t child, unsigned long type, unsigned long regs[], in ptrace_read_regs() argument
107 FAIL_IF(start_trace(child)); in ptrace_read_regs()
[all …]
Dptrace-tm-gpr.c87 int trace_tm_gpr(pid_t child) in trace_tm_gpr() argument
92 FAIL_IF(start_trace(child)); in trace_tm_gpr()
93 FAIL_IF(show_gpr(child, gpr)); in trace_tm_gpr()
95 FAIL_IF(show_fpr(child, fpr)); in trace_tm_gpr()
97 FAIL_IF(show_ckpt_fpr(child, fpr)); in trace_tm_gpr()
99 FAIL_IF(show_ckpt_gpr(child, gpr)); in trace_tm_gpr()
101 FAIL_IF(write_ckpt_gpr(child, GPR_3)); in trace_tm_gpr()
102 FAIL_IF(write_ckpt_fpr(child, FPR_3_REP)); in trace_tm_gpr()
105 FAIL_IF(stop_trace(child)); in trace_tm_gpr()
Dptrace-tar.c51 int trace_tar(pid_t child) in trace_tar() argument
55 FAIL_IF(start_trace(child)); in trace_tar()
56 FAIL_IF(show_tar_registers(child, reg)); in trace_tar()
61 FAIL_IF(stop_trace(child)); in trace_tar()
65 int trace_tar_write(pid_t child) in trace_tar_write() argument
67 FAIL_IF(start_trace(child)); in trace_tar_write()
68 FAIL_IF(write_tar_registers(child, TAR_2, PPR_2, DSCR_2)); in trace_tar_write()
72 FAIL_IF(stop_trace(child)); in trace_tar_write()
Dptrace-tm-vsx.c84 int trace_tm_vsx(pid_t child) in trace_tm_vsx() argument
89 FAIL_IF(start_trace(child)); in trace_tm_vsx()
90 FAIL_IF(show_vsx(child, vsx)); in trace_tm_vsx()
92 FAIL_IF(show_vmx(child, vmx)); in trace_tm_vsx()
94 FAIL_IF(show_vsx_ckpt(child, vsx)); in trace_tm_vsx()
96 FAIL_IF(show_vmx_ckpt(child, vmx)); in trace_tm_vsx()
103 FAIL_IF(write_vsx_ckpt(child, vsx)); in trace_tm_vsx()
104 FAIL_IF(write_vmx_ckpt(child, vmx)); in trace_tm_vsx()
106 FAIL_IF(stop_trace(child)); in trace_tm_vsx()
Dptrace-tm-spd-gpr.c93 int trace_tm_spd_gpr(pid_t child) in trace_tm_spd_gpr() argument
98 FAIL_IF(start_trace(child)); in trace_tm_spd_gpr()
99 FAIL_IF(show_gpr(child, gpr)); in trace_tm_spd_gpr()
101 FAIL_IF(show_fpr(child, fpr)); in trace_tm_spd_gpr()
103 FAIL_IF(show_ckpt_fpr(child, fpr)); in trace_tm_spd_gpr()
105 FAIL_IF(show_ckpt_gpr(child, gpr)); in trace_tm_spd_gpr()
107 FAIL_IF(write_ckpt_gpr(child, GPR_3)); in trace_tm_spd_gpr()
108 FAIL_IF(write_ckpt_fpr(child, FPR_3_REP)); in trace_tm_spd_gpr()
112 FAIL_IF(stop_trace(child)); in trace_tm_spd_gpr()
Dptrace-tm-spd-vsx.c96 int trace_tm_spd_vsx(pid_t child) in trace_tm_spd_vsx() argument
101 FAIL_IF(start_trace(child)); in trace_tm_spd_vsx()
102 FAIL_IF(show_vsx(child, vsx)); in trace_tm_spd_vsx()
104 FAIL_IF(show_vmx(child, vmx)); in trace_tm_spd_vsx()
106 FAIL_IF(show_vsx_ckpt(child, vsx)); in trace_tm_spd_vsx()
108 FAIL_IF(show_vmx_ckpt(child, vmx)); in trace_tm_spd_vsx()
116 FAIL_IF(write_vsx_ckpt(child, vsx)); in trace_tm_spd_vsx()
117 FAIL_IF(write_vmx_ckpt(child, vmx)); in trace_tm_spd_vsx()
121 FAIL_IF(stop_trace(child)); in trace_tm_spd_vsx()
Dptrace-gpr.c55 int trace_gpr(pid_t child) in trace_gpr() argument
60 FAIL_IF(start_trace(child)); in trace_gpr()
61 FAIL_IF(show_gpr(child, gpr)); in trace_gpr()
63 FAIL_IF(show_fpr(child, fpr)); in trace_gpr()
65 FAIL_IF(write_gpr(child, GPR_3)); in trace_gpr()
66 FAIL_IF(write_fpr(child, FPR_3_REP)); in trace_gpr()
67 FAIL_IF(stop_trace(child)); in trace_gpr()
Dptrace-vsx.c37 int trace_vsx(pid_t child) in trace_vsx() argument
42 FAIL_IF(start_trace(child)); in trace_vsx()
43 FAIL_IF(show_vsx(child, vsx)); in trace_vsx()
45 FAIL_IF(show_vmx(child, vmx)); in trace_vsx()
52 FAIL_IF(write_vsx(child, vsx)); in trace_vsx()
53 FAIL_IF(write_vmx(child, vmx)); in trace_vsx()
54 FAIL_IF(stop_trace(child)); in trace_vsx()
Dptrace-tm-tar.c90 int trace_tm_tar(pid_t child) in trace_tm_tar() argument
94 FAIL_IF(start_trace(child)); in trace_tm_tar()
95 FAIL_IF(show_tar_registers(child, regs)); in trace_tm_tar()
100 FAIL_IF(show_tm_checkpointed_state(child, regs)); in trace_tm_tar()
105 FAIL_IF(write_ckpt_tar_registers(child, TAR_4, PPR_4, DSCR_4)); in trace_tm_tar()
110 FAIL_IF(stop_trace(child)); in trace_tm_tar()
Dptrace-tm-spd-tar.c101 int trace_tm_spd_tar(pid_t child) in trace_tm_spd_tar() argument
105 FAIL_IF(start_trace(child)); in trace_tm_spd_tar()
106 FAIL_IF(show_tar_registers(child, regs)); in trace_tm_spd_tar()
111 FAIL_IF(show_tm_checkpointed_state(child, regs)); in trace_tm_spd_tar()
116 FAIL_IF(write_ckpt_tar_registers(child, TAR_4, PPR_4, DSCR_4)); in trace_tm_spd_tar()
122 FAIL_IF(stop_trace(child)); in trace_tm_spd_tar()
Dptrace-tm-spr.c97 int trace_tm_spr(pid_t child) in trace_tm_spr() argument
99 FAIL_IF(start_trace(child)); in trace_tm_spr()
100 FAIL_IF(show_tm_spr(child, (struct tm_spr_regs *)&pptr->regs)); in trace_tm_spr()
106 FAIL_IF(stop_trace(child)); in trace_tm_spr()
/tools/testing/selftests/cgroup/
Dtest_core.c112 char *grandparent = NULL, *parent = NULL, *child = NULL; in test_cgcore_invalid_domain() local
116 child = cg_name(root, "cg_test_grandparent/cg_test_parent/cg_test_child"); in test_cgcore_invalid_domain()
117 if (!parent || !child || !grandparent) in test_cgcore_invalid_domain()
126 if (cg_create(child)) in test_cgcore_invalid_domain()
132 if (cg_read_strcmp(child, "cgroup.type", "domain invalid\n")) in test_cgcore_invalid_domain()
135 if (!cg_enter_current(child)) in test_cgcore_invalid_domain()
145 if (child) in test_cgcore_invalid_domain()
146 cg_destroy(child); in test_cgcore_invalid_domain()
151 free(child); in test_cgcore_invalid_domain()
164 char *parent = NULL, *child = NULL; in test_cgcore_parent_becomes_threaded() local
[all …]
Dtest_memcontrol.c29 char *parent, *child, *parent2 = NULL, *child2 = NULL; in test_memcg_subtree_control() local
35 child = cg_name(root, "memcg_test_0/memcg_test_1"); in test_memcg_subtree_control()
36 if (!parent || !child) in test_memcg_subtree_control()
45 if (cg_create(child)) in test_memcg_subtree_control()
48 if (cg_read_strstr(child, "cgroup.controllers", "memory")) in test_memcg_subtree_control()
79 cg_destroy(child); in test_memcg_subtree_control()
84 free(child); in test_memcg_subtree_control()
1010 char *parent, *child; in test_memcg_oom_group_leaf_events() local
1013 child = cg_name(root, "memcg_test_0/memcg_test_1"); in test_memcg_oom_group_leaf_events()
1015 if (!parent || !child) in test_memcg_oom_group_leaf_events()
[all …]
Dtest_freezer.c459 char *parent, *child = NULL; in test_cgfreezer_mkdir() local
466 child = cg_name(parent, "cg_test_mkdir_B"); in test_cgfreezer_mkdir()
467 if (!child) in test_cgfreezer_mkdir()
476 if (cg_create(child)) in test_cgfreezer_mkdir()
479 pid = cg_run_nowait(child, child_fn, NULL); in test_cgfreezer_mkdir()
483 if (cg_wait_for_proc_count(child, 1)) in test_cgfreezer_mkdir()
486 if (cg_check_frozen(child, true)) in test_cgfreezer_mkdir()
495 if (child) in test_cgfreezer_mkdir()
496 cg_destroy(child); in test_cgfreezer_mkdir()
497 free(child); in test_cgfreezer_mkdir()
[all …]
/tools/testing/selftests/ptrace/
Dpeeksiginfo.c44 static int check_error_paths(pid_t child) in check_error_paths() argument
73 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, addr_rw); in check_error_paths()
83 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, in check_error_paths()
91 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, addr_ro); in check_error_paths()
105 int check_direct_path(pid_t child, int shared, int nr) in check_direct_path() argument
122 ret = sys_ptrace(PTRACE_PEEKSIGINFO, child, &arg, siginfo); in check_direct_path()
157 pid_t child; in main() local
163 child = fork(); in main()
164 if (child == -1) { in main()
167 } else if (child == 0) { in main()
[all …]
/tools/testing/selftests/x86/
Dtest_mremap_vdso.c59 pid_t child; in main() local
61 child = fork(); in main()
62 if (child == -1) { in main()
67 if (child == 0) { in main()
94 if (waitpid(child, &status, 0) != child || in main()
Diopl.c64 pid_t child = fork(); in main() local
65 if (child == -1) in main()
68 if (child == 0) { in main()
79 if (waitpid(child, &status, 0) != child || in main()
Dioperm.c126 pid_t child = fork(); in main() local
127 if (child == -1) in main()
130 if (child == 0) { in main()
137 if (waitpid(child, &status, 0) != child || in main()
Dfsgsbase.c448 pid_t child = fork(); in test_ptrace_write_gs_read_base() local
450 if (child < 0) in test_ptrace_write_gs_read_base()
453 if (child == 0) { in test_ptrace_write_gs_read_base()
475 base = ptrace(PTRACE_PEEKUSER, child, base_offset, NULL); in test_ptrace_write_gs_read_base()
486 if (ptrace(PTRACE_POKEUSER, child, gs_offset, 0x7) != 0) in test_ptrace_write_gs_read_base()
490 base = ptrace(PTRACE_PEEKUSER, child, base_offset, NULL); in test_ptrace_write_gs_read_base()
500 ptrace(PTRACE_CONT, child, NULL, NULL); in test_ptrace_write_gs_read_base()
510 pid_t child = fork(); in test_ptrace_write_gsbase() local
512 if (child < 0) in test_ptrace_write_gsbase()
515 if (child == 0) { in test_ptrace_write_gsbase()
[all …]
/tools/include/linux/
Drbtree_augmented.h126 RBSTRUCT *child; \
129 child = rb_entry(node->RBFIELD.rb_left, RBSTRUCT, RBFIELD); \
130 if (child->RBAUGMENTED > max) \
131 max = child->RBAUGMENTED; \
134 child = rb_entry(node->RBFIELD.rb_right, RBSTRUCT, RBFIELD); \
135 if (child->RBAUGMENTED > max) \
136 max = child->RBAUGMENTED; \
190 struct rb_node *child = node->rb_right; in __rb_erase_augmented() local
205 __rb_change_child(node, child, parent, root); in __rb_erase_augmented()
206 if (child) { in __rb_erase_augmented()
[all …]
/tools/testing/selftests/vm/
Dmap_populate.c33 static int parent_f(int sock, unsigned long *smap, int child) in parent_f() argument
47 waitpid(child, &status, 0); in parent_f()
77 int sock[2], child, ret; in main() local
99 child = fork(); in main()
100 BUG_ON(child == -1, "fork()"); in main()
102 if (child) { in main()
106 return parent_f(sock[1], smap, child); in main()
/tools/testing/selftests/mount/
Dunprivileged-remount-test.c185 pid_t child; in test_unpriv_remount() local
187 child = fork(); in test_unpriv_remount()
188 if (child == -1) { in test_unpriv_remount()
192 if (child != 0) { /* parent */ in test_unpriv_remount()
195 pid = waitpid(child, &status, 0); in test_unpriv_remount()
200 if (pid != child) { in test_unpriv_remount()
202 child, pid); in test_unpriv_remount()
259 pid_t child; in test_priv_mount_unpriv_remount() local
265 child = fork(); in test_priv_mount_unpriv_remount()
266 if (child == -1) { in test_priv_mount_unpriv_remount()
[all …]
/tools/lib/traceevent/plugins/
Dplugin_function.c60 static void add_child(struct func_stack *stack, const char *child, int pos) in add_child() argument
64 if (!child) in add_child()
86 stack->stack[pos] = strdup(child); in add_child()
89 static int add_and_get_index(const char *parent, const char *child, int cpu) in add_and_get_index() argument
115 add_child(&fstack[cpu], child, i+1); in add_and_get_index()
122 add_child(&fstack[cpu], child, 1); in add_and_get_index()
/tools/testing/selftests/futex/functional/
Dfutex_requeue_pi_mismatched_ops.c57 pthread_t child; in main() local
82 if (pthread_create(&child, NULL, blocking_child, NULL)) { in main()
126 pthread_join(child, NULL); in main()

123