xref: /linux/tools/tracing/rtla/tests/scripts/check-priority.sh (revision 5172a777248e56dbae22b55231d24c7ecc6393f9)
1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
3pids="$(pgrep ^$1)" || exit 1
4for pid in $pids
5do
6  chrt -p $pid | cut -d ':' -f 2 | head -n1 | grep "^ $2\$" >/dev/null
7  chrt -p $pid | cut -d ':' -f 2 | tail -n1 | grep "^ $3\$" >/dev/null
8done && echo "Priorities are set correctly"
9