HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //usr/src/linux-headers-7.0.0-1009-aws/tools/tracing/rtla/tests/scripts/check-priority.sh
#!/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"