#!/bin/sh partitioning_done=false cleanup () { $partitioning_done && partrt undo exit $1 } cd /opt/ltp || cleanup 1 # Perform partitioning, if not already done if [ ! -d /sys/fs/cgroup/cpuset/rt ]; then partrt create $(list2mask --nohz) || cleanup 1 partitioning_done=true fi echo echo "*******" echo "* NRT *" echo "*******" echo partrt run rt stress -i 1 || cleanup 1 & CHILD_PID=$! partrt run nrt systest-runner || cleanup 1 kill $CHILD_PID || cleanup 1 echo echo "******" echo "* RT *" echo "******" echo partrt run rt systest-runner || cleanup 1 cleanup 0