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