# Uncomment this line, and replace the device with something sensible
# for you ...
# fs = job.filesystem('/dev/hda2', job.tmpdir)
# or ...

fs = job.filesystem('/tmp/looped', job.tmpdir, loop_size = 1024)

# dbench 1024, ltp, 1024-byte blocksize, a few other things.  Lots of fscking.
# I haven't tested nobh mode yet, 
# and I have yet to point run-bash-shared-mapping at it.
# (different mount options for ext3)

def test_fs():
	fs.mkfs(fstype)
	fs.mount()
	try:
		job.run_test('fsx', job.tmpdir, tag=fstype)
		job.run_test('iozone', job.tmpdir, tag=fstype)
		job.run_test('dbench', dir=job.tmpdir, tag=fstype)
	finally:
		fs.unmount()
		fs.fsck()

for fstype in ('ext2', 'ext3', 'jfs', 'xfs', 'reiserfs'):
	job.run_group(test_fs)
