xref: /linux/tools/tracing/rtla/tests/scripts/check-tracefs-value.sh (revision 3793b558ff3b1cae64a3eddb497ab9e5636bf022)
1*ab43bd72STomas Glozar#!/bin/bash
2*ab43bd72STomas Glozar# SPDX-License-Identifier: GPL-2.0
3*ab43bd72STomas Glozar# Read tracefs values and print them.
4*ab43bd72STomas Glozar# Usage: check-tracefs-value.sh <relative_path1> [<relative_path2> ...]
5*ab43bd72STomas Glozar# Each path is relative to /sys/kernel/tracing/
6*ab43bd72STomas Glozar# Output: one line per file in the format "path=value"
7*ab43bd72STomas Glozar
8*ab43bd72STomas Glozarfor file in "$@"; do
9*ab43bd72STomas Glozar	read value < "/sys/kernel/tracing/$file"
10*ab43bd72STomas Glozar	echo "$file=$value"
11*ab43bd72STomas Glozardone
12