3 # Check that -f -p attaches to threads properly.
5 # Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
6 # Copyright (c) 2016-2017 The strace developers.
9 # SPDX-License-Identifier: GPL-2.0-or-later
11 . "${srcdir=.}/init.sh"
13 run_prog_skip_if_failed \
15 run_prog ../attach-f-p-cmd > /dev/null
17 ../set_ptracer_any sh -c "exec ../attach-f-p >> $EXP" > /dev/null &
20 while ! [ -s "$EXP" ]; do
21 kill -0 $tracee_pid 2> /dev/null ||
22 fail_ 'set_ptracer_any sh failed'
25 run_strace -a32 -f -echdir -p $tracee_pid ../attach-f-p-cmd > "$EXP"
26 match_diff "$LOG" "$EXP"