5#include "tests/vm/sample.inc"
9#define ACTUAL ((void *) 0x10000000)
17 CHECK ((handle =
open (
"sample.txt")) > 1,
"open \"sample.txt\"");
22 fail (
"unmapped memory is readable (%d)", *(
int *)
ACTUAL);
mapid_t mmap(int fd, void *addr)
Project 3 and optionally project 4.
int open(const char *file)
void munmap(mapid_t mapid)
int mapid_t
Map region identifier.
void fail(const char *format,...)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
#define ACTUAL
Maps and unmaps a file and verifies that the mapped region is inaccessible afterward.
void test_main(void)
tests/main.h