mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-23 09:47:31 -04:00
Add runtime test for rtla-timerlat's -k/--kernel-threads and -u/--user-threads options using get_workload_pids.sh to check whether the appropriate threads are being created. The tests are implemented for both top and hist. Additionally, all tests related to timerlat threads are moved to a separate section in the test files. The latter is also done for rtla-osnoise tests. Reviewed-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20260423130558.882022-9-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
17 lines
377 B
Bash
Executable File
17 lines
377 B
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
. "$(dirname $0)/lib/get_workload_pids.sh"
|
|
kthreadd_pid=$(pgrep ^kthreadd$)
|
|
cnt_kernel=0
|
|
cnt_user=0
|
|
for pid in $(get_workload_pids)
|
|
do
|
|
if [ "$(echo $(ps -o ppid= $pid))" = "$kthreadd_pid" ]
|
|
then
|
|
((++cnt_kernel))
|
|
else
|
|
((++cnt_user))
|
|
fi
|
|
done
|
|
echo "$cnt_kernel kernel threads, $cnt_user user threads"
|