summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/tests/scripts/check-priority.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tracing/rtla/tests/scripts/check-priority.sh')
-rwxr-xr-xtools/tracing/rtla/tests/scripts/check-priority.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/tracing/rtla/tests/scripts/check-priority.sh b/tools/tracing/rtla/tests/scripts/check-priority.sh
new file mode 100755
index 000000000000..79b702a34a96
--- /dev/null
+++ b/tools/tracing/rtla/tests/scripts/check-priority.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+pids="$(pgrep ^$1)" || exit 1
+for pid in $pids
+do
+ chrt -p $pid | cut -d ':' -f 2 | head -n1 | grep "^ $2\$" >/dev/null
+ chrt -p $pid | cut -d ':' -f 2 | tail -n1 | grep "^ $3\$" >/dev/null
+done && echo "Priorities are set correctly"