1 /* Verifies that memory mappings persist after file close. */
5 #include "tests/vm/sample.inc"
6 #include "tests/arc4.h"
8 #include "tests/main.h"
10 #define ACTUAL ((void *) 0x10000000)
18 CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\"");
19 CHECK ((map = mmap (handle, ACTUAL)) != MAP_FAILED, "mmap \"sample.txt\"");
23 if (memcmp (ACTUAL, sample, strlen (sample)))
24 fail ("read of mmap'd file reported bad data");