1 /* Child process of mmap-exit.
2 Mmaps a file and writes to it via the mmap'ing, then exits
3 without calling munmap. The data in the mapped region must be
4 written out at program termination. */
8 #include "tests/vm/sample.inc"
10 #include "tests/main.h"
12 #define ACTUAL ((void *) 0x10000000)
19 CHECK (create ("sample.txt", sizeof sample), "create \"sample.txt\"");
20 CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\"");
21 CHECK (mmap (handle, ACTUAL) != MAP_FAILED, "mmap \"sample.txt\"");
22 memcpy (ACTUAL, sample, sizeof sample);