5#include "tests/vm/sample.inc"
10#define ACTUAL ((void *) 0x10000000)
18 CHECK ((handle =
open (
"sample.txt")) > 1,
"open \"sample.txt\"");
24 fail (
"read of mmap'd file reported bad data");
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
Verifies that memory mappings persist after file close.
void test_main(void)
tests/main.h
int memcmp(const void *a_, const void *b_, size_t size)
Find the first differing byte in the two blocks of SIZE bytes at A and B.
size_t strlen(const char *string)
Returns the length of STRING.