Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / tests / vm / page-parallel.c
1 #include <syscall.h>
2 #include "tests/lib.h"
3 #include "tests/main.h"
4
5 #define CHILD_CNT 3
6
7 void
8 test_main (void)
9 {
10   pid_t children[CHILD_CNT];
11   int i;
12
13   for (i = 0; i < CHILD_CNT; i++) 
14     CHECK ((children[i] = exec ("child-linear")) != -1,
15            "exec \"child-linear\"");
16
17   for (i = 0; i < CHILD_CNT; i++) 
18     CHECK (wait (children[i]) == 0x42, "wait for child %d", i);
19 }