1AUTHOR = "Autotest Team <autotest@test.kernel.org>" 2TIME = "MEDIUM" 3NAME = "Sample - Filesystem tests with different filesystems" 4TEST_TYPE = "client" 5TEST_CLASS = "Kernel" 6TEST_CATEGORY = "Functional" 7 8DOC = """ 9Runs a series of filesystem tests on a loopback partition using different 10filesystem types. his shows some features of the job.partition method, such as 11creating loopback partitions instead of using real disk partitions, looping. 12""" 13 14partition = job.partition('/tmp/looped', 1024, job.tmpdir) 15# You can use also 'real' partitions, just comment the above and uncomment 16# the below 17#partition = job.partition('/dev/sdb1', job.tmpdir) 18 19def test_fs(): 20 partition.mkfs(fstype) 21 partition.mount() 22 try: 23 job.run_test('fsx', dir=partition.mountpoint, tag=fstype) 24 job.run_test('iozone', dir=partition.mountpoint, tag=fstype) 25 job.run_test('dbench', dir=partition.mountpoint, tag=fstype) 26 finally: 27 partition.unmount() 28 partition.fsck() 29 30 31for fstype in ('ext2', 'ext3', 'jfs', 'xfs', 'reiserfs'): 32 job.run_group(test_fs) 33