Dale Curtis | 456d3c1 | 2011-07-19 11:42:51 -0700 | [diff] [blame] | 1 | TIME="LONG" |
| 2 | AUTHOR = "Cleber Rosa <cleber@redhat.com>" |
Alexis Savery | 08b9b41 | 2017-10-30 16:25:25 -0700 | [diff] [blame] | 3 | NAME = 'xfsFilesystemTestSuiteExt4Crypto' |
Dale Curtis | 456d3c1 | 2011-07-19 11:42:51 -0700 | [diff] [blame] | 4 | TEST_CLASS = 'kernel' |
| 5 | TEST_CATEGORY = 'Functional' |
| 6 | TEST_TYPE = 'client' |
| 7 | DOC = """ |
| 8 | xfstests in autotest |
| 9 | -------------------- |
| 10 | |
Gwendal Grignou | 7a80494 | 2016-01-25 12:38:49 -0800 | [diff] [blame] | 11 | This is a wrapper for running xfstests inside autotest. |
Dale Curtis | 456d3c1 | 2011-07-19 11:42:51 -0700 | [diff] [blame] | 12 | |
Gwendal Grignou | 7a80494 | 2016-01-25 12:38:49 -0800 | [diff] [blame] | 13 | The control file creates the files (1GB), mount with a loopback device. |
| 14 | TODO(gwendal): currently the lists of xfstests tests is hardcoded. |
| 15 | A better solution would be to specify the class of tests to run and |
| 16 | reimplement the class parsing in python. |
Dale Curtis | 456d3c1 | 2011-07-19 11:42:51 -0700 | [diff] [blame] | 17 | |
Dale Curtis | 456d3c1 | 2011-07-19 11:42:51 -0700 | [diff] [blame] | 18 | """ |
Alexis Savery | 08b9b41 | 2017-10-30 16:25:25 -0700 | [diff] [blame] | 19 | from autotest_lib.client.bin import xfstest_util |
Dale Curtis | 456d3c1 | 2011-07-19 11:42:51 -0700 | [diff] [blame] | 20 | |
Alexis Savery | 08b9b41 | 2017-10-30 16:25:25 -0700 | [diff] [blame] | 21 | xfs_env = xfstest_util.xfstests_env() |
| 22 | xfs_env.setup_partitions(job, fs_types=['ext4'], crypto=True) |
Dale Curtis | 456d3c1 | 2011-07-19 11:42:51 -0700 | [diff] [blame] | 23 | |
| 24 | # |
| 25 | # Adapt to the list of tests you want to run |
| 26 | # |
Gwendal Grignou | 7a80494 | 2016-01-25 12:38:49 -0800 | [diff] [blame] | 27 | TEST_RANGE = {} |
| 28 | TEST_RANGE['generic'] = ['%03i' % t for t in range(0, 360)] |
| 29 | # Remove 347: crbug:616822 |
| 30 | TEST_RANGE['generic'].remove('347') |
| 31 | TEST_RANGE['ext4'] = ['%03i' % t for t in range(0, 20)] |
| 32 | TEST_RANGE['ext4'].append('271') |
| 33 | TEST_RANGE['ext4'].extend(['%03i' % t for t in range(300, 310)]) |
| 34 | TEST_RANGE['shared'] = ['001', '002', '003', '006', '032', '051', '272', |
| 35 | '289', '298'] |
| 36 | |
| 37 | # Fail to produce results, autotest hangs: |
| 38 | TEST_RANGE['ext4'].remove('307') |
| 39 | TEST_RANGE['generic'].remove('013') |
| 40 | TEST_RANGE['generic'].remove('070') |
| 41 | TEST_RANGE['generic'].remove('083') |
| 42 | TEST_RANGE['generic'].remove('224') |
| 43 | |
| 44 | # Removed: SCRATCH_MNT/file-1073745920-falloc: |
| 45 | # Start block 31042 not multiple of sunit 4 |
| 46 | TEST_RANGE['generic'].remove('223') |
| 47 | |
Dale Curtis | 456d3c1 | 2011-07-19 11:42:51 -0700 | [diff] [blame] | 48 | # |
Dale Curtis | 456d3c1 | 2011-07-19 11:42:51 -0700 | [diff] [blame] | 49 | # Finally, run the tests |
| 50 | # |
Gwendal Grignou | 7a80494 | 2016-01-25 12:38:49 -0800 | [diff] [blame] | 51 | try: |
Alexis Savery | 08b9b41 | 2017-10-30 16:25:25 -0700 | [diff] [blame] | 52 | for fs_type in xfs_env.fs_types: |
Gwendal Grignou | 7a80494 | 2016-01-25 12:38:49 -0800 | [diff] [blame] | 53 | for test_dir in [fs_type, 'generic', 'shared']: |
| 54 | for test in TEST_RANGE[test_dir]: |
| 55 | tag = '%s.%s' % (test_dir, test) |
| 56 | result = job.run_test_detail('xfstests', test_dir=test_dir, |
| 57 | test_number=test, tag=tag) |
| 58 | |
| 59 | finally: |
| 60 | # Unmount the partition created |
Alexis Savery | 08b9b41 | 2017-10-30 16:25:25 -0700 | [diff] [blame] | 61 | xfs_env.unmount_partitions() |