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

Petr Vorel pvorel@suse.cz
Thu Oct 26 11:57:24 CEST 2023


Hi Marius, Cyril,

> 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).

+1. Although it's unlikely we would really implement smaller loop device on
demand (nobody was really interested and 300 MB for a rootfs is not that much
nowadays), IMHO it's better to keep the real size request in case we really
implement it one day.

BTW more than 300 MB in the error message is 301 MB or more, right? I'm for 300
MB if it works (I suppose you have checked it), but XFS developers are wrong :).

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Thanks for handling this long standing issue (it looks like nobody runs
controllers on mainline :(.

Kind regards,
Petr


More information about the ltp mailing list