summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/ftrace/boottime/tests/03-eprobe.sh
blob: 9b3b7ab23c69e0e1e3bff3b85c902f1fbd835dd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2026, Google LLC.
# Check eprobe event bootconfig settings on tracefs
TRACEDIR="/sys/kernel/tracing"

if [ -f /proc/bootconfig ] && grep -q "dump_bconf" /proc/cmdline 2>/dev/null; then
	echo "=== /proc/bootconfig ==="
	cat /proc/bootconfig
	echo "========================"
fi

if [ ! -d "$TRACEDIR/events/eprobes/ep_read" ]; then
	echo "FAIL: eprobe event eprobes/ep_read does not exist"
	exit 1
fi

ENABLE=$(cat "$TRACEDIR/events/eprobes/ep_read/enable")
if [ "$ENABLE" != "1" ]; then
	echo "FAIL: eprobe event eprobes/ep_read is not enabled ($ENABLE)"
	exit 1
fi

echo "PASS: 03-eprobe"
exit 0