diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:53:30 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:53:30 +0200 |
commit | c2da06c175b7ce286c2acdf44d891bfdf8cd8def (patch) | |
tree | c8a087a3fc67757076dad105f45ed86d618e2ae6 /recipes-test/test-nohz-ticks/files/test-nohz-ticks | |
download | meta-nohz-c2da06c175b7ce286c2acdf44d891bfdf8cd8def.tar.gz |
initial commit for Enea Linux 4.0HEADdaisy-eneadaisy
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@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 | 32 |
1 files changed, 32 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..f6d7546 --- /dev/null +++ b/recipes-test/test-nohz-ticks/files/test-nohz-ticks | |||
@@ -0,0 +1,32 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd /opt/ltp >/dev/null | ||
4 | |||
5 | partitioning_done=false | ||
6 | |||
7 | # Perform partitioning, if not already done | ||
8 | if [ ! -d /sys/fs/cgroup/cpuset/rt ]; then | ||
9 | partrt create 0x$(list2mask --nohz) | ||
10 | partitioning_done=true | ||
11 | fi | ||
12 | |||
13 | logname=`date +"%Y_%m_%d_%H_%M_%S"`".log" | ||
14 | ./runltp -n -i 5 -p -d /tmp -l $logname -f partrt_nohz_full | ||
15 | |||
16 | if [ ! -d ./results ]; then | ||
17 | echo "FAIL: no result found" | ||
18 | $partitioning_done && partrt undo | ||
19 | exit 1 | ||
20 | fi | ||
21 | |||
22 | cat ./results/$logname | while read line | ||
23 | do | ||
24 | resultLine=`echo $line | grep -c -E "PASS|FAIL"` | ||
25 | if [ $resultLine -eq 1 ]; then | ||
26 | testcase=`echo $line | awk '{print $1}'` | ||
27 | result=`echo $line | awk '{print $2}'` | ||
28 | echo "$result: $testcase" | ||
29 | fi | ||
30 | done | ||
31 | |||
32 | $partitioning_done && partrt undo | ||