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

Steve Muckle smuckle@google.com
Fri Feb 22 20:58:18 CET 2019

On 02/20/2019 07:12 AM, Cyril Hrubis wrote:
> Hi!
>>> Sure. My concern is being able to test syscalls in Android where the C
>>> library may not have some wrappers. So far these have all been cases
>>> where one can just replace the library call with the direct syscall, as
>>> a number of recent patches have done. If I run into a case where more
>>> substantial library support is needed maybe we'll just have to focus on
>>> getting that into bionic or look at other options.
>> I guess that we can also auto-generate fallback syscall wrappers for
>> these cases so that we don't have to bother dealing with this in the
>> actual testcases. Should be as easy as listing the function prototypes
>> in a file and a few lines of shell.
> Thinking of this, generating fallbacks is the easy part, figuring out
> when to use them is the complex one. I wanted to use a trick with weak
> function symbols so that the linker would pick up these fallbacks only
> if there was no system defintion but that unfortunately does not work
> because glibc uses weak symbols for symbol versioning. I guess that we
> can use autoconf to generate fallback functions automatically if syscall
> wrapper is found to be missing, but that would be a bit ugly code. Also
> do you even use the configure script on android builds?

We do use the configure script. But I guess given the discussion in the 
other thread, hopefully both the libc wrapper and direct syscall can be 

More information about the ltp mailing list