From c2da06c175b7ce286c2acdf44d891bfdf8cd8def Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 13:53:30 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- recipes-test/test-nohz-ticks/files/test-nohz-ticks | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 recipes-test/test-nohz-ticks/files/test-nohz-ticks (limited to 'recipes-test/test-nohz-ticks/files') diff --git a/recipes-test/test-nohz-ticks/files/test-nohz-ticks b/recipes-test/test-nohz-ticks/files/test-nohz-ticks new file mode 100755 index 0000000..f6d7546 --- /dev/null +++ b/recipes-test/test-nohz-ticks/files/test-nohz-ticks @@ -0,0 +1,32 @@ +#!/bin/sh + +cd /opt/ltp >/dev/null + +partitioning_done=false + +# Perform partitioning, if not already done +if [ ! -d /sys/fs/cgroup/cpuset/rt ]; then + partrt create 0x$(list2mask --nohz) + partitioning_done=true +fi + +logname=`date +"%Y_%m_%d_%H_%M_%S"`".log" +./runltp -n -i 5 -p -d /tmp -l $logname -f partrt_nohz_full + +if [ ! -d ./results ]; then + echo "FAIL: no result found" + $partitioning_done && partrt undo + exit 1 +fi + +cat ./results/$logname | while read line +do + resultLine=`echo $line | grep -c -E "PASS|FAIL"` + if [ $resultLine -eq 1 ]; then + testcase=`echo $line | awk '{print $1}'` + result=`echo $line | awk '{print $2}'` + echo "$result: $testcase" + fi +done + +$partitioning_done && partrt undo -- cgit v1.2.3-54-g00ecf