Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / tests / userprog / wait-twice.c
diff --git a/src/tests/userprog/wait-twice.c b/src/tests/userprog/wait-twice.c
new file mode 100644 (file)
index 0000000..9386ffe
--- /dev/null
@@ -0,0 +1,11 @@
+#include <syscall.h>
+#include "tests/lib.h"
+#include "tests/main.h"
+
+void
+test_main (void) 
+{
+  pid_t child = exec ("child-simple");
+  msg ("wait(exec()) = %d", wait (child));
+  msg ("wait(exec()) = %d", wait (child));
+}