aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
blob: 59caefe431dae5610494251f3f60f7874400e4f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Add periodic output for long time test.

This is needed in context of having scripts running ltp tests and
waiting with a timeout for the output of the tests.

Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Pending

diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh	2013-11-08 15:54:09.515049081 +0100
+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh	2013-11-08 22:32:15.587370406 +0100
@@ -37,7 +37,8 @@
         exit 0
 fi
 
-RUN_TIME=$(( 60 * 60 ))
+ONE_MINUTE=60
+RUN_TIME=60
 
 cleanup()
 {
@@ -62,7 +63,7 @@
 # $1 - Number of cgroups
 # $2 - Allocated how much memory in one process? in MB
 # $3 - The interval to touch memory in a process
-# $4 - How long does this test run ? in second
+# $4 - How long does this test run ? in minutes
 run_stress()
 {
 	do_mount;
@@ -81,7 +82,11 @@
 		eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
 	done
 
-	sleep $4
+	for i in $(seq 0 $(($4-1)))
+	do
+		eval echo "Started $i min ago. Still alive... " 
+		sleep $ONE_MINUTE
+	done
 
 	for i in $(seq 0 $(($1-1)))
 	do