00001 /* Passes an invalid pointer to the read system call. 00002 The process must be terminated with -1 exit code. */ 00003 00004 #include <syscall.h> 00005 #include "tests/lib.h" 00006 #include "tests/main.h" 00007 00008 void 00009 test_main (void) 00010 { 00011 int handle; 00012 CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\""); 00013 00014 read (handle, (char *) 0xc0100000, 123); 00015 fail ("should not have survived read()"); 00016 }