]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rtla/tests: Add get_workload_pids() helper
authorTomas Glozar <tglozar@redhat.com>
Thu, 23 Apr 2026 13:05:51 +0000 (15:05 +0200)
committerTomas Glozar <tglozar@redhat.com>
Mon, 18 May 2026 09:00:51 +0000 (11:00 +0200)
commitd18fd5a34ff3a2628f38af55f276b7377ee6dc5a
tree9ce1738dbd4447a89065e00bdf6cb2cc2f7e0861
parentc15c55c01e48e4639c715370f41d9d4c490f5d23
rtla/tests: Add get_workload_pids() helper

RTLA runtime tests that check workload processes (currently the test
case "verify -P/--priority" of timerlat.t and "verify the --priority/-P
param" of osnoise.t) use "pgrep timerlatu/" or "pgrep osnoise/"
respectively to identify the workload.

Make them more robust by adding a get_workload_pids() helper that
finds the main rtla process and returns the PIDs of all siblings other
than the test script itself, plus all child processes of kthreadd that
have the osnoise/timerlat kthread pattern comm.

This filters out any spurious processes not related to the running test
that happen to have "timerlatu/" or "osnoise/" in their command, for
example, a user grepping the same names at the time of the running of
the test.

Reviewed-by: Wander Lairson Costa <wander@redhat.com>
Link: https://lore.kernel.org/r/20260423130558.882022-3-tglozar@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
tools/tracing/rtla/tests/osnoise.t
tools/tracing/rtla/tests/scripts/check-priority.sh
tools/tracing/rtla/tests/scripts/lib/get_workload_pids.sh [new file with mode: 0644]
tools/tracing/rtla/tests/timerlat.t