* [PATCH] rtla/tests: Fix pgrep filter in get_workload_pids.sh
@ 2026-06-04 14:05 Tomas Glozar
2026-06-10 12:52 ` Wander Lairson Costa
0 siblings, 1 reply; 2+ messages in thread
From: Tomas Glozar @ 2026-06-04 14:05 UTC (permalink / raw)
To: Steven Rostedt, Tomas Glozar
Cc: John Kacur, Luis Goncalves, Crystal Wood, Costa Shulyupin,
Wander Lairson Costa, LKML, linux-trace-kernel
Multiple runtime tests in RTLA rely on the get_workload_pids() shell
helper function to get the PIDs of both kernel and user workloads.
On some systems (e.g. Fedora 43), pgrep matches kernel thread names
including square brackets: "[osnoise/0]"; on other systems (e.g.
RHEL 9.8), brackets are not included: "osnoise/0".
Accept both as valid workload PIDs rather that just the non-bracket form
to make the tests work on all systems.
Fixes: a98dad63cda3 ("rtla/tests: Add runtime test for -k and -u options")
Reported-by: Crystal Wood <crwood@redhat.com>
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
Note: the file touched by this commit is included by .gitignore, that is
an error that will be fixed by [1].
[1] https://lore.kernel.org/linux-trace-kernel/20260601091835.3118094-1-tglozar@redhat.com/
tools/tracing/rtla/tests/scripts/lib/get_workload_pids.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tracing/rtla/tests/scripts/lib/get_workload_pids.sh b/tools/tracing/rtla/tests/scripts/lib/get_workload_pids.sh
index 8aff98cd2c1f..d10a4e3b321d 100644
--- a/tools/tracing/rtla/tests/scripts/lib/get_workload_pids.sh
+++ b/tools/tracing/rtla/tests/scripts/lib/get_workload_pids.sh
@@ -5,7 +5,7 @@ get_workload_pids() {
local rtla_pid=$(ps -o ppid= $shell_pid)
# kernel threads
- pgrep -P $(pgrep ^kthreadd$) -f '^(osnoise|timerlat)/[0-9]+$'
+ pgrep -P $(pgrep ^kthreadd$) -f '^\[?(osnoise|timerlat)/[0-9]+\]?$'
# user threads
pgrep -P $rtla_pid | grep -v "^$shell_pid$"
}
--
2.54.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] rtla/tests: Fix pgrep filter in get_workload_pids.sh
2026-06-04 14:05 [PATCH] rtla/tests: Fix pgrep filter in get_workload_pids.sh Tomas Glozar
@ 2026-06-10 12:52 ` Wander Lairson Costa
0 siblings, 0 replies; 2+ messages in thread
From: Wander Lairson Costa @ 2026-06-10 12:52 UTC (permalink / raw)
To: Tomas Glozar
Cc: Steven Rostedt, John Kacur, Luis Goncalves, Crystal Wood,
Costa Shulyupin, LKML, linux-trace-kernel
On Thu, Jun 04, 2026 at 04:05:47PM +0200, Tomas Glozar wrote:
> Multiple runtime tests in RTLA rely on the get_workload_pids() shell
> helper function to get the PIDs of both kernel and user workloads.
>
> On some systems (e.g. Fedora 43), pgrep matches kernel thread names
> including square brackets: "[osnoise/0]"; on other systems (e.g.
> RHEL 9.8), brackets are not included: "osnoise/0".
>
> Accept both as valid workload PIDs rather that just the non-bracket form
> to make the tests work on all systems.
>
> Fixes: a98dad63cda3 ("rtla/tests: Add runtime test for -k and -u options")
> Reported-by: Crystal Wood <crwood@redhat.com>
> Signed-off-by: Tomas Glozar <tglozar@redhat.com>
> ---
>
> Note: the file touched by this commit is included by .gitignore, that is
> an error that will be fixed by [1].
>
> [1] https://lore.kernel.org/linux-trace-kernel/20260601091835.3118094-1-tglozar@redhat.com/
>
Reviewed-by: Wander Lairson Costa <wander@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-10 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-04 14:05 [PATCH] rtla/tests: Fix pgrep filter in get_workload_pids.sh Tomas Glozar
2026-06-10 12:52 ` Wander Lairson Costa
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®