All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] memcg_functinon: testcase_30 function
@ 2015-07-08  9:52 Xiumiao Song
  2015-08-05 12:16 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Xiumiao Song @ 2015-07-08  9:52 UTC (permalink / raw)
  To: ltp-list; +Cc: Xiumiao Song, wunan

Testcase_30 function testing mem_cgroup_force_empty_write
function return -EBUSY,when there is a task in cgroup.
Namely when setting memory.force_empty,it will be failed.
However,kernel 3.16 and above do nothing,
whatever there is a task in cgroup or not.

Signed-off-by: Xiumiao Song <songxiumiao@inspur.com>
---
 .../kernel/controllers/memcg/functional/memcg_function_test.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
index 2c2f32a..6a5c58d 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
@@ -234,11 +234,11 @@ testcase_30()
 	sleep 1
 
 	echo 1 > memory.force_empty 2> /dev/null
-	if [ $? -ne 0 ]; then
-		result $PASS "force memory failed as expected"
-	else
-		result $FAIL "force memory should fail"
-	fi
+ 	if [ $? -eq 0 ]; then
+                result $PASS "force memory succeeded"
+        else
+                result $FAIL "force memory failed"
+        fi	
 
 	kill -s INT $pid 2> /dev/null
 }
-- 
1.9.1



------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH] memcg_functinon: testcase_30 function
  2015-07-08  9:52 [LTP] [PATCH] memcg_functinon: testcase_30 function Xiumiao Song
@ 2015-08-05 12:16 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2015-08-05 12:16 UTC (permalink / raw)
  To: Xiumiao Song; +Cc: Michal Hocko, ltp-list, wunan

Hi!
> Testcase_30 function testing mem_cgroup_force_empty_write
> function return -EBUSY,when there is a task in cgroup.
> Namely when setting memory.force_empty,it will be failed.
> However,kernel 3.16 and above do nothing,
> whatever there is a task in cgroup or not.

This has been fixed in git by:

commit 5c3635d26929a00103f70a54365229449f71a217
Author: Michal Hocko <mhocko@suse.cz>
Date:   Thu May 14 16:24:38 2015 +0200

    controllers/memcg: fix force_empty

    testcase_29 and testcase_30 are no longer testing anything because
    the kernel allows to use force_empty even for memcgs with active
    tasks since f61c42a7d911 ("memcg: remove tasks/children test from
    mem_cgroup_force_empty()) kernel commit.

    If we really want to test this functionality then just expect the
    success for regular mmap and expect the failure when the charged
    memory is mlocked.

    Signed-off-by: Michal Hocko <mhocko@suse.cz>
    Signed-off-by: Cyril Hrubis <chrubis@suse.cz>


-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-05 12:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08  9:52 [LTP] [PATCH] memcg_functinon: testcase_30 function Xiumiao Song
2015-08-05 12:16 ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.