linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] selftests: memcg: remove useless code in test_memcg_oom_group_leaf_events
@ 2024-10-12  2:10 Jinjiang Tu
  2024-10-14 22:30 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Jinjiang Tu @ 2024-10-12  2:10 UTC (permalink / raw)
  To: hannes, mhocko, roman.gushchin, shakeel.butt, muchun.song, shuah,
	jgkamat
  Cc: linux-mm, wangkefeng.wang, sunnanyong, tujinjiang

Due to No Internal Process Constraint, parent cgroup couldn't contain any
process, the code `cg_run_nowait(parent, ...)` fails to execute and
return -1 in fact. So remove the useless code to avoid misunderstanding.

Fixes: a987785dcd6c ("Add tests for memory.oom.group")
Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com>
---
 tools/testing/selftests/cgroup/test_memcontrol.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c
index 16f5d74ae762..1be36cff72a0 100644
--- a/tools/testing/selftests/cgroup/test_memcontrol.c
+++ b/tools/testing/selftests/cgroup/test_memcontrol.c
@@ -1392,7 +1392,6 @@ static int test_memcg_oom_group_leaf_events(const char *root)
 	if (cg_write(child, "memory.oom.group", "1"))
 		goto cleanup;
 
-	cg_run_nowait(parent, alloc_anon_noexit, (void *) MB(60));
 	cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1));
 	cg_run_nowait(child, alloc_anon_noexit, (void *) MB(1));
 	if (!cg_run(child, alloc_anon, (void *)MB(100)))
-- 
2.34.1



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

end of thread, other threads:[~2024-10-14 22:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-12  2:10 [PATCH -next] selftests: memcg: remove useless code in test_memcg_oom_group_leaf_events Jinjiang Tu
2024-10-14 22:30 ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox