[LTP] [PATCH v2] syscalls/mlock05: add mlock test for locking and pre-faulting of memory

Cyril Hrubis chrubis@suse.cz
Mon Apr 29 15:48:21 CEST 2024


Hi!
> check VmRSS and VmLck variables from /proc/$pid/status.
> VmRSS size should at least as big as the memory allocation.
> VmLck size should be equal to the size of the memory allocation.

Now the test looks good, however I managed to make it fail. The test
fails if you run it with large enough -i paramater, for me running
'./mlock05 -i 10000' tend to produce failures at the end of the testrun:

tst_test.c:1741: TINFO: LTP version: 20240129-192-geca801321
tst_test.c:1625: TINFO: Timeout per run is 0h 00m 30s
mlock05.c:49: TPASS: Expect: (VmRSS=1048576) >= (MMAPLEN=1048576)
mlock05.c:52: TPASS: VmLck == MMAPLEN (1048576)
...
mlock05.c:52: TPASS: VmLck == MMAPLEN (1048576)
mlock05.c:49: TFAIL: Expect: (VmRSS=983040) >= (MMAPLEN=1048576)
mlock05.c:52: TPASS: VmLck == MMAPLEN (1048576)
mlock05.c:49: TFAIL: Expect: (VmRSS=983040) >= (MMAPLEN=1048576)
mlock05.c:52: TPASS: VmLck == MMAPLEN (1048576)

Summary:
passed   18332
failed   1668
broken   0
skipped  0
warnings 0
...

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list