Project 5 Grading Criteria

1. p5test.exe (100 points)

Scoring of p5test.exe will be an average of four runs, each with different parameters. If p5test crashes, the score for that run is what you had at the crash point. Apart from the consistency test any files and directories p5test creates are Deleted immediately after each test.
Functionality Behavior Weightage
Format formats the IDE drive 1 to support GFS2 1
Mount mounts the GFS2 formated IDE drive 1 to /d 1
Open-Inexistent file Tries to open a non-existent file. Open should return -1 if file does not exist 1
Creat Opens, 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 and Deletes 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, Closes the file and Deletes it. Return values of successful Reads 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 Aberrant 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. Successful deletion is tested with Stat 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 and a file ("/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. Successful 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
Recursive Stat Creates many directories and calls Stat on them using the "." and ".." paths. If the directory does not exist Stat should return a negative value. 4
Delete Empty Directory Create an empty directory and attempt to delete it, Delete should return a non-negative number. 3
Delete Non-Empty Directory Create a non-empty directory and attempt to delete it, Delete should return -1. 2
Sync FS Sync should return a non-negative value. 1
10k Write/Reread Opens a file, Writes 10KB of data into it, Reads back the data and performs data check. 4
100k Write/Reread Opens a file, Writes 100KB of data into it, Reads back the data and performs data checks. 6
10k Write/Reread Reverse Opens a file Seeks to 10KB, Writes from the end to the beginning, Reads back the data and performs data checks. 4
100k Write/Reread Reverse Opens a file Seeks to 100KB, Writes from the end to the beginning, Reads back the data and performs data checks. 6
Big Directory Create_Directory /d/bigdir and creates 200 files in it. 7
Exhaust Disk Attempts to fill the disk by making as many files as possible, depending on the block size and disk size, in /d/exhaust. 7
House Is Clean? Checks to see if all test files have been removed. "." should be the only directory in the root directory. 2
TOTAL 100


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.

2. File System Persistence (10 points)

After running the p5test above, we'll write a few files to your disk, shut qemu down, and use a low-level tool to find the files in diskd.img.