blob: c57961d4efeda9561a52abfd7a56c74b7879cf7f [file] [log] [blame]
Dale Curtis456d3c12011-07-19 11:42:51 -07001TIME="LONG"
2AUTHOR = "Cleber Rosa <cleber@redhat.com>"
Alexis Savery08b9b412017-10-30 16:25:25 -07003NAME = 'xfsFilesystemTestSuiteExt4Crypto'
Dale Curtis456d3c12011-07-19 11:42:51 -07004TEST_CLASS = 'kernel'
5TEST_CATEGORY = 'Functional'
6TEST_TYPE = 'client'
7DOC = """
8xfstests in autotest
9--------------------
10
Gwendal Grignou7a804942016-01-25 12:38:49 -080011This is a wrapper for running xfstests inside autotest.
Dale Curtis456d3c12011-07-19 11:42:51 -070012
Gwendal Grignou7a804942016-01-25 12:38:49 -080013The control file creates the files (1GB), mount with a loopback device.
14TODO(gwendal): currently the lists of xfstests tests is hardcoded.
15A better solution would be to specify the class of tests to run and
16reimplement the class parsing in python.
Dale Curtis456d3c12011-07-19 11:42:51 -070017
Dale Curtis456d3c12011-07-19 11:42:51 -070018"""
Alexis Savery08b9b412017-10-30 16:25:25 -070019from autotest_lib.client.bin import xfstest_util
Dale Curtis456d3c12011-07-19 11:42:51 -070020
Alexis Savery08b9b412017-10-30 16:25:25 -070021xfs_env = xfstest_util.xfstests_env()
22xfs_env.setup_partitions(job, fs_types=['ext4'], crypto=True)
Dale Curtis456d3c12011-07-19 11:42:51 -070023
24#
25# Adapt to the list of tests you want to run
26#
Gwendal Grignou7a804942016-01-25 12:38:49 -080027TEST_RANGE = {}
28TEST_RANGE['generic'] = ['%03i' % t for t in range(0, 360)]
29# Remove 347: crbug:616822
30TEST_RANGE['generic'].remove('347')
31TEST_RANGE['ext4'] = ['%03i' % t for t in range(0, 20)]
32TEST_RANGE['ext4'].append('271')
33TEST_RANGE['ext4'].extend(['%03i' % t for t in range(300, 310)])
34TEST_RANGE['shared'] = ['001', '002', '003', '006', '032', '051', '272',
35 '289', '298']
36
37# Fail to produce results, autotest hangs:
38TEST_RANGE['ext4'].remove('307')
39TEST_RANGE['generic'].remove('013')
40TEST_RANGE['generic'].remove('070')
41TEST_RANGE['generic'].remove('083')
42TEST_RANGE['generic'].remove('224')
43
44# Removed: SCRATCH_MNT/file-1073745920-falloc:
45# Start block 31042 not multiple of sunit 4
46TEST_RANGE['generic'].remove('223')
47
Dale Curtis456d3c12011-07-19 11:42:51 -070048#
Dale Curtis456d3c12011-07-19 11:42:51 -070049# Finally, run the tests
50#
Gwendal Grignou7a804942016-01-25 12:38:49 -080051try:
Alexis Savery08b9b412017-10-30 16:25:25 -070052 for fs_type in xfs_env.fs_types:
Gwendal Grignou7a804942016-01-25 12:38:49 -080053 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
59finally:
60 # Unmount the partition created
Alexis Savery08b9b412017-10-30 16:25:25 -070061 xfs_env.unmount_partitions()