00001
00002
00003
00004
00005
00006 #include <syscall.h>
00007 #include "tests/lib.h"
00008 #include "tests/main.h"
00009
00010 void
00011 test_main (void)
00012 {
00013 char *data = (char *) 0x7f000000;
00014 int handle;
00015
00016 CHECK (create ("empty", 0), "create empty file \"empty\"");
00017 CHECK ((handle = open ("empty")) > 1, "open \"empty\"");
00018
00019
00020 msg ("mmap \"empty\"");
00021 mmap (handle, data);
00022
00023
00024
00025 fail ("unmapped memory is readable (%d)", *data);
00026 }
00027