blob: 7a2278a516a88b6ffba0749e041069f50bef3a36 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* Executes child-mm-wrt and verifies that the writes that should
have occurred really did. */
#include <syscall.h>
#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);
}
|