Add more tests.
[pintos-anon] / grading / userprog / open-missing.c
diff --git a/grading/userprog/open-missing.c b/grading/userprog/open-missing.c
new file mode 100644 (file)
index 0000000..e7a2b84
--- /dev/null
@@ -0,0 +1,14 @@
+#include <stdio.h>
+#include <syscall.h>
+
+int
+main (void) 
+{
+  int handle;
+  printf ("(open-missing) begin\n");
+  handle = open ("no-such-file");
+  if (handle != -1)
+    printf ("(open-missing) fail: open() returned %d\n", handle);
+  printf ("(open-missing) end\n");
+  return 0;
+}