00001 /* Tries to write to an invalid fd, 00002 which must either fail silently or terminate the process with 00003 exit code -1. */ 00004 00005 #include <limits.h> 00006 #include <syscall.h> 00007 #include "tests/main.h" 00008 00009 void 00010 test_main (void) 00011 { 00012 char buf = 123; 00013 write (0x01012342, &buf, 1); 00014 write (7, &buf, 1); 00015 write (2546, &buf, 1); 00016 write (-5, &buf, 1); 00017 write (-8192, &buf, 1); 00018 write (INT_MIN + 1, &buf, 1); 00019 write (INT_MAX - 1, &buf, 1); 00020 }