00001 /* Verifies that misaligned memory mappings are disallowed. */ 00002 00003 #include <syscall.h> 00004 #include "tests/lib.h" 00005 #include "tests/main.h" 00006 00007 void 00008 test_main (void) 00009 { 00010 int handle; 00011 00012 CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\""); 00013 CHECK (mmap (handle, (void *) 0x10001234) == MAP_FAILED, 00014 "try to mmap at misaligned address"); 00015 } 00016