5#include "tests/vm/sample.inc"
16 CHECK ((child =
exec (
"child-mm-wrt")) != -1,
"exec \"child-mm-wrt\"");
17 CHECK (
wait (child) == 0,
"wait for child (should return 0)");
21 check_file (
"sample.txt", sample,
sizeof sample);
static void wait(struct intq *q, struct thread **waiter)
pid_t exec(const char *file)
int pid_t
Process identifier.
void check_file(const char *file_name, const void *buf, size_t size)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
void test_main(void)
Executes child-mm-wrt and verifies that the writes that should have occurred really did.