Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | Add periodic output for long time test. |
| 2 | |
| 3 | This is needed in context of having scripts running ltp tests and |
| 4 | waiting with a timeout for the output of the tests. |
| 5 | |
| 6 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> |
| 7 | Upstream-Status: Pending |
| 8 | |
| 9 | diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh |
| 10 | --- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 15:54:09.515049081 +0100 |
| 11 | +++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 22:32:15.587370406 +0100 |
| 12 | @@ -37,7 +37,8 @@ |
| 13 | exit 0 |
| 14 | fi |
| 15 | |
| 16 | -RUN_TIME=$(( 60 * 60 )) |
| 17 | +ONE_MINUTE=60 |
| 18 | +RUN_TIME=60 |
| 19 | |
| 20 | cleanup() |
| 21 | { |
| 22 | @@ -62,7 +63,7 @@ |
| 23 | # $1 - Number of cgroups |
| 24 | # $2 - Allocated how much memory in one process? in MB |
| 25 | # $3 - The interval to touch memory in a process |
| 26 | -# $4 - How long does this test run ? in second |
| 27 | +# $4 - How long does this test run ? in minutes |
| 28 | run_stress() |
| 29 | { |
| 30 | do_mount; |
| 31 | @@ -81,7 +82,11 @@ |
| 32 | eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null |
| 33 | done |
| 34 | |
| 35 | - sleep $4 |
| 36 | + for i in $(seq 0 $(($4-1))) |
| 37 | + do |
| 38 | + eval echo "Started $i min ago. Still alive... " |
| 39 | + sleep $ONE_MINUTE |
| 40 | + done |
| 41 | |
| 42 | for i in $(seq 0 $(($1-1))) |
| 43 | do |