Add more tests.
[pintos-anon] / grading / userprog / write-bad-fd.c
diff --git a/grading/userprog/write-bad-fd.c b/grading/userprog/write-bad-fd.c
new file mode 100644 (file)
index 0000000..33df001
--- /dev/null
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include <syscall.h>
+
+int
+main (void) 
+{
+  char buf = 123;
+  printf ("(write-bad-fd) begin\n");
+  write (0xc0101234, &buf, 1);
+  printf ("(write-bad-fd) end\n");
+  return 0;
+}