1TIME="LONG" 2AUTHOR = "Cleber Rosa <cleber@redhat.com>" 3NAME = 'xfsFilesystemTestSuiteExt4Plain' 4TEST_CLASS = 'kernel' 5TEST_CATEGORY = 'Functional' 6TEST_TYPE = 'client' 7DOC = """ 8xfstests in autotest 9-------------------- 10 11This is a wrapper for running xfstests inside autotest. 12 13The 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. 17 18""" 19from autotest_lib.client.bin import xfstest_util 20 21xfs_env = xfstest_util.xfstests_env() 22xfs_env.setup_partitions(job, fs_types=['ext4']) 23 24# 25# Adapt to the list of tests you want to run 26# 27TEST_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 48# 49# Finally, run the tests 50# 51try: 52 for fs_type in xfs_env.fs_types: 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 59finally: 60 # Unmount the partition created 61 xfs_env.unmount_partitions()