OLD | NEW |
1 # Uncomment this line, and replace the device with something sensible | 1 # Uncomment this line, and replace the device with something sensible |
2 # for you ... | 2 # for you ... |
3 # fs = job.partition('/dev/hda2', job.tmpdir) | 3 # fs = job.filesystem('/dev/hda2', job.tmpdir) |
4 # or ... | 4 # or ... |
5 | 5 |
6 part = job.partition('/tmp/looped', 1024, job.tmpdir) | 6 fs = job.filesystem('/tmp/looped', job.tmpdir, loop_size = 1024) |
7 | 7 |
8 # dbench 1024, ltp, 1024-byte blocksize, a few other things. Lots of fscking. | 8 # dbench 1024, ltp, 1024-byte blocksize, a few other things. Lots of fscking. |
9 # I haven't tested nobh mode yet, | 9 # I haven't tested nobh mode yet, |
10 # and I have yet to point run-bash-shared-mapping at it. | 10 # and I have yet to point run-bash-shared-mapping at it. |
11 # (different mount options for ext3) | 11 # (different mount options for ext3) |
12 | 12 |
13 def test_fs(): | 13 def test_fs(): |
14 » part.mkfs(fstype) | 14 » fs.mkfs(fstype) |
15 » part.mount() | 15 » fs.mount() |
16 try: | 16 try: |
17 » » job.run_test('fsx', dir=part.mountpoint, tag=fstype) | 17 » » job.run_test('fsx', dir=job.tmpdir, tag=fstype) |
18 » » job.run_test('iozone', dir=part.mountpoint, tag=fstype) | 18 » » job.run_test('iozone', dir=job.tmpdir, tag=fstype) |
19 » » job.run_test('dbench', dir=part.mountpoint, tag=fstype) | 19 » » job.run_test('dbench', dir=job.tmpdir, tag=fstype) |
20 finally: | 20 finally: |
21 » » part.unmount() | 21 » » fs.unmount() |
22 » » part.fsck() | 22 » » fs.fsck() |
23 | 23 |
24 for fstype in ('ext2', 'ext3', 'jfs', 'xfs', 'reiserfs'): | 24 for fstype in ('ext2', 'ext3', 'jfs', 'xfs', 'reiserfs'): |
25 job.run_group(test_fs) | 25 job.run_group(test_fs) |
OLD | NEW |