Project 2 Test Cases
Short
descriptions of Test Cases run by the AutoGrader for Project 2
please check that your program
doesn't print out your debugging statements
or take unusually long, this will probably give you
a resourceLimitExceed error.
-
Filesystem
Syscall Tests
Tests file syscalls (creat, open, read, write,
close, unlink), as well as stdin/stdout.
If anything is printed to the console aside from what is expected, the
test will fail.
Test UserGrader1
- testID
0 : Creates a file, checks syscall creat works
- testID
1 : calls syscall creat/close/unlink and checks that they work
- testID
2 : tests if your syscall close actually closes the file
- testID
3 : tests if your syscall open fails gracefully when stubFileSystem's
openfile limit's exceeded
- testID
4 : tests if all files get closed when process exits normally
- testID
5 : tests your syscall read by reading some bytes from a file
- testID
6 : tests that each of your processes's file descriptors are
independent from other processes
- testID
7 : copies between files, tests creat, open, read, write, close
- testID
8 : tests that write fails gracefully on bad arguements (e.g. bad
address)
- testID
9 : tests that read fails gracefully on bad arguments (e.g. writing
back to a readonly part of virtual memory)
- testID
10: tests that stdin uses console
- testID
11: tests stdout
- Multiprogramming
Syscall Tests
Tests exec syscalls (exec, join, exit)
Test UserGrader2
- testID
0 : tests that your syscall exit finishes the thread of the process
immediately
- testID
1 : runs exec multiple times and checks each child gets unique PID
- testID
2 : tests your syscall join to a child
- testID
3 : tests exec with error arguments (e.g. bad file name)
- testID
4 : tests your syscall join to a non-child
- testID
5 : tests your syscall join to a child that caused unhandled exception
- testID
6 : tests that your exit syscall releases all resources
- testID
7 : tests that you support fragmentation in physical memory.
(e.g. if physical memory 10 pages, exec P1 4 pages big, exec P2 1 page
big, exec P3 4 pages big, P2 exits. then exec P4 2 pages big
should succeed)
- testID
8 : tests readVirtualMemory with an invalid range
- testID
9 : tests writeVirtualMemory with an invalid range
- testID
10 : tests readVirtualMemory small valid range, make sure read right
data
- testID
11 : tests writeVirtualMemory small valid range, make sure wrote right
data
- testID
12 : tests readVirtualMemory with a large valid range, make sure read
right data
- testID
13 : tests writeVirtualMemory with a large valid range, make sure wrote
right data