diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-21 17:22:21 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-21 17:22:21 -0800 |
| commit | 4843f6873f7c4835e62f2c73ba0fd538e57a2f22 (patch) | |
| tree | ee620501a1ffbad9a83141e3a70154e1fe641040 /tools/perf/tests/shell/trace_ksym_beautifier.sh | |
| download | linux-master.tar.gz linux-master.zip | |
Merge tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctlgraftedHEADmaster
Pull sysctl fix from Joel Granados:
"Fix sysctl jiffy / milliseconds conversion:
- Writing a previously read value "X" shall keep the same "X" value
- Remove truncation that was causing incorrect saturation of valid
timeouts"
* tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl:
sysctl: Do jiffy / ms conversion in ulong space
Diffstat (limited to 'tools/perf/tests/shell/trace_ksym_beautifier.sh')
| -rwxr-xr-x | tools/perf/tests/shell/trace_ksym_beautifier.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/perf/tests/shell/trace_ksym_beautifier.sh b/tools/perf/tests/shell/trace_ksym_beautifier.sh new file mode 100755 index 000000000..7c441f855 --- /dev/null +++ b/tools/perf/tests/shell/trace_ksym_beautifier.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# perf trace kernel symbol beautifier tests +# SPDX-License-Identifier: GPL-2.0 + +err=0 + +# shellcheck source=lib/probe.sh +. "$(dirname "$0")"/lib/probe.sh +skip_if_no_perf_trace || exit 2 +[ "$(id -u)" = 0 ] || exit 2 + +test_ksym_call_site() { + echo "Testing perf trace kernel symbol beautifier (call_site)" + output="$(perf trace -e kmem:kmalloc --max-events=1 -- true 2>&1)" + if ! echo "$output" | grep -q -E "call_site: [a-zA-Z_][a-zA-Z0-9_]*" || echo "$output" | grep -q -E "call_site: 0x[0-9a-fA-F]+" + then + printf "Call site kernel symbol beautification failed, output:\n%s\n" "$output" + err=1 + fi +} + +test_ksym_function_ptr() { + echo "Testing perf trace kernel symbol beautifier (function pointer)" + output="$(perf trace -e timer:hrtimer_start --max-events=1 -- sleep 0.01 2>&1)" + if ! echo "$output" | grep -q -E "function: [a-zA-Z_][a-zA-Z0-9_]*" || echo "$output" | grep -q -E "function: 0x[0-9a-fA-F]+" + then + printf "Function pointer kernel symbol beautification failed, output:\n%s\n" "$output" + err=1 + fi +} + +test_ksym_call_site + +if [ $err = 0 ]; then + test_ksym_function_ptr +fi + +exit $err |
