[LTP] [PATCH 1/1] getrlimit03: Simplify TCONF code

Tiezhu Yang yangtiezhu@loongson.cn
Fri Jul 18 11:43:28 CEST 2025


On 2025/7/18 下午5:05, Petr Vorel wrote:
> ENOSYS checks added in fac783b5d6 and d071de02e8 are verbose, use
> tst_syscall() to handle ENOSYS.
> 
> Also check for __NR_getrlimit caused TCONF message being printed more
> times (RLIM_NLIMITS => 16 on x86_64), which is also fixed by using
> tst_syscall().
> 
> Because it should be safe to not use specific errno variables remove
> errno_l and errno_ul.
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Hi all,
> 
> @Tiezhu can you please test this patch?

Here is the test result on LoongArch, this is expected:

$ /opt/ltp/testcases/bin/getrlimit03
tst_test.c:2003: TINFO: LTP version: 20250530-81-ge1bb63ae5
tst_test.c:2006: TINFO: Tested kernel: 6.16.0-rc6+ #36 SMP 
PREEMPT_DYNAMIC Fri Jul 18 16:48:29 CST 2025 loongarch64
tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
tst_test.c:1824: TINFO: Overall timeout per run is 0h 00m 30s
getrlimit03.c:80: TCONF: syscall(-1) __NR_getrlimit_ulong not supported 
on your arch

Summary:
passed   0
failed   0
broken   0
skipped  1
warnings 0

Tested-by: Tiezhu Yang <yangtiezhu@loongson.cn> # on LoongArch

It would be better if __NR_getrlimit_ulong can be printed as
__NR_ugetrlimit or __NR_getrlimit:

getrlimit03.c:80: TCONF: syscall(-1) __NR_getrlimit_ulong not supported

No strong opinion, let's see if other people have concern about it.

Thanks,
Tiezhu



More information about the ltp mailing list