memcg_control: fix mem_process not moved to cgroup
PATCH 1/1 memcg_control: fix mem_process not moved to cgroup
$! is not set after ( cmd & )
This bug was introduced by commit 49010e502a74c ("Replace pushd // popd with cd calls.").
Since we create a sub-shell in test_proc_kill only to preserve PWD, let's change this to cd $OLDPWD. In contrast to pushd/popd this will work in busybox.
--- testcases/kernel/controllers/memcg/control/memcg_control_test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
testcases/kernel/controllers/memcg/control/memcg_control_test.sh +3 -1
@@ -54,7 +54,9 @@ FAIL=1 # Check if the test process is killed on crossing boundary test_proc_kill() { - ( cd $TMP && mem_process -m $PROC_MEM & ) + cd $TMP + mem_process -m $PROC_MEM & + cd $OLDPWD sleep 1 echo $! > tasks
Signature · 8 lines
2.1.4 ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
----- Original Message -----
Quoted 7 lines
From: "Vladimir Davydov" <[email protected]>
To: [email protected]
Sent: Monday, 20 July, 2015 4:47:11 PM
Subject: [LTP] [PATCH]memcg_control: fixmem_processnot moved to cgroup$! is not set after ( cmd & )
Quoted 8 lines
This bug was introduced by commit
49010e502a74c("Replace pushd // popd with cd calls.").Since we create a sub-shell in
test_proc_killonly to preserve PWD, let's change this to cd $OLDPWD. In contrast to pushd/popd this will work in busybox.Signed-off-by Vladimir Davydov <[email protected]>
Pushed.
Thank you,
Jan
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list