mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] rtla: handle SIGTERM and test abnormal exits
@ 2026-11-21 11:31 Chaosheng Qu
  2026-11-21 11:31 ` [PATCH v3 1/2] rtla: handle SIGTERM during a run Chaosheng Qu
  2026-11-21 11:31 ` [PATCH v3 2/2] rtla/tests: cover cleanup on abnormal exits Chaosheng Qu
  0 siblings, 2 replies; 3+ messages in thread
From: Chaosheng Qu @ 2026-11-21 11:31 UTC (permalink / raw)
  To: linux-trace-kernel; +Cc: Steven Rostedt, Tomas Glozar, linux-kernel

v2 mixed the SIGTERM fix with fixes to the test harness and repeated the
commit summary at the top of the commit body.  v3 splits the test changes
into their own patch and writes both messages so that git am does not
duplicate the summary.

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

Patch 2 adds the test for those paths.  Its content is unchanged from v2,
which was run against 7.3-rc7 in a guest for the SIGINT, SIGTERM, timer,
action-failure and repeated-interrupt cases.  Sashiko also pointed out that
a signal delivered between instance creation and set_signals() can still
escape cleanup.  That window is real and pre-existing; moving the handlers
earlier changes the cleanup ordering and is left out of this fix.

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 and the v2 series.

Changes since v2:
- split the test changes into a separate commit
- drop the repeated subject from the commit body; the harness changelog is
  gone from the commit message and the previous-version links are here
- no functional change to either patch

Testing: v2 was built and run in a 7.3-rc7 guest.  v3 only splits and
rewrites the commits, so the code under test is identical.

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       | 211 ++++++++++++++++++
 3 files changed, 283 insertions(+)
 create mode 100644 tools/tracing/rtla/tests/cleanup.t
 create mode 100755 tools/tracing/rtla/tests/scripts/check-cleanup.sh

-- 
2.43.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-21 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-21 11:31 [PATCH v3 0/2] rtla: handle SIGTERM and test abnormal exits Chaosheng Qu
2026-11-21 11:31 ` [PATCH v3 1/2] rtla: handle SIGTERM during a run Chaosheng Qu
2026-11-21 11:31 ` [PATCH v3 2/2] rtla/tests: cover cleanup on abnormal exits Chaosheng Qu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®