#include #include #include void test( int( *toTest )( int ) ) { assert( toTest( 0 ) == 0 ); errno = 0; assert( toTest( 20 ) == -1 ); assert( errno == EBADF ); } int main() { test( fsync ); test( fdatasync ); test( syncfs ); }