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

Greg Hackmann ghackmann@google.com
Wed Nov 7 22:11:47 CET 2018


On 11/06/2018 11:47 AM, Cyril Hrubis wrote:
> Hi!
>>> +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
>                   ^
> 		 That would be tst_syscall() for new tst_test.h library
> 
>> 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'.
> 
> 

Thanks for the feedback.  I'll send a v2 with this change shortly.


More information about the ltp mailing list