mirror of
https://github.com/torvalds/linux.git
synced 2026-04-24 09:35:52 -04:00
Add a series of tests to validate the RV tracefs API and basic
functionality.
* available monitors:
Check that all monitors (from the monitors folder) appear as
available and have a description. Works with nested monitors.
* enable/disable:
Enable and disable all monitors and validate both the enabled file
and the enabled_monitors. Check that enabling container monitors
enables all nested monitors.
* reactors:
Set all reactors and validate the setting, also for nested monitors.
* wwnr with printk:
wwnr is broken on purpose, run it with a load and check that the
printk reactor works. Also validate disabling reacting_on or
monitoring_on prevents reactions.
These tests use the ftracetest suite.
Acked-by: Nam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/r/20251017115203.140080-3-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
19 lines
475 B
Bash
19 lines
475 B
Bash
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# description: Check available monitors
|
|
|
|
for monitor_dir in monitors/*; do
|
|
monitor=$(basename "$monitor_dir")
|
|
|
|
grep -q "^$monitor$" available_monitors
|
|
grep -q . "$monitor_dir"/desc
|
|
|
|
for nested_dir in "$monitor_dir"/*; do
|
|
[ -d "$nested_dir" ] || continue
|
|
nested=$(basename "$nested_dir")
|
|
|
|
grep -q "^$monitor:$nested$" available_monitors
|
|
grep -q . "$nested_dir"/desc
|
|
done
|
|
done
|