From b5f0874cd96ee2a62aabc645b9626c2749cb6a01 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 26 Mar 2012 12:54:45 +0200 Subject: initial pintos checkin --- pintos-progos/tests/vm/mmap-exit.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pintos-progos/tests/vm/mmap-exit.c (limited to 'pintos-progos/tests/vm/mmap-exit.c') diff --git a/pintos-progos/tests/vm/mmap-exit.c b/pintos-progos/tests/vm/mmap-exit.c new file mode 100644 index 0000000..7a2278a --- /dev/null +++ b/pintos-progos/tests/vm/mmap-exit.c @@ -0,0 +1,22 @@ +/* Executes child-mm-wrt and verifies that the writes that should + have occurred really did. */ + +#include +#include "tests/vm/sample.inc" +#include "tests/lib.h" +#include "tests/main.h" + +void +test_main (void) +{ + pid_t child; + + /* Make child write file. */ + quiet = true; + CHECK ((child = exec ("child-mm-wrt")) != -1, "exec \"child-mm-wrt\""); + CHECK (wait (child) == 0, "wait for child (should return 0)"); + quiet = false; + + /* Check file contents. */ + check_file ("sample.txt", sample, sizeof sample); +} -- cgit v1.2.3