Make tests public. Rewrite most tests. Add tests.
[pintos-anon] / src / tests / userprog / child-close.c
diff --git a/src/tests/userprog/child-close.c b/src/tests/userprog/child-close.c
new file mode 100644 (file)
index 0000000..83e3d06
--- /dev/null
@@ -0,0 +1,19 @@
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <syscall.h>
+#include "tests/lib.h"
+
+const char *test_name = "child-close";
+
+int
+main (int argc UNUSED, char *argv[]) 
+{
+  msg ("begin");
+  if (!isdigit (*argv[1]))
+    fail ("bad command-line arguments");
+  close (atoi (argv[1]));
+  msg ("end");
+
+  return 0;
+}