1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# description: Test wakeup tracer
4
5if ! which chrt ; then
6  echo "chrt is not found. This test requires nice command."
7  exit_unresolved
8fi
9
10if ! grep -wq "wakeup" available_tracers ; then
11  echo "wakeup tracer is not supported"
12  exit_unsupported
13fi
14
15echo wakeup > current_tracer
16echo 1 > tracing_on
17echo 0 > tracing_max_latency
18
19: "Wakeup higher priority task"
20chrt -f 5 sleep 1
21
22echo 0 > tracing_on
23grep '+ \[[[:digit:]]*\]' trace
24grep '==> \[[[:digit:]]*\]' trace
25
26