rtla/tests: Fix pgrep filter in get_workload_pids.shMultiple runtime tests in RTLA rely on the get_workload_pids() shellhelper function to get the PIDs of both kernel and user workloads.On some
rtla/tests: Fix pgrep filter in get_workload_pids.shMultiple runtime tests in RTLA rely on the get_workload_pids() shellhelper function to get the PIDs of both kernel and user workloads.On some systems (e.g. Fedora 43), pgrep matches kernel thread namesincluding 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 formto 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.comSigned-off-by: Tomas Glozar <tglozar@redhat.com>
show more ...
rtla/tests: Add get_workload_pids() helperRTLA runtime tests that check workload processes (currently the testcase "verify -P/--priority" of timerlat.t and "verify the --priority/-Pparam" of osno
rtla/tests: Add get_workload_pids() helperRTLA runtime tests that check workload processes (currently the testcase "verify -P/--priority" of timerlat.t and "verify the --priority/-Pparam" 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 thatfinds the main rtla process and returns the PIDs of all siblings otherthan the test script itself, plus all child processes of kthreadd thathave the osnoise/timerlat kthread pattern comm.This filters out any spurious processes not related to the running testthat happen to have "timerlatu/" or "osnoise/" in their command, forexample, a user grepping the same names at the time of the running ofthe test.Reviewed-by: Wander Lairson Costa <wander@redhat.com>Link: https://lore.kernel.org/r/20260423130558.882022-3-tglozar@redhat.comSigned-off-by: Tomas Glozar <tglozar@redhat.com>