Project 5 Grading Criteria

  1. File Operations using /c/p5test.exe

    p5test.exe tests the following functionality.

    Functionality Behavior Weightage
    Format formats the IDE drive 1 to support GOSFS 3
    Mount mounts IDE drive 1 to /d 1
    Open-Inexistent file Tries to open an inexsitent file. Open should return -1 if file does not exist 1
    Creat Opens and Closes a new file. File descriptor returned by Open and return value of Close should be non-negative 2
    Creat-Long Filename Opens and Closes a file with a long name (~33 bytes). File descriptor returned by OPen and return value of Close should be non-negative 3
    Creat-Inexistent Path Tries to Open a non-existent path in a non-existent directory. Open must return -1 in this case 3
    Basic Read/Write Opens a file, Writes to it, Close it and then Openss it again, Reads from the file and finally Closes the file. Return values of successful Read and Writes should be non-negative 5
    Read from WriteOnly Creates and writes to a file and then attempts to Read in a file Opened with only O_WRITE set. Read must return -1 if file is opened in write only mode. 3
    Write to ReadOnly Creates and writes to a file and then attempts to Write in a file Opened with only O_READ set. Write must return -1 if file is opened in read only mode. 3
    Close Twice Opens a file, Closes it and then calls Close on the same file again. The final Close should return -1 in this case 3
    Close Illegal FD Calls Close on an invalid file descriptor. In this case, Close should return -1 1
    Basic Delete Creates a file and calls Delete on it. A successful Delete should return a non-negative number. 3
    Delete-Inexistent File Attempts to Delete a non-existent file. Delete on non-existent files must return -1 1
    Basic Create Directory Creates a single directory ("/d/dir1d"). Upon success, the return value of CreateDirectory should be non-negative 3
    Recursively Create Directory Creates nested directories ("/d/dir2d/dir3d"). Both directories should be created and return value for CreateDirectory must be non-negative. 5
    Create File in Recursively Created Directory Opens and Closes a file in the last directory created above. File descriptor returned by Open must be non-negative 3
    Basic Seek Opens a new file, Writes to it and calls Seek for two locations. Successful Seeks must return a non-negative number 2
    Seek w/ Reread Opens a new file, Writes to it, calls Seek for two locations and checks the data at those locations. 5
    Basic Stat Creates a new file and calls Stat on it. Succeful completion of a Stat call must return a non-negative number 2
    Stat-File Opens a file, Writes some data to it and calls Stat. Return value of Stat should be non-negative and the fileStat structure filled by Stat should have correct size. 2
    Stat-Directory Creates a directory and calls Stat on it. Return value of Stat should be non-negative and the fileStat structure filled by Stat should have the isDirectory field set 2
    Delete Empty Directory Calls CreateDirectory and then tries to Delete the directory created. Successful completion of Delete must return a non-negative value 3
    Delete Non-Empty Directory Calls CreateDirectory, creates a file in this directory and then tries to Delete that directory. Calling Delete on non-empty directories must fail and return -1. 2
    10k Write/Reread Opens a file, Writes 10KB of data into it, Reads back the data and performs data check. 5
    100k Write/Reread Opens a file, Writes 100KB of data into it, Reads back the data and performs data check. 7
    Read Entry Creates a directory with some children, then uses sequential Read_Entry, and Seek on a directory to check Read_Entry 4
    5 MB Write Opens and Writes 5MB of data into a file. This tests the implementation of the double indirect block. Successful Writes should return a non negative number 8
    TOTAL 85


    Executing p5test.exe will run through each of these. The ouput will be lines with the functionality listed in the first column, the output (PASSED/FAILED) and the score of the particular test. Correct implementation is worth 85 points.

  2. File Persistence using write.exe and cat.exe
    After running the p5test above, we'll shut Bochs down, start it again and run the persistence test as follows:

    At the shell prompt, typing:

     /c/write.exe 
    should output
    Formatting...
    Mounting...
    Mounted file system on drive 1 of type gosfs onto /d
    Writing...
    Wrote file /d/testWrite
    Sync...
    Done sync
    
    Then shutting down bochs, then running it again and typing:

     /c/mount.exe ide1 /d gosfs
     /c/cat.exe /d/testWrite 
    should output
    Hello.  If you see this your write works.
    
    Correct implementation is worth 15 points.


    Obviously, when grading, we will use the above programs but change names for files/directories (p5test.exe) and test string (write.exe/cat.exe)

    If you can not get some tests working you have the option of not testing them. With your submission include a TESTING file that says which tests in p5test.exe we should exclude. That comes in handy if one of the tests negatively affects the outcome of subsequent ones. The second test using write.exe/cat.exe will still be performed.