15 CHECK ((fd =
open (
"xyzzy")) > 1,
"open \"xyzzy\"");
17 msg (
"write \"xyzzy\"");
18 retval =
write (fd,
"foobar", 6);
20 "write \"xyzzy\" (must return -1, actually %d)", retval);
void test_main(void)
Opens a directory, then tries to write to it, which must fail.
int open(const char *file)
int write(int fd, const void *buffer, unsigned size)
bool mkdir(const char *dir)
void msg(const char *format,...)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.