[LTP] [PATCH] Add test case to cover the setting resource limit64 for process

Chunfu Wen chwen@redhat.com
Wed Feb 19 03:35:52 CET 2025


Hello,
See inline comments.
Best Regards,
Chunfu Wen

On Tue, Feb 18, 2025 at 9:29 PM Andrea Cervesato <andrea.cervesato@suse.com>
wrote:

> Hi!
>
> The whole test is a duplication of the setrlimit06, so it's better to
> work on that one and to introduce the 64bits support using 64bit test
> variant.
> [chwen]Maybe it is a good idea to use separate setrlimit07.c file to
> support using 64bit testing, since it can bring into two benefits. 1)align
> with gettrlimit, it has separate file getrlimit03.c for 64bits, and it help
> easily extend more scernao cases for 64bits 2) Putting them in separate
> file is more convenient for users to select test case specfic 64bits
> testing once users need that.



> A couple of comments about the implementation:
>
> - we are already defining the "struct rlimit64" inside getrlimit03, so
> we need to create a new file lapi/resource.h where we move that struct,
> checking if HAVE_STRUCT_RLIMIT64 is not defined. I guess the same should
> be done for getrlimit_u64()/setrlimit_u64() syscalls definitions. Better
> to move them in there in case we will need it in the future . We can
> skip SAFE_* variants at the moment, since we are not using them around
> LTP test for now.
>
> - in both setrlimit06 and setrlimit07 we should probably use tst_buffers
> for safety reasons when passing the pointer to the rlimit/rlimit64
> struct we are gonna use
>
> - it's worth to check if the other tests might introduce the same 64bit
> variants
>
> FYI i noticed that setrlimit06 description can't be fetched in the
> metadata because it's not initialized with /*\ . It also needs to be
> changed into the RST format instead of asciidoc.
>
> King regards,
> Andrea Cervesato
>
>


More information about the ltp mailing list