diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-02-03 12:54:53 -0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-02-03 12:54:53 -0200 |
commit | 5b952da909e0aa3752b4f2b22b5b193e71819f80 (patch) | |
tree | 102838264030dfcc3bc14f72e33f3ebd6f93f54f | |
parent | f5f34d2c3609c37c690cfbcc4581b7e79a1f6447 (diff) | |
download | tuna-5b952da909e0aa3752b4f2b22b5b193e71819f80.tar.gz |
testuna: Add test case for --thread globbing
If the machine has at least two processors we:
1. Find out the rtprio for watchdog/0 (usually 99)
2. Decrement it
3. Use tuna to set watchdog/* to $(rtprio - 1)
4. Then using chrt we check if tuna correctly set the new rtprio
for all watchdog threads (one per CPU)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | testuna | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -199,6 +199,19 @@ if [ $NR_CPU_SOCKETS -ge 2 ]; then die_if_not_equal $((AFFINITY & CPU1_SIBLINGS)) $CPU1_SIBLINGS "Moving init to CPU socket $CPU1_SOCKET" fi +if [ $NR_PROCESSORS -gt 2 ]; then + THREAD_PREFIX="watchdog/" + PID=$(ps h -C ${THREAD_PREFIX}0 -o pid) + RTPRIO=$(get_rtprio $PID) + NEW_RTPRIO=$((RTPRIO - 1)) + tuna -t $THREAD_PREFIX* -p $NEW_RTPRIO + for CPU in $(seq 0 $((NR_PROCESSORS - 1))); do + PID=$(ps h -C ${THREAD_PREFIX}$CPU -o pid) + RTPRIO=$(get_rtprio $PID) + die_if_not_equal $RTPRIO $NEW_RTPRIO "Using --thread globbing" + done +fi + taskset -p $INITIAL_INIT_AFFINITY 1 > /dev/null rtctl --file $INITIAL reset |