[LTP] [PATCH] mmap_24-1: Change vm.max_map_count if needed

Martin Doucha mdoucha@suse.cz
Fri May 9 12:15:48 CEST 2025


On 07. 05. 25 19:53, Petr Vorel wrote:
> Hi Martin,
> 
>> If vm.max_map_count system parameter is too high, mmap24-1 may get
>> killed by OOM. Set the parameter to a reasonable low value so that
>> mmap() quickly fails as expected.
> 
> LGTM.
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> 
> The only thing which bothers me is that writing /proc/sys/vm/max_map_count
> requires root. But I'm not sure if it's worth to add more code to check UID 0.

We don't need a check, the test will simply fail to open the file and 
move on to the main test case. But I'll add an info message if that happens.

-- 
Martin Doucha   mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list