// S : tags kleetodo c $TAGS // S : expect --result valid // S : cc -o test.bc $CC_OPT $file // S : verify $V_OPT -o nofail:vfs test.bc #include #include #include #include #include #include int main() { assert( mkdir( "dir", 0644 ) == 0 ); errno = 0; DIR *d = opendir( "dir" ); assert( d != NULL ); closedir( d ); DIR *e = opendir( "dir/x" ); assert( e == NULL ); __dios_trace_f( "errno = %d", errno ); assert( errno == EACCES ); closedir( e ); return 0; }