summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0034-periodic_output.patch')
-rw-r--r--meta/recipes-extended/ltp/ltp/0034-periodic_output.patch32
1 files changed, 22 insertions, 10 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch b/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
index 59caefe431..c2ef899cc5 100644
--- a/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
+++ b/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
@@ -1,4 +1,7 @@
1Add periodic output for long time test. 1From 5a77e2bdc083f4f842a8ba7c2db1a7ac6e5f0664 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 31 May 2017 21:26:05 -0400
4Subject: [PATCH] Add periodic output for long time test.
2 5
3This is needed in context of having scripts running ltp tests and 6This is needed in context of having scripts running ltp tests and
4waiting with a timeout for the output of the tests. 7waiting with a timeout for the output of the tests.
@@ -6,20 +9,26 @@ waiting with a timeout for the output of the tests.
6Signed-off-by: Tudor Florea <tudor.florea@enea.com> 9Signed-off-by: Tudor Florea <tudor.florea@enea.com>
7Upstream-Status: Pending 10Upstream-Status: Pending
8 11
9diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 12Signed-off-by: Dengke Du <dengke.du@windriver.com>
10--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 15:54:09.515049081 +0100 13---
11+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 22:32:15.587370406 +0100 14 .../kernel/controllers/memcg/stress/memcg_stress_test.sh | 11 ++++++++---
12@@ -37,7 +37,8 @@ 15 1 file changed, 8 insertions(+), 3 deletions(-)
16
17diff --git a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
18index af1a708..084e628 100755
19--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
20+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
21@@ -37,7 +37,8 @@ if [ "x$(grep -w memory /proc/cgroups | cut -f4)" != "x1" ]; then
13 exit 0 22 exit 0
14 fi 23 fi
15 24
16-RUN_TIME=$(( 60 * 60 )) 25-RUN_TIME=$(( 15 * 60 ))
17+ONE_MINUTE=60 26+ONE_MINUTE=60
18+RUN_TIME=60 27+RUN_TIME=15
19 28
20 cleanup() 29 cleanup()
21 { 30 {
22@@ -62,7 +63,7 @@ 31@@ -62,7 +63,7 @@ do_mount()
23 # $1 - Number of cgroups 32 # $1 - Number of cgroups
24 # $2 - Allocated how much memory in one process? in MB 33 # $2 - Allocated how much memory in one process? in MB
25 # $3 - The interval to touch memory in a process 34 # $3 - The interval to touch memory in a process
@@ -28,16 +37,19 @@ diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/tes
28 run_stress() 37 run_stress()
29 { 38 {
30 do_mount; 39 do_mount;
31@@ -81,7 +82,11 @@ 40@@ -81,7 +82,11 @@ run_stress()
32 eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null 41 eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
33 done 42 done
34 43
35- sleep $4 44- sleep $4
36+ for i in $(seq 0 $(($4-1))) 45+ for i in $(seq 0 $(($4-1)))
37+ do 46+ do
38+ eval echo "Started $i min ago. Still alive... " 47+ eval echo "Started $i min ago. Still alive... "
39+ sleep $ONE_MINUTE 48+ sleep $ONE_MINUTE
40+ done 49+ done
41 50
42 for i in $(seq 0 $(($1-1))) 51 for i in $(seq 0 $(($1-1)))
43 do 52 do
53--
542.8.1
55