diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:19:52 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:19:52 +0200 |
commit | 7ac6af29202ec27dcdbf1ed5131a141be9958590 (patch) | |
tree | a20c0be935ea685b3b737471e691d39289c2333f /recipes-test/test-nohz-ticks/files/test-nohz-ticks | |
download | meta-nohz-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'recipes-test/test-nohz-ticks/files/test-nohz-ticks')
-rwxr-xr-x | recipes-test/test-nohz-ticks/files/test-nohz-ticks | 35 |
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 | |||
3 | cd /opt/ltp >/dev/null | ||
4 | |||
5 | partitioning_done=false | ||
6 | |||
7 | echo "BEGIN: nohz" | ||
8 | |||
9 | # Perform partitioning, if not already done | ||
10 | if [ ! -d /sys/fs/cgroup/cpuset/rt ]; then | ||
11 | partrt create 0x$(list2mask --nohz) | ||
12 | partitioning_done=true | ||
13 | fi | ||
14 | |||
15 | logname=`date +"%Y_%m_%d_%H_%M_%S"`".log" | ||
16 | ./runltp -n -i 5 -p -d /tmp -l $logname -f partrt_nohz_full | ||
17 | |||
18 | if [ ! -d ./results ]; then | ||
19 | echo "FAIL: no result found" | ||
20 | $partitioning_done && partrt undo | ||
21 | exit 1 | ||
22 | fi | ||
23 | |||
24 | cat ./results/$logname | while read line | ||
25 | do | ||
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 | ||
32 | done | ||
33 | |||
34 | $partitioning_done && partrt undo | ||
35 | echo "END: nohz" | ||