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

Marius Kittler mkittler@suse.de
Thu Oct 12 12:48:37 CEST 2023


Am Donnerstag, 12. Oktober 2023, 11:19:44 CEST schrieb Cyril Hrubis:
> 
> Shouldn't we just remove all of dev_min_size records?
> 
> We already have DEV_SIZE_MB set to 300 in lib/tst_device.c so with no
> limits we will use the default 300Mb.

I thought so, too. However, when running this particular test without this 
minimum specified explicitly, it runs into the following error:

```
tst_test.c:1650: TINFO: === Testing on tmpfs ===
tst_test.c:1105: TINFO: Skipping mkfs for TMPFS filesystem
tst_test.c:1086: TINFO: Limiting tmpfs size to 32MB
tst_test.c:1119: TINFO: Mounting ltp-tmpfs to /tmp/LTP_memkrqX1e/mntdir 
fstyp=tmpfs flags=0
memcontrol02.c:93: TPASS: Expect: (current=0) == 0
memcontrol02.c:99: TINFO: Added proc to memcg: memory.current=262144
memcontrol02.c:46: TPASS: Expect: (memory.current=52690944) >= (size=52428800)
memcontrol02.c:51: TPASS: Expect: (memory.stat.anon=52449280) > 0
memcontrol02.c:52: TPASS: Expect: (size=52428800) ~= 
(memory.stat.anon=52449280)
memcontrol02.c:54: TPASS: Expect: (memory.current=52690944) ~= 
(memory.stat.anon=52449280)
memcontrol02.c:93: TPASS: Expect: (current=0) == 0
memcontrol02.c:99: TINFO: Added proc to memcg: memory.current=262144
memcontrol02.c:69: TINFO: Created temp file: memory.current=262144
memcontrol_common.h:34: TBROK: write(9,0x7ffda0f93710,8192) failed: ENOSPC (28)
```

Judging by the 3rd TINFO message the size for tmpfs filesystems is 
intentionally limited to 32MB which presumably also makes generally sense. 
However, here we *really* need more space. This is most likely also the reason 
why this test had `.dev_min_size = 256,` before in the first place. The other 
tests don't need it, though (and I guess the `.dev_min_size = 256,` had just 
been copied over from the first test).





More information about the ltp mailing list