From a43271bc9283128d82c6542c70378a52a05d35cf Mon Sep 17 00:00:00 2001 From: Catalina Focsa Date: Thu, 17 Dec 2015 15:52:26 +0100 Subject: ltp: Fix test_proc_kill hanging Signed-off-by: Catalina Focsa Signed-off-by: George Nita --- .../ltp/files/fix-test_proc_kill-hang.patch | 23 ++++++++++++++++++++++ recipes-extended/ltp/ltp_20140422.bbappend | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 recipes-extended/ltp/files/fix-test_proc_kill-hang.patch diff --git a/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch b/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch new file mode 100644 index 0000000..8fb11af --- /dev/null +++ b/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch @@ -0,0 +1,23 @@ +Fix test_proc_kill hanging + +Sometimes the signal is delivered to memcg_process before the framework took +into consideration its pid entered in the tasks. Fixed by delaying the signal +send command. + +Signed-off-by: George Nita +Upstream-Status: Not Submitted + +diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh +index ffbe006..e81bf74 100755 +--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh ++++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh +@@ -220,8 +220,8 @@ test_proc_kill() + + $TEST_PATH/memcg_process $2 -s $3 & + pid=$! +- sleep 1 + echo $pid > tasks ++ sleep 1 + + kill -s USR1 $pid 2> /dev/null + sleep 1 diff --git a/recipes-extended/ltp/ltp_20140422.bbappend b/recipes-extended/ltp/ltp_20140422.bbappend index 1163fde..e0b6de0 100644 --- a/recipes-extended/ltp/ltp_20140422.bbappend +++ b/recipes-extended/ltp/ltp_20140422.bbappend @@ -1,7 +1,8 @@ FILESEXTRAPATHS_append := "${THISDIR}/files" -SRC_URI += " \ +SRC_URI_append = " \ file://periodic_output.patch \ + file://fix-test_proc_kill-hang.patch \ " do_compile_prepend () { -- cgit v1.2.3-54-g00ecf