[LTP] [PATCH v1] Fix memcontrol tests under Tumbleweed

Marius Kittler mkittler@suse.de
Thu Oct 5 15:45:04 CEST 2023


These tests use `all_filesystems` in combination with
`dev_min_size` which does not work on Tumbleweed as it results
in:

```
tst_test.c:1644: TINFO: === Testing on xfs ===
tst_test.c:1099: TINFO: Formatting /dev/loop0 with xfs opts='' extra opts=''
Filesystem must be larger than 300MB.
…
tst_test.c:1105: TBROK: mkfs.xfs failed with exit code 1
```

This is likely a limitation introduced in newer kernel versions.

Increasing `dev_min_size` to 300 fixes the tests. In
`memcontrol03` and `memcontrol04` the `dev_min_size` setting
can be dropped completely.

Signed-off-by: Marius Kittler <mkittler@suse.de>
---
 testcases/kernel/controllers/memcg/memcontrol02.c | 2 +-
 testcases/kernel/controllers/memcg/memcontrol03.c | 1 -
 testcases/kernel/controllers/memcg/memcontrol04.c | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/testcases/kernel/controllers/memcg/memcontrol02.c b/testcases/kernel/controllers/memcg/memcontrol02.c
index 1656176b6..0d93abd9e 100644
--- a/testcases/kernel/controllers/memcg/memcontrol02.c
+++ b/testcases/kernel/controllers/memcg/memcontrol02.c
@@ -134,7 +134,7 @@ static struct tst_test test = {
 	.tcnt = 2,
 	.test = test_memcg_current,
 	.mount_device = 1,
-	.dev_min_size = 256,
+	.dev_min_size = 300,
 	.mntpoint = TMPDIR,
 	.all_filesystems = 1,
 	.forks_child = 1,
diff --git a/testcases/kernel/controllers/memcg/memcontrol03.c b/testcases/kernel/controllers/memcg/memcontrol03.c
index bc726f395..9c6c808e0 100644
--- a/testcases/kernel/controllers/memcg/memcontrol03.c
+++ b/testcases/kernel/controllers/memcg/memcontrol03.c
@@ -239,7 +239,6 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.test_all = test_memcg_min,
 	.mount_device = 1,
-	.dev_min_size = 256,
 	.mntpoint = TMPDIR,
 	.all_filesystems = 1,
 	.skip_filesystems = (const char *const[]){
diff --git a/testcases/kernel/controllers/memcg/memcontrol04.c b/testcases/kernel/controllers/memcg/memcontrol04.c
index c963a1cd8..32a0b9fd4 100644
--- a/testcases/kernel/controllers/memcg/memcontrol04.c
+++ b/testcases/kernel/controllers/memcg/memcontrol04.c
@@ -232,7 +232,6 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.test_all = test_memcg_low,
 	.mount_device = 1,
-	.dev_min_size = 256,
 	.mntpoint = TMPDIR,
 	.all_filesystems = 1,
 	.skip_filesystems = (const char *const[]){
-- 
2.42.0



More information about the ltp mailing list