3 # Check that simultaneous use of -p option and tracing of a command works.
5 # Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
6 # Copyright (c) 2016-2018 The strace developers.
9 # SPDX-License-Identifier: GPL-2.0-or-later
11 . "${srcdir=.}/init.sh"
13 run_prog_skip_if_failed \
16 ../set_ptracer_any ../attach-p-cmd-p >> "$EXP" &
19 while ! [ -s "$EXP" ]; do
20 kill -0 $tracee_pid 2> /dev/null ||
21 fail_ 'set_ptracer_any ../attach-p-cmd-p failed'
24 run_strace -a30 -echdir -p $tracee_pid ../attach-p-cmd-cmd > "$EXP"
25 match_diff "$LOG" "$EXP"