• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1AUTHOR = "Autotest Team <autotest@test.kernel.org>"
2TIME = "MEDIUM"
3NAME = "Sample - Kernel tests"
4TEST_TYPE = "client"
5TEST_CLASS = "Kernel"
6TEST_CATEGORY = "Functional"
7
8DOC = """
9Builds a test kernel, then runs a series of tests on it. This control file shows
10features such as:
11
12 * The step engine - autotest mechanism of executing jobs in steps, where you
13   can interrupt the flow of execution with client reboots, in order to boot
14   newly built kernels
15 * Downloading, configuring, patching, building and booting a kernel straight
16   from kernel.org.
17 * Kernel expand - provide a string such as '2.6.36-git13' and have autotest to
18   expand that and download the proper source tarballs and patches
19   automatically.
20 * Local kernel.org mirror - Alternate kernel.org mirror that you can set on
21   your control file.
22"""
23
24def step_init():
25    """
26    Build a kernel from kernel.org. This step will be executed, the machine
27    will be rebooted and then we'll proceed with step_tests.
28    """
29    job.next_step([step_tests])
30    # If you have a local/different kernel.org mirror, you can set it by
31    # uncommenting the below and set the URL properly.
32    #job.config_set('local_mirror', 'http://foo/bar')
33    testkernel = job.kernel('2.6.35')
34    # If you want to see kernel expansion in action, comment the above and
35    # uncomment the below. Keep in mind that after some months, it's expected
36    # that some of the patches might not exist, so you might want to edit
37    # this to satisfy your needs.
38    #testkernel = job.kernel('2.6.36-git13')
39    # You can provide a path to an uncompressed kernel source as well
40    #testkernel = job.kernel('/path/to/kernel-source')
41    testkernel.patch('http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.35.7.bz2')
42    # This is the default config that can be retrieved on gitweb
43    testkernel.config('http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.35.y.git;a=blob_plain;f=arch/x86/configs/x86_64_defconfig;h=6c86acd847a4e28c09d951b34d488b13d44df3c7;hb=ea8a52f9f4bcc3420c38ae07f8378a2f18443970')
44    testkernel.build()
45    testkernel.boot()
46
47
48def step_tests():
49    """
50    Run a series of autotest tests on this machine.
51    """
52    job.run_test('aiostress')
53    job.run_test('bonnie')
54    job.run_test('dbench')
55    job.run_test('fio')
56    job.run_test('fsx')
57    job.run_test('interbench')
58    job.run_test('isic')
59    job.run_test('kernbench', iterations=2, threads=5)
60    job.run_test('lmbench')
61    job.run_test('ltp')
62    job.run_test('reaim')
63    job.run_test('sparse')
64    job.run_test('stress')
65    job.run_test('tbench')
66    job.run_test('unixbench')
67