1AUTHOR = "Autotest Team <autotest@test.kernel.org>" 2TIME = "SHORT" 3NAME = "Sample - Parallel dd with kernel build - patch verification" 4TEST_TYPE = "client" 5TEST_CLASS = "Kernel" 6TEST_CATEGORY = "Functional" 7 8DOC = """ 9Parallel dd test with kernel build with the objective of seeing (or not) 10differences after a patch is applied to the mainline kernel. 11""" 12 13def tests(tag): 14 partition = job.partition('/tmp/looped', 1024, job.tmpdir) 15 # You can use also 'real' partitions, just comment the above and uncomment 16 # the below 17 #partition = job.partition('/dev/sdb1', job.tmpdir) 18 19 job.run_test('parallel_dd', fs=partition, fs_type='ext4', iterations=1, 20 megabytes=1000, streams=2, tag=tag) 21 22 23def step_init(): 24 testkernel = job.kernel('/usr/src/linux-2.6.36.tar.bz2') 25 testkernel.config('/usr/src/config') 26 testkernel.build() 27 job.next_step([step_one]) 28 testkernel.boot() 29 30 31def step_one(): 32 tests('mainline') 33 testkernel = job.kernel('/usr/src/linux-2.6.36.tar.bz2') 34 testkernel.patch('/usr/src/ext4_patch') 35 testkernel.config('/usr/src/config') 36 testkernel.build() 37 job.next_step([step_two]) 38 testkernel.boot() 39 40 41def step_two(): 42 tests('post_patch') 43