Add more tests.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 29 Oct 2004 18:37:39 +0000 (18:37 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 29 Oct 2004 18:37:39 +0000 (18:37 +0000)
grading/userprog/sc-bad-arg.c [new file with mode: 0644]
grading/userprog/sc-bad-arg.exp [new file with mode: 0644]
grading/userprog/sc-bad-sp.c [new file with mode: 0644]
grading/userprog/sc-bad-sp.exp [new file with mode: 0644]
grading/userprog/tests.txt

diff --git a/grading/userprog/sc-bad-arg.c b/grading/userprog/sc-bad-arg.c
new file mode 100644 (file)
index 0000000..8bbd8ea
--- /dev/null
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include <syscall-nr.h>
+
+int
+main (void) 
+{
+  printf ("(sc-bad-arg) begin\n"); 
+  asm volatile ("mov $0xbffffffc, %%esp; movl $%0, (%%esp); int $0x30"
+                :
+                : "i" (SYS_exit));
+  printf ("(sc-bad-arg) end\n"); 
+  return 0;
+}
diff --git a/grading/userprog/sc-bad-arg.exp b/grading/userprog/sc-bad-arg.exp
new file mode 100644 (file)
index 0000000..7babb3c
--- /dev/null
@@ -0,0 +1,2 @@
+(sc-bad-arg) begin
+sc-bad-arg: exit(-1)
diff --git a/grading/userprog/sc-bad-sp.c b/grading/userprog/sc-bad-sp.c
new file mode 100644 (file)
index 0000000..9d996e9
--- /dev/null
@@ -0,0 +1,11 @@
+#include <stdio.h>
+#include <syscall.h>
+
+int
+main (void) 
+{
+  printf ("(sc-bad-sp) begin\n"); 
+  asm volatile ("mov $0xc0101234, %%esp; int $0x30");
+  printf ("(sc-bad-sp) end\n"); 
+  return 0;
+}
diff --git a/grading/userprog/sc-bad-sp.exp b/grading/userprog/sc-bad-sp.exp
new file mode 100644 (file)
index 0000000..4d72143
--- /dev/null
@@ -0,0 +1,2 @@
+(sc-bad-sp) begin
+sc-bad-sp: exit(-1)
index fbebaac6db1b7857a50f0da2de038e95eaaa6a00..73027a4083e496d22dac61ea0da26899c580109e 100644 (file)
@@ -29,7 +29,7 @@ System calls: create
   -1 create-long: pass long file name to create system call
   -1 create-exists: pass name of an existing file to create system call
   -1 create-bound: pass name of file crossing page boundary
-Score: /7
+Score: /8
 
 System calls: open
   -2 open-normal: open a file in the most normal way
@@ -38,7 +38,7 @@ System calls: open
   -1 open-empty: pass empty string to open system call
   -1 open-null: pass null pointer to open system call
   -1 open-twice: open the same file twice
-Score: /7
+Score: /9
 
 System calls: close
   -2 close-normal: close an open file in the most normal way
@@ -55,7 +55,7 @@ System calls: read
   -1 read-zero: try to read zero bytes
   -1 read-stdout: try to read from stdout
   -1 read-bad-fd: try to read from invalid file descriptor
-Score: /7
+Score: /9
 
 System calls: write
   -2 write-normal: write to open file in most normal way
@@ -64,7 +64,7 @@ System calls: write
   -1 write-zero: try to write zero bytes
   -1 write-stdin: try to write to stdin
   -1 write-bad-fd: try to write to invalid file descriptor
-Score: /7
+Score: /9
 
 System calls: exec
   -2 exec-once: call exec/join once