]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rtla/tests: Add runtime test for -H/--house-keeping
authorTomas Glozar <tglozar@redhat.com>
Thu, 23 Apr 2026 13:05:56 +0000 (15:05 +0200)
committerTomas Glozar <tglozar@redhat.com>
Mon, 18 May 2026 09:00:52 +0000 (11:00 +0200)
Add a runtime test for -H/--house-keeping option for both osnoise and
timerlat tools, with affinity checking similar to what is done for
-c/--cpus.

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

index 773a46e2dc5f811c4b034dd5420bc66670388923..cdea849143453bcc1389c229027aa8c86287ce08 100644 (file)
@@ -18,6 +18,8 @@ check_top_q_hist "verify the --trace param" \
        "osnoise TOOL -s 30 -T 1 -t" 2 "Saving trace to osnoise_trace.txt"
 check_top_q_hist "verify the -c/--cpus param" \
        "osnoise TOOL -P F:1 -c 0 -r 900000 -d 10s -S 1 --on-threshold shell,command=tests/scripts/check-cpus.sh" 2 "^Affinity of threads: 0$"
+check_top_q_hist "verify the -H/--house-keeping param" \
+       "osnoise TOOL -P F:1 -H 0 -r 900000 -d 10s -S 1 --on-threshold shell,command=tests/scripts/check-housekeeping-cpus.sh" 2 "^Affinity of threads: 0$"
 
 # Histogram tests
 check "hist with -b/--bucket-size" \
diff --git a/tools/tracing/rtla/tests/scripts/check-housekeeping-cpus.sh b/tools/tracing/rtla/tests/scripts/check-housekeeping-cpus.sh
new file mode 100755 (executable)
index 0000000..4742f34
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+pid=$(ps -o ppid= $$)
+echo "Affinity of threads:$(taskset -c -p $pid | cut -d ':' -f 2)"
index a14d9ec32edee20b364e28ac0106b64cac8c08ff..20f68bcbcb277b596e47c7f468e3d23ce93dcae1 100644 (file)
@@ -43,6 +43,8 @@ check_top_hist "disable auto-analysis" \
        "timerlat TOOL -s 3 -T 10 -t --no-aa" 2 "" "analyzing it"
 check_top_q_hist "verify -c/--cpus" \
        "timerlat TOOL -c 0 -d 10s -T 1 --on-threshold shell,command=tests/scripts/check-cpus.sh" 2 "^Affinity of threads: 0$"
+check_top_q_hist "verify -H/--house-keeping" \
+       "timerlat TOOL -H 0 -d 10s -T 1 --on-threshold shell,command=tests/scripts/check-housekeeping-cpus.sh" 2 "^Affinity of threads: 0$"
 
 # Histogram tests
 check "hist with -b/--bucket-size" \