00001 /* Tries to read from 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/lib.h" 00008 #include "tests/main.h" 00009 00010 void 00011 test_main (void) 00012 { 00013 char buf; 00014 read (0x20101234, &buf, 1); 00015 read (5, &buf, 1); 00016 read (1234, &buf, 1); 00017 read (-1, &buf, 1); 00018 read (-1024, &buf, 1); 00019 read (INT_MIN, &buf, 1); 00020 read (INT_MAX, &buf, 1); 00021 }