summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/tests/scripts/lib
AgeCommit message (Collapse)AuthorFilesLines
2026-06-17rtla/tests: Fix pgrep filter in get_workload_pids.shTomas Glozar1-1/+1
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> Link: https://lore.kernel.org/r/20260604140547.3616495-1-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2026-05-18rtla/tests: Add get_workload_pids() helperTomas Glozar1-0/+11
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>