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

Cyril Hrubis chrubis@suse.cz
Tue Nov 6 20:47:26 CET 2018


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'.


-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list