From: lihao4869 <lihao4869@yeah.net>
To: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: [LTP] Some question related LTP ftrace-stress-test
Date: Mon, 8 Jun 2026 21:01:46 +0800 (GMT+08:00) [thread overview]
Message-ID: <5fdb5657.6e2b.19ea7532b4b.Coremail.lihao4869@yeah.net> (raw)
Hello,
I noticed that in the LTP test case ftrace-stress-test, the script ftrace_trace_pipe.shis executed.
In the second while loop, the variable this_pidis assigned the value 0. Is this reasonable?
Because when this_pid is 0 and ftrace_trace_pipe.sh receives a SIGUSR1 signal, the trapped handler will execute kill -KILL 0, which sends SIGKILL to the entire process group. As a result, the parent process ftrace_stress_test.sh is killed, ultimately causing the test to fail.
script is as follow:
kill_this_pid()
{
kill -KILL $this_pid
wait $this_pid
exit 0
}
trap kill_this_pid SIGUSR1
LOOP=20
while true; do
i=0
while [ $i -lt $LOOP ]; do
cat "$TRACING_PATH"/trace_pipe > /dev/null &
this_pid=$!
tst_sleep 200000us
kill -INT $this_pid
wait $this_pid
this_pid=0
tst_sleep 200000us
i=$((i + 1))
done
sleep 2
done
Looking forward to your reply.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
reply other threads:[~2026-06-08 13:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5fdb5657.6e2b.19ea7532b4b.Coremail.lihao4869@yeah.net \
--to=lihao4869@yeah.net \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox