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

Cyril Hrubis chrubis@suse.cz
Fri Feb 15 13:16:11 CET 2019

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

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

More information about the ltp mailing list