Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / tests / userprog / rox-simple.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   char buffer[16];
10   
11   CHECK ((handle = open ("rox-simple")) > 1, "open \"rox-simple\"");
12   CHECK (read (handle, buffer, sizeof buffer) == (int) sizeof buffer,
13          "read \"rox-simple\"");
14   CHECK (write (handle, buffer, sizeof buffer) == 0,
15          "try to write \"rox-simple\"");
16 }