xref: /qemu/tests/avocado/replay_kernel.py (revision 91e01270)
1# Record/replay test that boots a Linux kernel
2#
3# Copyright (c) 2020 ISP RAS
4#
5# Author:
6#  Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
7#
8# This work is licensed under the terms of the GNU GPL, version 2 or
9# later.  See the COPYING file in the top-level directory.
10
11import os
12import lzma
13import shutil
14import logging
15import time
16
17from avocado import skip
18from avocado import skipIf
19from avocado import skipUnless
20from avocado_qemu import wait_for_console_pattern
21from avocado.utils import archive
22from avocado.utils import process
23from boot_linux_console import LinuxKernelTest
24
25class ReplayKernelBase(LinuxKernelTest):
26    """
27    Boots a Linux kernel in record mode and checks that the console
28    is operational and the kernel command line is properly passed
29    from QEMU to the kernel.
30    Then replays the same scenario and verifies, that QEMU correctly
31    terminates.
32    """
33
34    timeout = 120
35    KERNEL_COMMON_COMMAND_LINE = 'printk.time=1 panic=-1 '
36
37    def run_vm(self, kernel_path, kernel_command_line, console_pattern,
38               record, shift, args, replay_path):
39        # icount requires TCG to be available
40        self.require_accelerator('tcg')
41
42        logger = logging.getLogger('replay')
43        start_time = time.time()
44        vm = self.get_vm()
45        vm.set_console()
46        if record:
47            logger.info('recording the execution...')
48            mode = 'record'
49        else:
50            logger.info('replaying the execution...')
51            mode = 'replay'
52        vm.add_args('-icount', 'shift=%s,rr=%s,rrfile=%s' %
53                    (shift, mode, replay_path),
54                    '-kernel', kernel_path,
55                    '-append', kernel_command_line,
56                    '-net', 'none',
57                    '-no-reboot')
58        if args:
59            vm.add_args(*args)
60        vm.launch()
61        self.wait_for_console_pattern(console_pattern, vm)
62        if record:
63            vm.shutdown()
64            logger.info('finished the recording with log size %s bytes'
65                        % os.path.getsize(replay_path))
66        else:
67            vm.wait()
68            logger.info('successfully finished the replay')
69        elapsed = time.time() - start_time
70        logger.info('elapsed time %.2f sec' % elapsed)
71        return elapsed
72
73    def run_rr(self, kernel_path, kernel_command_line, console_pattern,
74               shift=7, args=None):
75        replay_path = os.path.join(self.workdir, 'replay.bin')
76        t1 = self.run_vm(kernel_path, kernel_command_line, console_pattern,
77                         True, shift, args, replay_path)
78        t2 = self.run_vm(kernel_path, kernel_command_line, console_pattern,
79                         False, shift, args, replay_path)
80        logger = logging.getLogger('replay')
81        logger.info('replay overhead {:.2%}'.format(t2 / t1 - 1))
82
83class ReplayKernelNormal(ReplayKernelBase):
84    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
85    def test_x86_64_pc(self):
86        """
87        :avocado: tags=arch:x86_64
88        :avocado: tags=machine:pc
89        """
90        kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
91                      '/linux/releases/29/Everything/x86_64/os/images/pxeboot'
92                      '/vmlinuz')
93        kernel_hash = '23bebd2680757891cf7adedb033532163a792495'
94        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
95
96        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
97        console_pattern = 'VFS: Cannot open root device'
98
99        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
100
101    def test_mips_malta(self):
102        """
103        :avocado: tags=arch:mips
104        :avocado: tags=machine:malta
105        :avocado: tags=endian:big
106        """
107        deb_url = ('http://snapshot.debian.org/archive/debian/'
108                   '20130217T032700Z/pool/main/l/linux-2.6/'
109                   'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb')
110        deb_hash = 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04'
111        deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
112        kernel_path = self.extract_from_deb(deb_path,
113                                            '/boot/vmlinux-2.6.32-5-4kc-malta')
114        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
115        console_pattern = 'Kernel command line: %s' % kernel_command_line
116
117        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
118
119    def test_mips64el_malta(self):
120        """
121        This test requires the ar tool to extract "data.tar.gz" from
122        the Debian package.
123
124        The kernel can be rebuilt using this Debian kernel source [1] and
125        following the instructions on [2].
126
127        [1] http://snapshot.debian.org/package/linux-2.6/2.6.32-48/
128            #linux-source-2.6.32_2.6.32-48
129        [2] https://kernel-team.pages.debian.net/kernel-handbook/
130            ch-common-tasks.html#s-common-official
131
132        :avocado: tags=arch:mips64el
133        :avocado: tags=machine:malta
134        """
135        deb_url = ('http://snapshot.debian.org/archive/debian/'
136                   '20130217T032700Z/pool/main/l/linux-2.6/'
137                   'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb')
138        deb_hash = '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5'
139        deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
140        kernel_path = self.extract_from_deb(deb_path,
141                                            '/boot/vmlinux-2.6.32-5-5kc-malta')
142        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
143        console_pattern = 'Kernel command line: %s' % kernel_command_line
144        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
145
146    def test_aarch64_virt(self):
147        """
148        :avocado: tags=arch:aarch64
149        :avocado: tags=machine:virt
150        :avocado: tags=cpu:cortex-a53
151        """
152        kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
153                      '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
154                      '/vmlinuz')
155        kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493'
156        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
157
158        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
159                               'console=ttyAMA0')
160        console_pattern = 'VFS: Cannot open root device'
161
162        self.run_rr(kernel_path, kernel_command_line, console_pattern)
163
164    def test_arm_virt(self):
165        """
166        :avocado: tags=arch:arm
167        :avocado: tags=machine:virt
168        """
169        kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
170                      '/linux/releases/29/Everything/armhfp/os/images/pxeboot'
171                      '/vmlinuz')
172        kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4'
173        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
174
175        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
176                               'console=ttyAMA0')
177        console_pattern = 'VFS: Cannot open root device'
178
179        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1)
180
181    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
182    def test_arm_cubieboard_initrd(self):
183        """
184        :avocado: tags=arch:arm
185        :avocado: tags=machine:cubieboard
186        """
187        deb_url = ('https://apt.armbian.com/pool/main/l/'
188                   'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_armhf.deb')
189        deb_hash = '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0'
190        deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
191        kernel_path = self.extract_from_deb(deb_path,
192                                            '/boot/vmlinuz-5.10.16-sunxi')
193        dtb_path = '/usr/lib/linux-image-current-sunxi/sun4i-a10-cubieboard.dtb'
194        dtb_path = self.extract_from_deb(deb_path, dtb_path)
195        initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
196                      '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
197                      'arm/rootfs-armv5.cpio.gz')
198        initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b'
199        initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
200        initrd_path = os.path.join(self.workdir, 'rootfs.cpio')
201        archive.gzip_uncompress(initrd_path_gz, initrd_path)
202
203        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
204                               'console=ttyS0,115200 '
205                               'usbcore.nousb '
206                               'panic=-1 noreboot')
207        console_pattern = 'Boot successful.'
208        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1,
209                    args=('-dtb', dtb_path,
210                          '-initrd', initrd_path,
211                          '-no-reboot'))
212
213    def test_s390x_s390_ccw_virtio(self):
214        """
215        :avocado: tags=arch:s390x
216        :avocado: tags=machine:s390-ccw-virtio
217        """
218        kernel_url = ('https://archives.fedoraproject.org/pub/archive'
219                      '/fedora-secondary/releases/29/Everything/s390x/os/images'
220                      '/kernel.img')
221        kernel_hash = 'e8e8439103ef8053418ef062644ffd46a7919313'
222        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
223
224        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=sclp0'
225        console_pattern = 'Kernel command line: %s' % kernel_command_line
226        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=9)
227
228    def test_alpha_clipper(self):
229        """
230        :avocado: tags=arch:alpha
231        :avocado: tags=machine:clipper
232        """
233        kernel_url = ('http://archive.debian.org/debian/dists/lenny/main/'
234                      'installer-alpha/20090123lenny10/images/cdrom/vmlinuz')
235        kernel_hash = '3a943149335529e2ed3e74d0d787b85fb5671ba3'
236        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
237
238        uncompressed_kernel = archive.uncompress(kernel_path, self.workdir)
239
240        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
241        console_pattern = 'Kernel command line: %s' % kernel_command_line
242        self.run_rr(uncompressed_kernel, kernel_command_line, console_pattern, shift=9,
243            args=('-nodefaults', ))
244
245    def test_ppc64_pseries(self):
246        """
247        :avocado: tags=arch:ppc64
248        :avocado: tags=machine:pseries
249        :avocado: tags=accel:tcg
250        """
251        kernel_url = ('https://archives.fedoraproject.org/pub/archive'
252                      '/fedora-secondary/releases/29/Everything/ppc64le/os'
253                      '/ppc/ppc64/vmlinuz')
254        kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
255        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
256
257        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0'
258        console_pattern = 'VFS: Cannot open root device'
259        self.run_rr(kernel_path, kernel_command_line, console_pattern)
260
261    def test_ppc64_powernv(self):
262        """
263        :avocado: tags=arch:ppc64
264        :avocado: tags=machine:powernv
265        :avocado: tags=accel:tcg
266        """
267        kernel_url = ('https://archives.fedoraproject.org/pub/archive'
268                      '/fedora-secondary/releases/29/Everything/ppc64le/os'
269                      '/ppc/ppc64/vmlinuz')
270        kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
271        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
272
273        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + \
274                              'console=tty0 console=hvc0'
275        console_pattern = 'VFS: Cannot open root device'
276        self.run_rr(kernel_path, kernel_command_line, console_pattern)
277
278    def test_m68k_q800(self):
279        """
280        :avocado: tags=arch:m68k
281        :avocado: tags=machine:q800
282        """
283        deb_url = ('https://snapshot.debian.org/archive/debian-ports'
284                   '/20191021T083923Z/pool-m68k/main'
285                   '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.udeb')
286        deb_hash = '044954bb9be4160a3ce81f8bc1b5e856b75cccd1'
287        deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
288        kernel_path = self.extract_from_deb(deb_path,
289                                            '/boot/vmlinux-5.3.0-1-m68k')
290
291        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
292                               'console=ttyS0 vga=off')
293        console_pattern = 'No filesystem could mount root'
294        self.run_rr(kernel_path, kernel_command_line, console_pattern)
295
296    def do_test_advcal_2018(self, file_path, kernel_name, args=None):
297        archive.extract(file_path, self.workdir)
298
299        for entry in os.scandir(self.workdir):
300            if entry.name.startswith('day') and entry.is_dir():
301                kernel_path = os.path.join(entry.path, kernel_name)
302                break
303
304        kernel_command_line = ''
305        console_pattern = 'QEMU advent calendar'
306        self.run_rr(kernel_path, kernel_command_line, console_pattern,
307                    args=args)
308
309    def test_arm_vexpressa9(self):
310        """
311        :avocado: tags=arch:arm
312        :avocado: tags=machine:vexpress-a9
313        """
314        tar_hash = '32b7677ce8b6f1471fb0059865f451169934245b'
315        tar_url = ('https://qemu-advcal.gitlab.io'
316                   '/qac-best-of-multiarch/download/day16.tar.xz')
317        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
318        dtb_path = self.workdir + '/day16/vexpress-v2p-ca9.dtb'
319        self.do_test_advcal_2018(file_path, 'winter.zImage',
320                                 args=('-dtb', dtb_path))
321
322    def test_m68k_mcf5208evb(self):
323        """
324        :avocado: tags=arch:m68k
325        :avocado: tags=machine:mcf5208evb
326        """
327        tar_hash = 'ac688fd00561a2b6ce1359f9ff6aa2b98c9a570c'
328        tar_url = ('https://qemu-advcal.gitlab.io'
329                   '/qac-best-of-multiarch/download/day07.tar.xz')
330        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
331        self.do_test_advcal_2018(file_path, 'sanity-clause.elf')
332
333    @skip("Test currently broken") # Console stuck as of 5.2-rc1
334    def test_microblaze_s3adsp1800(self):
335        """
336        :avocado: tags=arch:microblaze
337        :avocado: tags=machine:petalogix-s3adsp1800
338        """
339        tar_hash = '08bf3e3bfb6b6c7ce1e54ab65d54e189f2caf13f'
340        tar_url = ('https://qemu-advcal.gitlab.io'
341                   '/qac-best-of-multiarch/download/day17.tar.xz')
342        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
343        self.do_test_advcal_2018(file_path, 'ballerina.bin')
344
345    def test_ppc64_e500(self):
346        """
347        :avocado: tags=arch:ppc64
348        :avocado: tags=machine:ppce500
349        :avocado: tags=cpu:e5500
350        """
351        tar_hash = '6951d86d644b302898da2fd701739c9406527fe1'
352        tar_url = ('https://qemu-advcal.gitlab.io'
353                   '/qac-best-of-multiarch/download/day19.tar.xz')
354        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
355        self.do_test_advcal_2018(file_path, 'uImage')
356
357    def test_or1k_sim(self):
358        """
359        :avocado: tags=arch:or1k
360        :avocado: tags=machine:or1k-sim
361        """
362        tar_hash = '20334cdaf386108c530ff0badaecc955693027dd'
363        tar_url = ('https://qemu-advcal.gitlab.io'
364                   '/qac-best-of-multiarch/download/day20.tar.xz')
365        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
366        self.do_test_advcal_2018(file_path, 'vmlinux')
367
368    @skip("nios2 emulation is buggy under record/replay")
369    def test_nios2_10m50(self):
370        """
371        :avocado: tags=arch:nios2
372        :avocado: tags=machine:10m50-ghrd
373        """
374        tar_hash = 'e4251141726c412ac0407c5a6bceefbbff018918'
375        tar_url = ('https://qemu-advcal.gitlab.io'
376                   '/qac-best-of-multiarch/download/day14.tar.xz')
377        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
378        self.do_test_advcal_2018(file_path, 'vmlinux.elf')
379
380    def test_ppc_g3beige(self):
381        """
382        :avocado: tags=arch:ppc
383        :avocado: tags=machine:g3beige
384        """
385        tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
386        tar_url = ('https://qemu-advcal.gitlab.io'
387                   '/qac-best-of-multiarch/download/day15.tar.xz')
388        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
389        self.do_test_advcal_2018(file_path, 'invaders.elf',
390                                 args=('-M', 'graphics=off'))
391
392    def test_ppc_mac99(self):
393        """
394        :avocado: tags=arch:ppc
395        :avocado: tags=machine:mac99
396        """
397        tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
398        tar_url = ('https://qemu-advcal.gitlab.io'
399                   '/qac-best-of-multiarch/download/day15.tar.xz')
400        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
401        self.do_test_advcal_2018(file_path, 'invaders.elf',
402                                 args=('-M', 'graphics=off'))
403
404    def test_sparc_ss20(self):
405        """
406        :avocado: tags=arch:sparc
407        :avocado: tags=machine:SS-20
408        """
409        tar_hash = 'b18550d5d61c7615d989a06edace051017726a9f'
410        tar_url = ('https://qemu-advcal.gitlab.io'
411                   '/qac-best-of-multiarch/download/day11.tar.xz')
412        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
413        self.do_test_advcal_2018(file_path, 'zImage.elf')
414
415    def test_xtensa_lx60(self):
416        """
417        :avocado: tags=arch:xtensa
418        :avocado: tags=machine:lx60
419        :avocado: tags=cpu:dc233c
420        """
421        tar_hash = '49e88d9933742f0164b60839886c9739cb7a0d34'
422        tar_url = ('https://qemu-advcal.gitlab.io'
423                   '/qac-best-of-multiarch/download/day02.tar.xz')
424        file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
425        self.do_test_advcal_2018(file_path, 'santas-sleigh-ride.elf')
426
427@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
428class ReplayKernelSlow(ReplayKernelBase):
429    # Override the timeout, because this kernel includes an inner
430    # loop which is executed with TB recompilings during replay,
431    # making it very slow.
432    timeout = 180
433
434    def test_mips_malta_cpio(self):
435        """
436        :avocado: tags=arch:mips
437        :avocado: tags=machine:malta
438        :avocado: tags=endian:big
439        :avocado: tags=slowness:high
440        """
441        deb_url = ('http://snapshot.debian.org/archive/debian/'
442                   '20160601T041800Z/pool/main/l/linux/'
443                   'linux-image-4.5.0-2-4kc-malta_4.5.5-1_mips.deb')
444        deb_hash = 'a3c84f3e88b54e06107d65a410d1d1e8e0f340f8'
445        deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
446        kernel_path = self.extract_from_deb(deb_path,
447                                            '/boot/vmlinux-4.5.0-2-4kc-malta')
448        initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
449                      '8584a59ed9e5eb5ee7ca91f6d74bbb06619205b8/rootfs/'
450                      'mips/rootfs.cpio.gz')
451        initrd_hash = 'bf806e17009360a866bf537f6de66590de349a99'
452        initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
453        initrd_path = self.workdir + "rootfs.cpio"
454        archive.gzip_uncompress(initrd_path_gz, initrd_path)
455
456        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
457                               'console=ttyS0 console=tty '
458                               'rdinit=/sbin/init noreboot')
459        console_pattern = 'Boot successful.'
460        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5,
461                    args=('-initrd', initrd_path))
462
463    @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code')
464    def test_mips64el_malta_5KEc_cpio(self):
465        """
466        :avocado: tags=arch:mips64el
467        :avocado: tags=machine:malta
468        :avocado: tags=endian:little
469        :avocado: tags=slowness:high
470        :avocado: tags=cpu:5KEc
471        """
472        kernel_url = ('https://github.com/philmd/qemu-testing-blob/'
473                      'raw/9ad2df38/mips/malta/mips64el/'
474                      'vmlinux-3.19.3.mtoman.20150408')
475        kernel_hash = '00d1d268fb9f7d8beda1de6bebcc46e884d71754'
476        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
477        initrd_url = ('https://github.com/groeck/linux-build-test/'
478                      'raw/8584a59e/rootfs/'
479                      'mipsel64/rootfs.mipsel64r1.cpio.gz')
480        initrd_hash = '1dbb8a396e916847325284dbe2151167'
481        initrd_path_gz = self.fetch_asset(initrd_url, algorithm='md5',
482                                          asset_hash=initrd_hash)
483        initrd_path = self.workdir + "rootfs.cpio"
484        archive.gzip_uncompress(initrd_path_gz, initrd_path)
485
486        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
487                               'console=ttyS0 console=tty '
488                               'rdinit=/sbin/init noreboot')
489        console_pattern = 'Boot successful.'
490        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5,
491                    args=('-initrd', initrd_path))
492
493    def do_test_mips_malta32el_nanomips(self, kernel_path_xz):
494        kernel_path = self.workdir + "kernel"
495        with lzma.open(kernel_path_xz, 'rb') as f_in:
496            with open(kernel_path, 'wb') as f_out:
497                shutil.copyfileobj(f_in, f_out)
498
499        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
500                               'mem=256m@@0x0 '
501                               'console=ttyS0')
502        console_pattern = 'Kernel command line: %s' % kernel_command_line
503        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
504
505    def test_mips_malta32el_nanomips_4k(self):
506        """
507        :avocado: tags=arch:mipsel
508        :avocado: tags=machine:malta
509        :avocado: tags=endian:little
510        :avocado: tags=cpu:I7200
511        """
512        kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
513                      'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
514                      'generic_nano32r6el_page4k.xz')
515        kernel_hash = '477456aafd2a0f1ddc9482727f20fe9575565dd6'
516        kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
517        self.do_test_mips_malta32el_nanomips(kernel_path_xz)
518
519    def test_mips_malta32el_nanomips_16k_up(self):
520        """
521        :avocado: tags=arch:mipsel
522        :avocado: tags=machine:malta
523        :avocado: tags=endian:little
524        :avocado: tags=cpu:I7200
525        """
526        kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
527                      'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
528                      'generic_nano32r6el_page16k_up.xz')
529        kernel_hash = 'e882868f944c71c816e832e2303b7874d044a7bc'
530        kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
531        self.do_test_mips_malta32el_nanomips(kernel_path_xz)
532
533    def test_mips_malta32el_nanomips_64k_dbg(self):
534        """
535        :avocado: tags=arch:mipsel
536        :avocado: tags=machine:malta
537        :avocado: tags=endian:little
538        :avocado: tags=cpu:I7200
539        """
540        kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
541                      'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
542                      'generic_nano32r6el_page64k_dbg.xz')
543        kernel_hash = '18d1c68f2e23429e266ca39ba5349ccd0aeb7180'
544        kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
545        self.do_test_mips_malta32el_nanomips(kernel_path_xz)
546