// S : tags 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 int main() { int fd = open( "test", O_WRONLY | O_CREAT, 0644 ); assert( fd >= 0 ); assert( close( fd ) == 0 ); assert( close( fd ) == -1 ); assert( errno == EBADF ); return 0; }