Skip to main content.

Project 2 Test Cases

Short descriptions of Test Cases run by the AutoGrader for Project 2

  1. 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
    1. testID 0 : Creates a file, checks syscall creat works
    2. testID 1 : calls syscall creat/close/unlink and checks that they work
    3. testID 2 : tests if your syscall close actually closes the file
    4. testID 3 : tests if your syscall open fails gracefully when stubFileSystem's openfile limit's exceeded
    5. testID 4 : tests if all files get closed when process exits normally
    6. testID 5 : tests your syscall read by reading some bytes from a file
    7. testID 6 : tests that each of your processes's file descriptors are independent from other processes
    8. testID 7 : copies between files, tests creat, open, read, write, close
    9. testID 8 : tests that write fails gracefully on bad arguements (e.g. bad address)
    10. testID 9 : tests that read fails gracefully on bad arguments (e.g. writing back to a readonly part of virtual memory)
    11. testID 10: tests that stdin uses console
    12. testID 11: tests stdout
  2. Multiprogramming Syscall Tests
    Tests exec syscalls (exec, join, exit)
    Test UserGrader2
    1. testID 0 : tests that your syscall exit finishes the thread of the process immediately
    2. testID 1 : runs exec multiple times and checks each child gets unique PID
    3. testID 2 : tests your syscall join to a child
    4. testID 3 : tests exec with error arguments (e.g. bad file name)
    5. testID 4 : tests your syscall join to a non-child
    6. testID 5 : tests your syscall join to a child that caused unhandled exception
    7. testID 6 : tests that your exit syscall releases all resources
    8. 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)
    9. testID 8 : tests readVirtualMemory with an invalid range
    10. testID 9 : tests writeVirtualMemory with an invalid range
    11. testID 10 : tests readVirtualMemory small valid range, make sure read right data
    12. testID 11 : tests writeVirtualMemory small valid range, make sure wrote right data
    13. testID 12 : tests readVirtualMemory with a large valid range, make sure read right data
    14. testID 13 : tests writeVirtualMemory with a large valid range, make sure wrote right data
  3. Lottery Scheduler Tests
    Forks off some threads with different numbers of tickets and verifies that the lottery scheduler picks them with the right probabilities.
    The total number of tickets in the system is guaranteed not to exceed Integer.MAX_VALUE.
    Test ThreadGrader7 (no ticket transfers (priority donation))
    1. Tests Lottery Scheduler with a couple waiters in the queue
    2. Tests Lottery Scheduler with a few waiters in the queue
    3. Tests Lottery Scheduler with a many waiters in the queue
    Test ThreadGrader6a (with ticket transfers (priority donation))
    1. Small lottery scheduler test with priority donation
    2. Medium lottery scheduler test with priority donation
    3. Big lottery scheduler test with priority donation