00001 /* Passes an invalid pointer to the write 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 write (handle, (char *) 0x10123420, 123); 00015 fail ("should have exited with -1"); 00016 }