30.07.2013 Views

Development and Implementation of a File System for Gannet Virtual ...

Development and Implementation of a File System for Gannet Virtual ...

Development and Implementation of a File System for Gannet Virtual ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C. Testing<br />

TestCase00<br />

Creates, writes to, verifies <strong>and</strong> then deletes a 6000-byte file. This test fails if the<br />

write <strong>and</strong> read function calls fail. This test also fails if the data written to the file<br />

does not match the data read from the file.<br />

1. Reads a file named “testing.txt” from disk drive using C++ std library. The data is<br />

stored on a first buffer.<br />

2. Creates a file named “head-gfs.txt” on <strong>Gannet</strong>FS file system.<br />

3. Write the data from first buffer to “head-gfs.txt” file.<br />

4. Closes “head-gfs.txt” file.<br />

5. Reopens “head-gfs.txt” file.<br />

6. Reads the file <strong>and</strong> stores the data on second buffer.<br />

7. Verifies the first <strong>and</strong> second buffers using memcmp() function.<br />

8. Write the data from second buffer to disk drive named “buffout_big.txt” using<br />

C++ std library.<br />

9. Removes “head-gfs.txt” file from <strong>Gannet</strong>FS file system.<br />

10. Compares “testing.txt” with “buffout_big.txt” using diff function.<br />

TestCase01<br />

Creates, writes to, verifies, <strong>and</strong> then deletes a 2048-byte file. This test fails if the<br />

mkdir, write, or seek function calls fail. This test also fails if the data written to the<br />

file does not match the data read from the file.<br />

1. Reads a file named “testing.txt” from disk drive using C++ std library. The data is<br />

stored on a first buffer.<br />

2. Creates a directory named “/test-one”.<br />

3. Creates a file named “/test-one/test<strong>File</strong>-one” on <strong>Gannet</strong>FS file system.<br />

4. Write the data from first buffer to “/test-one/test<strong>File</strong>-one” file.<br />

5. Closes “/test-one/test<strong>File</strong>-one” file.<br />

6. Reopens “/test-one/test<strong>File</strong>-one” file.<br />

7. Reads the file <strong>and</strong> stores the data on second buffer.<br />

8. Verifies the first <strong>and</strong> second buffers using memcmp() function.<br />

9. Write the data from second buffer to disk drive named “buffout_big.txt” using<br />

C++ std library.<br />

10. Removes “/test-one/test<strong>File</strong>-one” file from <strong>Gannet</strong>FS file system.<br />

11. Removes directory named “/test-one”.<br />

68

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!