[LTP] [PATCH v2] syscalls: add syscall syncfs test
Sumit Garg
sumit.garg@linaro.org
Fri Feb 15 14:18:15 CET 2019
On Fri, 15 Feb 2019 at 17:46, Cyril Hrubis <chrubis@suse.cz> wrote:
>
> Hi!
> > > 1) Compilation failed on older kernel(e.g. v2.6.32) because of the
> > > undefined syncfs().
> > > According to manpage, syncfs() was first appeared in Linux 2.6.39 and
> > > library
> > > support was added to glibc in version 2.14. Perhaps, we need to check if
> > > syncfs()
> > > is defined.
> > >
> >
> > Would configuring .min_kver suffice to avoid this compilation issue?
>
> Not at all, min_kver is runtime check, which could solve the latter
> problem.
>
> For this you can either:
>
> * Add a configure check for syscfs()
>
> * Add a fallback syscall definition to header include/lapi/
>
> Fallback definition is preferable solution since with that the test will
> still work on old userspace with new kernel.
>
Thanks for the pointers. IIUC, you are referring to following change:
- TEST(syncfs(fd));
+ TEST(tst_syscall(__NR_syncfs, fd));
If yes, then I will incorporate it.
-Sumit
> --
> Cyril Hrubis
> chrubis@suse.cz
More information about the ltp
mailing list