blob: e126c3c4dae735b0c688dcf900268947e4812f33 [file] [log] [blame]
Eric Lie0493a42010-11-15 13:05:43 -08001AUTHOR = "Autotest Team <autotest@test.kernel.org>"
2TIME = "MEDIUM"
3NAME = "Sample - Filesystem tests with different fs options"
4TEST_TYPE = "client"
5TEST_CLASS = "Kernel"
6TEST_CATEGORY = "Functional"
7
8DOC = """
9Runs a series of filesystem tests on a loopback partition. This shows some
10features of the job.partition method, such as creating loopback partitions
11instead of using real disk partitions, looping and tags.
12"""
13
14partition = job.partition(device='/tmp/looped', loop_size=1024,
15 mountpoint=job.tmpdir)
16# You can use also 'real' partitions, just comment the above and uncomment
17# the below
18#partition = job.partition('/dev/sdb1', job.tmpdir)
19
20iters = 10
21
22for fstype, mountopts, tag in (('ext2', '', 'ext2'),
23 ('ext3', '-o data=writeback', 'ext3writeback'),
24 ('ext3', '-o data=ordered', 'ext3ordered'),
25 ('ext3', '-o data=journal', 'ext3journal'),
26 ('ext4', '-o data=ordered', 'ext4ordered'),
27 ('ext4', '-o data=journal', 'ext4journal'),):
28 partition.mkfs(fstype)
29 partition.mount(args=mountopts)
30 try:
31 job.run_test('fsx', dir=job.tmpdir, tag=tag)
32 job.run_test('iozone', dir=job.tmpdir, iterations=iters, tag=tag)
33 job.run_test('dbench', iterations=iters, dir=job.tmpdir, tag=tag)
34 job.run_test('tiobench', dir=job.tmpdir, tag=tag)
35 finally:
36 partition.unmount()