mirror of
https://github.com/torvalds/linux.git
synced 2026-09-27 11:02:03 +02:00
Currently, runtime tests only test the osnoise period option (-p/--period of rtla-osnoise tools, backed by /sys/kernel/tracing/osnoise/period_us), using the check_with_osnoise_options function together with a hack relying on long period (pre-set) timing out if RTLA fails to reset it to the default value. Extend tracer option testing to all options used by RTLA; test both RTLA setting the default option by pre-setting the tracer to a different value and user-requested value. The tests are done using a script that reads the tracer values inside an --on-threshold action, like existing tests for runtime behavior already do. check_with_osnoise_option is modified to support grep filters, so that it can be used together with the script pattern. Assisted-by: Claude:claude-opus-4-6 Link: https://lore.kernel.org/r/20260709091755.58265-1-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
12 lines
350 B
Bash
Executable File
12 lines
350 B
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
# Read tracefs values and print them.
|
|
# Usage: check-tracefs-value.sh <relative_path1> [<relative_path2> ...]
|
|
# Each path is relative to /sys/kernel/tracing/
|
|
# Output: one line per file in the format "path=value"
|
|
|
|
for file in "$@"; do
|
|
read value < "/sys/kernel/tracing/$file"
|
|
echo "$file=$value"
|
|
done
|