[LTP] [PATCH] Fix memcontrol02 test failure on powerpc.

Pavithra pavrampu@linux.ibm.com
Sun Mar 29 13:32:52 CEST 2026


memcontrol02 test is failing on PowerPC with 50MB allocation. Increase to
100MB for both anonymous and page cache tests, and bump minimum
device size from 300MB to 400MB accordingly.

Signed-off-by: Pavithra <pavrampu@linux.ibm.com>
---
 testcases/kernel/controllers/memcg/memcontrol02.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/testcases/kernel/controllers/memcg/memcontrol02.c b/testcases/kernel/controllers/memcg/memcontrol02.c
index 0b79403c9..fcce82d68 100644
--- a/testcases/kernel/controllers/memcg/memcontrol02.c
+++ b/testcases/kernel/controllers/memcg/memcontrol02.c
@@ -32,9 +32,9 @@ static struct tst_cg_group *cg_child;
 static int fd;
 static int file_to_all_error = 10;
 
-static void alloc_anon_50M_check(void)
+static void alloc_anon_100M_check(void)
 {
-	const ssize_t size = MB(50);
+	const ssize_t size = MB(100);
 	char *buf, *ptr;
 	ssize_t anon, current;
 	const char *const anon_key_fmt =
@@ -58,9 +58,9 @@ static void alloc_anon_50M_check(void)
 		     current, anon);
 }
 
-static void alloc_pagecache_50M_check(void)
+static void alloc_pagecache_100M_check(void)
 {
-	const size_t size = MB(50);
+	const size_t size = MB(100);
 	size_t current, file;
 	const char *const file_key_fmt =
 		TST_CG_VER_IS_V1(tst_cg, "memory") ? "cache %zd" : "file %zd";
@@ -102,9 +102,9 @@ static void test_memcg_current(unsigned int n)
 			current);
 
 		if (!n)
-			alloc_anon_50M_check();
+			alloc_anon_100M_check();
 		else
-			alloc_pagecache_50M_check();
+			alloc_pagecache_100M_check();
 	} else {
 		tst_reap_children();
 		cg_child = tst_cg_group_rm(cg_child);
@@ -136,7 +136,7 @@ static struct tst_test test = {
 	.tcnt = 2,
 	.test = test_memcg_current,
 	.mount_device = 1,
-	.dev_min_size = 300,
+	.dev_min_size = 400,
 	.mntpoint = TMPDIR,
 	.all_filesystems = 1,
 	.forks_child = 1,
-- 
2.53.0



More information about the ltp mailing list