summaryrefslogtreecommitdiffstats
path: root/recipes-test/test-nohz-ticks/files/test-nohz-ticks
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-test/test-nohz-ticks/files/test-nohz-ticks')
-rwxr-xr-xrecipes-test/test-nohz-ticks/files/test-nohz-ticks35
1 files changed, 35 insertions, 0 deletions
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..edf71d4
--- /dev/null
+++ b/recipes-test/test-nohz-ticks/files/test-nohz-ticks
@@ -0,0 +1,35 @@
1#!/bin/sh
2
3cd /opt/ltp >/dev/null
4
5partitioning_done=false
6
7echo "BEGIN: nohz"
8
9# Perform partitioning, if not already done
10if [ ! -d /sys/fs/cgroup/cpuset/rt ]; then
11 partrt create 0x$(list2mask --nohz)
12 partitioning_done=true
13fi
14
15logname=`date +"%Y_%m_%d_%H_%M_%S"`".log"
16./runltp -n -i 5 -p -d /tmp -l $logname -f partrt_nohz_full
17
18if [ ! -d ./results ]; then
19 echo "FAIL: no result found"
20 $partitioning_done && partrt undo
21 exit 1
22fi
23
24cat ./results/$logname | while read line
25do
26 resultLine=`echo $line | grep -c -E "PASS|FAIL"`
27 if [ $resultLine -eq 1 ]; then
28 testcase=`echo $line | awk '{print $1}'`
29 result=`echo $line | awk '{print $2}'`
30 echo "$result: $testcase"
31 fi
32done
33
34$partitioning_done && partrt undo
35echo "END: nohz"