Skip to contentSkip to conversation

cgroup/memcg_regression_test: fix test4 cleanup

PATCH New Jan Stancek 1 participant 1 message Sep 19, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 cgroup/memcg_regression_test: fix test4 cleanup

If test_4.sh gets killed, it won't clean cgroup it created, so clean it here.

---
 .../memcg/regression/memcg_regression_test.sh      |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh +4 -0
index 855b0fe..55bec93 100755
@@ -211,6 +211,10 @@ test_4()
 	# test_4.sh might be killed by oom, so do clean up here
 	killall -9 memcg_test_4 2> /dev/null
 	killall -9 memcg_test_4.sh 2> /dev/null
+
+	# if test_4.sh gets killed, it won't clean cgroup it created
+	rmdir memcg/0 2> /dev/null
+
 	swapon -a
 }
 

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list