All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaosheng Qu <chaosheng.qu.linux@gmail.com>
To: linux-trace-kernel@vger.kernel.org
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Tomas Glozar <tglozar@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v4 0/2] rtla: handle SIGTERM and test abnormal exits
Date: Sat, 21 Nov 2026 20:03:22 +0800	[thread overview]
Message-ID: <cover.1795262546.git.chaosheng.qu.linux@gmail.com> (raw)

v3 split the test changes into their own patch and fixed the commit
messages, but the test still signalled as soon as the instance directory
appeared plus one second.  On a slow guest that can beat set_signals(),
which is the startup race sashiko described.  v4 waits until
/proc/<pid>/status reports SIGTERM in SigCgt before signalling.

Patch 1 is unchanged: it adds the SIGTERM handler that was missing.
SIGINT, the -d/--duration timer and a failing --on-threshold action
already reach the cleanup path; SIGTERM terminated the process and left
its tracefs instance behind.

Patch 2 is the test, now with the readiness check.  With it, cleanup.t
passes all five cases on a 7.3-rc7 guest, including SIGTERM; without the
handler, SIGTERM leaves the instance behind and the test fails.

v3: https://lore.kernel.org/linux-trace-kernel/cover.1795258353.git.chaosheng.qu.linux@gmail.com/
v2: https://lore.kernel.org/linux-trace-kernel/1794300001.11111.1234567890@gmail.com/
v1: https://lore.kernel.org/linux-trace-kernel/20261017122359.402696-1-chaosheng.qu.linux@gmail.com/

This replaces the v1 submission, the v2 series and v3.

Changes since v3:
- wait for the SIGTERM handler instead of a fixed sleep in the test
- no change to patch 1

Testing: cleanup.t on 7.3-rc7, 4 vCPU QEMU guest -- SIGINT, SIGTERM,
-d timer, action failure and repeated interrupts all pass.  With the
handler removed, the SIGTERM case fails as expected.

Chaosheng Qu (2):
  rtla: handle SIGTERM during a run
  rtla/tests: cover cleanup on abnormal exits

 tools/tracing/rtla/src/common.c               |   2 +
 tools/tracing/rtla/tests/cleanup.t            |  70 ++++++
 .../rtla/tests/scripts/check-cleanup.sh       | 219 ++++++++++++++++++
 3 files changed, 291 insertions(+)
 create mode 100644 tools/tracing/rtla/tests/cleanup.t
 create mode 100755 tools/tracing/rtla/tests/scripts/check-cleanup.sh

-- 
2.43.0



             reply	other threads:[~2026-11-21 12:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21 12:03 Chaosheng Qu [this message]
2026-11-21 12:03 ` [PATCH v4 1/2] rtla: handle SIGTERM during a run Chaosheng Qu
2026-11-21 12:03 ` [PATCH v4 2/2] rtla/tests: cover cleanup on abnormal exits Chaosheng Qu
2026-11-21 12:16   ` sashiko-bot

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=cover.1795262546.git.chaosheng.qu.linux@gmail.com \
    --to=chaosheng.qu.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglozar@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.