summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/ftrace/boottime/tests/cmdline-05-trace-clock.sh
blob: d6de9f6e2090f273800a0e96e9cb055a46178c0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2026, Google LLC.
# Check trace_clock= kernel command-line setting
TRACEDIR="/sys/kernel/tracing"

if [ ! -f "$TRACEDIR/trace_clock" ]; then
	echo "FAIL: trace_clock file does not exist"
	exit 1
fi

if ! grep -q '\[global\]' "$TRACEDIR/trace_clock"; then
	CLOCK=$(cat "$TRACEDIR/trace_clock")
	echo "FAIL: trace_clock is not set to global ($CLOCK)"
	exit 1
fi

echo "PASS: cmdline-05-trace-clock"
exit 0