[LTP] [PATCH] getrlimit/getrlimit03: new test for underlying syscall variants

Jan Stancek jstancek@redhat.com
Tue Nov 6 20:45:13 CET 2018



----- Original Message -----
<snip>

> +const uint64_t RLIM_INFINITY_U64 = UINT64_MAX;
> +
> +static int getrlimit_u64(int resource, struct rlimit64 *rlim)
> +{
> +	return syscall(__NR_prlimit64, 0, resource, NULL, rlim);

Hi,

(Likely an issue for old distro kernels, but)
consider using ltp_syscall here, or in setup(). Syscall __NR defines
come from LTP, so those will be always present, but syscall can still
be unsupported by kernel, so test can end up comparing with 'ENOSYS'.

Regards,
Jan


More information about the ltp mailing list