[LTP] [PATCH v2] syscalls: add syscall syncfs test

Cyril Hrubis
2019-02-15T12:16:11Z

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.

--
Cyril Hrubis
chrubis@suse.cz