Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / tests / vm / pt-bad-read.c
1 #include <syscall.h>
2 #include "tests/lib.h"
3 #include "tests/main.h"
4
5 void
6 test_main (void)
7 {
8   int handle;
9
10   CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\"");
11   read (handle, (char *) &handle - 4096, 1);
12   fail ("survived reading data into bad address");
13 }