[LTP] [PATCH] Add test case to cover the setting resource limit64 for process
Andrea Cervesato
andrea.cervesato@suse.com
Wed Feb 19 10:29:40 CET 2025
Hi,
On 2/19/25 03:35, Chunfu Wen wrote:
> 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.
>
If the goal is to generate a 64bit binary so users can easily run it
without variants, you don't need a new file but to edit the Makefile adding:
include $(abs_srcdir)/../utils/newer_64.mk
%_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64
In this way you will have a 64bit binary for each test in the folder. At
that point, to switch between syscalls according to the 64bit
architecture definition is easy and runtest file will need to be updated
accordingly. If you take a look at the other test cases you will find
many examples on this method.
Andrea
More information about the ltp
mailing list