00001 /* Executes child-mm-wrt and verifies that the writes that should 00002 have occurred really did. */ 00003 00004 #include <syscall.h> 00005 #include "tests/vm/sample.inc" 00006 #include "tests/lib.h" 00007 #include "tests/main.h" 00008 00009 void 00010 test_main (void) 00011 { 00012 pid_t child; 00013 00014 /* Make child write file. */ 00015 quiet = true; 00016 CHECK ((child = exec ("child-mm-wrt")) != -1, "exec \"child-mm-wrt\""); 00017 CHECK (wait (child) == 0, "wait for child (should return 0)"); 00018 quiet = false; 00019 00020 /* Check file contents. */ 00021 check_file ("sample.txt", sample, sizeof sample); 00022 }