summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2016-04-01 13:46:19 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-01 15:02:21 +0100
commit26e24d3983096cda7e7455a29eb94fca41dbb4e0 (patch)
treee0c430ea2a6e989fa84ccabb8eb27ec86662fc4f
parentd371264d90fb2800d888b692c5a28646bcb70050 (diff)
downloadopenembedded-core-26e24d3983096cda7e7455a29eb94fca41dbb4e0.tar.gz
openembedded-core-26e24d3983096cda7e7455a29eb94fca41dbb4e0.tar.bz2
openembedded-core-26e24d3983096cda7e7455a29eb94fca41dbb4e0.zip
ltp: add periodic output for memcg stress test
Signed-off-by: Tudor Florea <tudor.florea@enea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/ltp/ltp/0034-periodic_output.patch43
-rw-r--r--meta/recipes-extended/ltp/ltp_20160126.bb1
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch b/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
new file mode 100644
index 0000000000..59caefe431
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
@@ -0,0 +1,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
diff --git a/meta/recipes-extended/ltp/ltp_20160126.bb b/meta/recipes-extended/ltp/ltp_20160126.bb
index 720a569ae5..6be2187eaa 100644
--- a/meta/recipes-extended/ltp/ltp_20160126.bb
+++ b/meta/recipes-extended/ltp/ltp_20160126.bb
@@ -60,6 +60,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch \
file://0032-regen.sh-Include-asm-unistd.h-explicitly.patch \
file://0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch \
+ file://0034-periodic_output.patch \
"
S = "${WORKDIR}/git"