12 CHECK ((handle =
open (
"sample.txt")) > 1,
"open \"sample.txt\"");
14 fail (
"survived reading data into code segment");
int open(const char *file)
int read(int fd, void *buffer, unsigned size)
void fail(const char *format,...)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
void test_main(void)
Try to write to the code segment using a system call.