#!/bin/sh # #This script is to test PREEMPT RT on target # uname -a | grep "PREEMPT RT" if [ $? -ne 0 ]; then echo "FAIL: The kernel include real-time patch" echo 1 fi echo "PASS: The kernel include real-time patch" ps | grep '\(\[irq/\)' if [ $? -ne 0 ]; then echo "FAIL: The IRQ handlers are treated by a patched kernel in kernel thread context." exit 1 fi echo "PASS: The IRQ handlers are treated by a patched kernel in kernel thread context." cyclictest -t5 -p 80 -i 10000 -l 100 if [ $? -ne 0 ]; then echo "FAIL: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops." exit 1 fi echo "PASS: Test case: POSIX interval timer, Interval 10000 micro seconds,. 100 loops." cyclictest -t5 -p 80 -n -i 10000 -l 100 if [ $? -ne 0 ]; then echo "FAIL: Test case: clock_nanosleep(TIME_ABSTIME), Interval 10000 micro seconds,. 100 loops." exit 1 fi echo "PASS: Test case: clock_nanosleep(TIME_ABSTIME), Interval 10000 micro seconds,. 100 loops."