acpi: ged: add x86 device variant.
[qemu/ar7.git] / tests / acceptance / boot_linux_console.py
blob4a366ce93e4c0c00dc708a635f87cbcff18ab041
1 # Functional test that boots a Linux kernel and checks the console
3 # Copyright (c) 2018 Red Hat, Inc.
5 # Author:
6 # Cleber Rosa <crosa@redhat.com>
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.
11 import os
12 import lzma
13 import gzip
14 import shutil
16 from avocado import skipUnless
17 from avocado_qemu import Test
18 from avocado_qemu import exec_command_and_wait_for_pattern
19 from avocado_qemu import interrupt_interactive_console_until_pattern
20 from avocado_qemu import wait_for_console_pattern
21 from avocado.utils import process
22 from avocado.utils import archive
23 from avocado.utils.path import find_command, CmdNotFoundError
25 P7ZIP_AVAILABLE = True
26 try:
27 find_command('7z')
28 except CmdNotFoundError:
29 P7ZIP_AVAILABLE = False
31 """
32 Round up to next power of 2
33 """
34 def pow2ceil(x):
35 return 1 if x == 0 else 2**(x - 1).bit_length()
37 """
38 Expand file size to next power of 2
39 """
40 def image_pow2ceil_expand(path):
41 size = os.path.getsize(path)
42 size_aligned = pow2ceil(size)
43 if size != size_aligned:
44 with open(path, 'ab+') as fd:
45 fd.truncate(size_aligned)
47 class LinuxKernelTest(Test):
48 KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
50 def wait_for_console_pattern(self, success_message, vm=None):
51 wait_for_console_pattern(self, success_message,
52 failure_message='Kernel panic - not syncing',
53 vm=vm)
55 def extract_from_deb(self, deb, path):
56 """
57 Extracts a file from a deb package into the test workdir
59 :param deb: path to the deb archive
60 :param path: path within the deb archive of the file to be extracted
61 :returns: path of the extracted file
62 """
63 cwd = os.getcwd()
64 os.chdir(self.workdir)
65 file_path = process.run("ar t %s" % deb).stdout_text.split()[2]
66 process.run("ar x %s %s" % (deb, file_path))
67 archive.extract(file_path, self.workdir)
68 os.chdir(cwd)
69 # Return complete path to extracted file. Because callers to
70 # extract_from_deb() specify 'path' with a leading slash, it is
71 # necessary to use os.path.relpath() as otherwise os.path.join()
72 # interprets it as an absolute path and drops the self.workdir part.
73 return os.path.normpath(os.path.join(self.workdir,
74 os.path.relpath(path, '/')))
76 def extract_from_rpm(self, rpm, path):
77 """
78 Extracts a file from an RPM package into the test workdir.
80 :param rpm: path to the rpm archive
81 :param path: path within the rpm archive of the file to be extracted
82 needs to be a relative path (starting with './') because
83 cpio(1), which is used to extract the file, expects that.
84 :returns: path of the extracted file
85 """
86 cwd = os.getcwd()
87 os.chdir(self.workdir)
88 process.run("rpm2cpio %s | cpio -id %s" % (rpm, path), shell=True)
89 os.chdir(cwd)
90 return os.path.normpath(os.path.join(self.workdir, path))
92 class BootLinuxConsole(LinuxKernelTest):
93 """
94 Boots a Linux kernel and checks that the console is operational and the
95 kernel command line is properly passed from QEMU to the kernel
96 """
97 timeout = 90
99 def test_x86_64_pc(self):
101 :avocado: tags=arch:x86_64
102 :avocado: tags=machine:pc
104 kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
105 '/linux/releases/29/Everything/x86_64/os/images/pxeboot'
106 '/vmlinuz')
107 kernel_hash = '23bebd2680757891cf7adedb033532163a792495'
108 kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
110 self.vm.set_console()
111 kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
112 self.vm.add_args('-kernel', kernel_path,
113 '-append', kernel_command_line)
114 self.vm.launch()
115 console_pattern = 'Kernel command line: %s' % kernel_command_line
116 self.wait_for_console_pattern(console_pattern)
118 def test_mips_malta(self):
120 :avocado: tags=arch:mips
121 :avocado: tags=machine:malta
122 :avocado: tags=endian:big
124 deb_url = ('http://snapshot.debian.org/archive/debian/'
125 '20130217T032700Z/pool/main/l/linux-2.6/'
126 'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb')
127 deb_hash = 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04'
128 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
129 kernel_path = self.extract_from_deb(deb_path,
130 '/boot/vmlinux-2.6.32-5-4kc-malta')
132 self.vm.set_console()
133 kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
134 self.vm.add_args('-kernel', kernel_path,
135 '-append', kernel_command_line)
136 self.vm.launch()
137 console_pattern = 'Kernel command line: %s' % kernel_command_line
138 self.wait_for_console_pattern(console_pattern)
140 def test_mips64el_malta(self):
142 This test requires the ar tool to extract "data.tar.gz" from
143 the Debian package.
145 The kernel can be rebuilt using this Debian kernel source [1] and
146 following the instructions on [2].
148 [1] http://snapshot.debian.org/package/linux-2.6/2.6.32-48/
149 #linux-source-2.6.32_2.6.32-48
150 [2] https://kernel-team.pages.debian.net/kernel-handbook/
151 ch-common-tasks.html#s-common-official
153 :avocado: tags=arch:mips64el
154 :avocado: tags=machine:malta
156 deb_url = ('http://snapshot.debian.org/archive/debian/'
157 '20130217T032700Z/pool/main/l/linux-2.6/'
158 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb')
159 deb_hash = '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5'
160 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
161 kernel_path = self.extract_from_deb(deb_path,
162 '/boot/vmlinux-2.6.32-5-5kc-malta')
164 self.vm.set_console()
165 kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
166 self.vm.add_args('-kernel', kernel_path,
167 '-append', kernel_command_line)
168 self.vm.launch()
169 console_pattern = 'Kernel command line: %s' % kernel_command_line
170 self.wait_for_console_pattern(console_pattern)
172 def test_mips_malta_cpio(self):
174 :avocado: tags=arch:mips
175 :avocado: tags=machine:malta
176 :avocado: tags=endian:big
178 deb_url = ('http://snapshot.debian.org/archive/debian/'
179 '20160601T041800Z/pool/main/l/linux/'
180 'linux-image-4.5.0-2-4kc-malta_4.5.5-1_mips.deb')
181 deb_hash = 'a3c84f3e88b54e06107d65a410d1d1e8e0f340f8'
182 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
183 kernel_path = self.extract_from_deb(deb_path,
184 '/boot/vmlinux-4.5.0-2-4kc-malta')
185 initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
186 '8584a59ed9e5eb5ee7ca91f6d74bbb06619205b8/rootfs/'
187 'mips/rootfs.cpio.gz')
188 initrd_hash = 'bf806e17009360a866bf537f6de66590de349a99'
189 initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
190 initrd_path = self.workdir + "rootfs.cpio"
191 archive.gzip_uncompress(initrd_path_gz, initrd_path)
193 self.vm.set_console()
194 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE
195 + 'console=ttyS0 console=tty '
196 + 'rdinit=/sbin/init noreboot')
197 self.vm.add_args('-kernel', kernel_path,
198 '-initrd', initrd_path,
199 '-append', kernel_command_line,
200 '-no-reboot')
201 self.vm.launch()
202 self.wait_for_console_pattern('Boot successful.')
204 exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
205 'BogoMIPS')
206 exec_command_and_wait_for_pattern(self, 'uname -a',
207 'Debian')
208 exec_command_and_wait_for_pattern(self, 'reboot',
209 'reboot: Restarting system')
210 # Wait for VM to shut down gracefully
211 self.vm.wait()
213 @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code')
214 def test_mips64el_malta_5KEc_cpio(self):
216 :avocado: tags=arch:mips64el
217 :avocado: tags=machine:malta
218 :avocado: tags=endian:little
220 kernel_url = ('https://github.com/philmd/qemu-testing-blob/'
221 'raw/9ad2df38/mips/malta/mips64el/'
222 'vmlinux-3.19.3.mtoman.20150408')
223 kernel_hash = '00d1d268fb9f7d8beda1de6bebcc46e884d71754'
224 kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
225 initrd_url = ('https://github.com/groeck/linux-build-test/'
226 'raw/8584a59e/rootfs/'
227 'mipsel64/rootfs.mipsel64r1.cpio.gz')
228 initrd_hash = '1dbb8a396e916847325284dbe2151167'
229 initrd_path_gz = self.fetch_asset(initrd_url, algorithm='md5',
230 asset_hash=initrd_hash)
231 initrd_path = self.workdir + "rootfs.cpio"
232 archive.gzip_uncompress(initrd_path_gz, initrd_path)
234 self.vm.set_console()
235 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE
236 + 'console=ttyS0 console=tty '
237 + 'rdinit=/sbin/init noreboot')
238 self.vm.add_args('-cpu', '5KEc',
239 '-kernel', kernel_path,
240 '-initrd', initrd_path,
241 '-append', kernel_command_line,
242 '-no-reboot')
243 self.vm.launch()
244 wait_for_console_pattern(self, 'Boot successful.')
246 exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
247 'MIPS 5KE')
248 exec_command_and_wait_for_pattern(self, 'uname -a',
249 '3.19.3.mtoman.20150408')
250 exec_command_and_wait_for_pattern(self, 'reboot',
251 'reboot: Restarting system')
252 # Wait for VM to shut down gracefully
253 self.vm.wait()
255 def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash):
256 kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
257 kernel_path = self.workdir + "kernel"
258 with lzma.open(kernel_path_xz, 'rb') as f_in:
259 with open(kernel_path, 'wb') as f_out:
260 shutil.copyfileobj(f_in, f_out)
262 self.vm.set_console()
263 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE
264 + 'mem=256m@@0x0 '
265 + 'console=ttyS0')
266 self.vm.add_args('-no-reboot',
267 '-cpu', 'I7200',
268 '-kernel', kernel_path,
269 '-append', kernel_command_line)
270 self.vm.launch()
271 console_pattern = 'Kernel command line: %s' % kernel_command_line
272 self.wait_for_console_pattern(console_pattern)
274 def test_mips_malta32el_nanomips_4k(self):
276 :avocado: tags=arch:mipsel
277 :avocado: tags=machine:malta
278 :avocado: tags=endian:little
280 kernel_url = ('https://mipsdistros.mips.com/LinuxDistro/nanomips/'
281 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
282 'generic_nano32r6el_page4k.xz')
283 kernel_hash = '477456aafd2a0f1ddc9482727f20fe9575565dd6'
284 self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash)
286 def test_mips_malta32el_nanomips_16k_up(self):
288 :avocado: tags=arch:mipsel
289 :avocado: tags=machine:malta
290 :avocado: tags=endian:little
292 kernel_url = ('https://mipsdistros.mips.com/LinuxDistro/nanomips/'
293 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
294 'generic_nano32r6el_page16k_up.xz')
295 kernel_hash = 'e882868f944c71c816e832e2303b7874d044a7bc'
296 self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash)
298 def test_mips_malta32el_nanomips_64k_dbg(self):
300 :avocado: tags=arch:mipsel
301 :avocado: tags=machine:malta
302 :avocado: tags=endian:little
304 kernel_url = ('https://mipsdistros.mips.com/LinuxDistro/nanomips/'
305 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
306 'generic_nano32r6el_page64k_dbg.xz')
307 kernel_hash = '18d1c68f2e23429e266ca39ba5349ccd0aeb7180'
308 self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash)
310 def test_aarch64_virt(self):
312 :avocado: tags=arch:aarch64
313 :avocado: tags=machine:virt
315 kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
316 '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
317 '/vmlinuz')
318 kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493'
319 kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
321 self.vm.set_console()
322 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
323 'console=ttyAMA0')
324 self.vm.add_args('-cpu', 'cortex-a53',
325 '-kernel', kernel_path,
326 '-append', kernel_command_line)
327 self.vm.launch()
328 console_pattern = 'Kernel command line: %s' % kernel_command_line
329 self.wait_for_console_pattern(console_pattern)
331 def test_aarch64_xlnx_versal_virt(self):
333 :avocado: tags=arch:aarch64
334 :avocado: tags=machine:xlnx-versal-virt
335 :avocado: tags=device:pl011
336 :avocado: tags=device:arm_gicv3
338 images_url = ('http://ports.ubuntu.com/ubuntu-ports/dists/'
339 'bionic-updates/main/installer-arm64/'
340 '20101020ubuntu543.15/images/')
341 kernel_url = images_url + 'netboot/ubuntu-installer/arm64/linux'
342 kernel_hash = '5bfc54cf7ed8157d93f6e5b0241e727b6dc22c50'
343 kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
345 initrd_url = images_url + 'netboot/ubuntu-installer/arm64/initrd.gz'
346 initrd_hash = 'd385d3e88d53e2004c5d43cbe668b458a094f772'
347 initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
349 self.vm.set_console()
350 self.vm.add_args('-m', '2G',
351 '-kernel', kernel_path,
352 '-initrd', initrd_path)
353 self.vm.launch()
354 self.wait_for_console_pattern('Checked W+X mappings: passed')
356 def test_arm_virt(self):
358 :avocado: tags=arch:arm
359 :avocado: tags=machine:virt
361 kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
362 '/linux/releases/29/Everything/armhfp/os/images/pxeboot'
363 '/vmlinuz')
364 kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4'
365 kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
367 self.vm.set_console()
368 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
369 'console=ttyAMA0')
370 self.vm.add_args('-kernel', kernel_path,
371 '-append', kernel_command_line)
372 self.vm.launch()
373 console_pattern = 'Kernel command line: %s' % kernel_command_line
374 self.wait_for_console_pattern(console_pattern)
376 def test_arm_emcraft_sf2(self):
378 :avocado: tags=arch:arm
379 :avocado: tags=machine:emcraft-sf2
380 :avocado: tags=endian:little
381 :avocado: tags=u-boot
383 uboot_url = ('https://raw.githubusercontent.com/'
384 'Subbaraya-Sundeep/qemu-test-binaries/'
385 'fe371d32e50ca682391e1e70ab98c2942aeffb01/u-boot')
386 uboot_hash = 'cbb8cbab970f594bf6523b9855be209c08374ae2'
387 uboot_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash)
388 spi_url = ('https://raw.githubusercontent.com/'
389 'Subbaraya-Sundeep/qemu-test-binaries/'
390 'fe371d32e50ca682391e1e70ab98c2942aeffb01/spi.bin')
391 spi_hash = '65523a1835949b6f4553be96dec1b6a38fb05501'
392 spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash)
394 self.vm.set_console()
395 kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
396 self.vm.add_args('-kernel', uboot_path,
397 '-append', kernel_command_line,
398 '-drive', 'file=' + spi_path + ',if=mtd,format=raw',
399 '-no-reboot')
400 self.vm.launch()
401 self.wait_for_console_pattern('Enter \'help\' for a list')
403 exec_command_and_wait_for_pattern(self, 'ifconfig eth0 10.0.2.15',
404 'eth0: link becomes ready')
405 exec_command_and_wait_for_pattern(self, 'ping -c 3 10.0.2.2',
406 '3 packets transmitted, 3 packets received, 0% packet loss')
408 def do_test_arm_raspi2(self, uart_id):
410 The kernel can be rebuilt using the kernel source referenced
411 and following the instructions on the on:
412 https://www.raspberrypi.org/documentation/linux/kernel/building.md
414 serial_kernel_cmdline = {
415 0: 'earlycon=pl011,0x3f201000 console=ttyAMA0',
417 deb_url = ('http://archive.raspberrypi.org/debian/'
418 'pool/main/r/raspberrypi-firmware/'
419 'raspberrypi-kernel_1.20190215-1_armhf.deb')
420 deb_hash = 'cd284220b32128c5084037553db3c482426f3972'
421 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
422 kernel_path = self.extract_from_deb(deb_path, '/boot/kernel7.img')
423 dtb_path = self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-b.dtb')
425 self.vm.set_console()
426 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
427 serial_kernel_cmdline[uart_id] +
428 ' root=/dev/mmcblk0p2 rootwait ' +
429 'dwc_otg.fiq_fsm_enable=0')
430 self.vm.add_args('-kernel', kernel_path,
431 '-dtb', dtb_path,
432 '-append', kernel_command_line,
433 '-device', 'usb-kbd')
434 self.vm.launch()
435 console_pattern = 'Kernel command line: %s' % kernel_command_line
436 self.wait_for_console_pattern(console_pattern)
437 console_pattern = 'Product: QEMU USB Keyboard'
438 self.wait_for_console_pattern(console_pattern)
440 def test_arm_raspi2_uart0(self):
442 :avocado: tags=arch:arm
443 :avocado: tags=machine:raspi2
444 :avocado: tags=device:pl011
446 self.do_test_arm_raspi2(0)
448 def test_arm_exynos4210_initrd(self):
450 :avocado: tags=arch:arm
451 :avocado: tags=machine:smdkc210
453 deb_url = ('https://snapshot.debian.org/archive/debian/'
454 '20190928T224601Z/pool/main/l/linux/'
455 'linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf.deb')
456 deb_hash = 'fa9df4a0d38936cb50084838f2cb933f570d7d82'
457 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
458 kernel_path = self.extract_from_deb(deb_path,
459 '/boot/vmlinuz-4.19.0-6-armmp')
460 dtb_path = '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv310.dtb'
461 dtb_path = self.extract_from_deb(deb_path, dtb_path)
463 initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
464 '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
465 'arm/rootfs-armv5.cpio.gz')
466 initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b'
467 initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
468 initrd_path = os.path.join(self.workdir, 'rootfs.cpio')
469 archive.gzip_uncompress(initrd_path_gz, initrd_path)
471 self.vm.set_console()
472 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
473 'earlycon=exynos4210,0x13800000 earlyprintk ' +
474 'console=ttySAC0,115200n8 ' +
475 'random.trust_cpu=off cryptomgr.notests ' +
476 'cpuidle.off=1 panic=-1 noreboot')
478 self.vm.add_args('-kernel', kernel_path,
479 '-dtb', dtb_path,
480 '-initrd', initrd_path,
481 '-append', kernel_command_line,
482 '-no-reboot')
483 self.vm.launch()
485 self.wait_for_console_pattern('Boot successful.')
486 # TODO user command, for now the uart is stuck
488 def test_arm_cubieboard_initrd(self):
490 :avocado: tags=arch:arm
491 :avocado: tags=machine:cubieboard
493 deb_url = ('https://apt.armbian.com/pool/main/l/'
494 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
495 deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
496 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
497 kernel_path = self.extract_from_deb(deb_path,
498 '/boot/vmlinuz-4.20.7-sunxi')
499 dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'
500 dtb_path = self.extract_from_deb(deb_path, dtb_path)
501 initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
502 '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
503 'arm/rootfs-armv5.cpio.gz')
504 initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b'
505 initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
506 initrd_path = os.path.join(self.workdir, 'rootfs.cpio')
507 archive.gzip_uncompress(initrd_path_gz, initrd_path)
509 self.vm.set_console()
510 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
511 'console=ttyS0,115200 '
512 'usbcore.nousb '
513 'panic=-1 noreboot')
514 self.vm.add_args('-kernel', kernel_path,
515 '-dtb', dtb_path,
516 '-initrd', initrd_path,
517 '-append', kernel_command_line,
518 '-no-reboot')
519 self.vm.launch()
520 self.wait_for_console_pattern('Boot successful.')
522 exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
523 'Allwinner sun4i/sun5i')
524 exec_command_and_wait_for_pattern(self, 'cat /proc/iomem',
525 'system-control@1c00000')
526 # cubieboard's reboot is not functioning; omit reboot test.
528 def test_arm_cubieboard_sata(self):
530 :avocado: tags=arch:arm
531 :avocado: tags=machine:cubieboard
533 deb_url = ('https://apt.armbian.com/pool/main/l/'
534 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
535 deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
536 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
537 kernel_path = self.extract_from_deb(deb_path,
538 '/boot/vmlinuz-4.20.7-sunxi')
539 dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'
540 dtb_path = self.extract_from_deb(deb_path, dtb_path)
541 rootfs_url = ('https://github.com/groeck/linux-build-test/raw/'
542 '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
543 'arm/rootfs-armv5.ext2.gz')
544 rootfs_hash = '093e89d2b4d982234bf528bc9fb2f2f17a9d1f93'
545 rootfs_path_gz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash)
546 rootfs_path = os.path.join(self.workdir, 'rootfs.cpio')
547 archive.gzip_uncompress(rootfs_path_gz, rootfs_path)
549 self.vm.set_console()
550 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
551 'console=ttyS0,115200 '
552 'usbcore.nousb '
553 'root=/dev/sda ro '
554 'panic=-1 noreboot')
555 self.vm.add_args('-kernel', kernel_path,
556 '-dtb', dtb_path,
557 '-drive', 'if=none,format=raw,id=disk0,file='
558 + rootfs_path,
559 '-device', 'ide-hd,bus=ide.0,drive=disk0',
560 '-append', kernel_command_line,
561 '-no-reboot')
562 self.vm.launch()
563 self.wait_for_console_pattern('Boot successful.')
565 exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
566 'Allwinner sun4i/sun5i')
567 exec_command_and_wait_for_pattern(self, 'cat /proc/partitions',
568 'sda')
569 # cubieboard's reboot is not functioning; omit reboot test.
571 def test_arm_quanta_gsj(self):
573 :avocado: tags=arch:arm
574 :avocado: tags=machine:quanta-gsj
576 # 25 MiB compressed, 32 MiB uncompressed.
577 image_url = (
578 'https://github.com/hskinnemoen/openbmc/releases/download/'
579 '20200711-gsj-qemu-0/obmc-phosphor-image-gsj.static.mtd.gz')
580 image_hash = '14895e634923345cb5c8776037ff7876df96f6b1'
581 image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash)
582 image_name = 'obmc.mtd'
583 image_path = os.path.join(self.workdir, image_name)
584 archive.gzip_uncompress(image_path_gz, image_path)
586 self.vm.set_console()
587 drive_args = 'file=' + image_path + ',if=mtd,bus=0,unit=0'
588 self.vm.add_args('-drive', drive_args)
589 self.vm.launch()
591 # Disable drivers and services that stall for a long time during boot,
592 # to avoid running past the 90-second timeout. These may be removed
593 # as the corresponding device support is added.
594 kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + (
595 'console=${console} '
596 'mem=${mem} '
597 'initcall_blacklist=npcm_i2c_bus_driver_init '
598 'systemd.mask=systemd-random-seed.service '
599 'systemd.mask=dropbearkey.service '
602 self.wait_for_console_pattern('> BootBlock by Nuvoton')
603 self.wait_for_console_pattern('>Device: Poleg BMC NPCM730')
604 self.wait_for_console_pattern('>Skip DDR init.')
605 self.wait_for_console_pattern('U-Boot ')
606 interrupt_interactive_console_until_pattern(
607 self, 'Hit any key to stop autoboot:', 'U-Boot>')
608 exec_command_and_wait_for_pattern(
609 self, "setenv bootargs ${bootargs} " + kernel_command_line,
610 'U-Boot>')
611 exec_command_and_wait_for_pattern(
612 self, 'run romboot', 'Booting Kernel from flash')
613 self.wait_for_console_pattern('Booting Linux on physical CPU 0x0')
614 self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0')
615 self.wait_for_console_pattern('OpenBMC Project Reference Distro')
616 self.wait_for_console_pattern('gsj login:')
618 def test_arm_quanta_gsj_initrd(self):
620 :avocado: tags=arch:arm
621 :avocado: tags=machine:quanta-gsj
623 initrd_url = (
624 'https://github.com/hskinnemoen/openbmc/releases/download/'
625 '20200711-gsj-qemu-0/obmc-phosphor-initramfs-gsj.cpio.xz')
626 initrd_hash = '98fefe5d7e56727b1eb17d5c00311b1b5c945300'
627 initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
628 kernel_url = (
629 'https://github.com/hskinnemoen/openbmc/releases/download/'
630 '20200711-gsj-qemu-0/uImage-gsj.bin')
631 kernel_hash = 'fa67b2f141d56d39b3c54305c0e8a899c99eb2c7'
632 kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
633 dtb_url = (
634 'https://github.com/hskinnemoen/openbmc/releases/download/'
635 '20200711-gsj-qemu-0/nuvoton-npcm730-gsj.dtb')
636 dtb_hash = '18315f7006d7b688d8312d5c727eecd819aa36a4'
637 dtb_path = self.fetch_asset(dtb_url, asset_hash=dtb_hash)
639 self.vm.set_console()
640 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
641 'console=ttyS0,115200n8 '
642 'earlycon=uart8250,mmio32,0xf0001000')
643 self.vm.add_args('-kernel', kernel_path,
644 '-initrd', initrd_path,
645 '-dtb', dtb_path,
646 '-append', kernel_command_line)
647 self.vm.launch()
649 self.wait_for_console_pattern('Booting Linux on physical CPU 0x0')
650 self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0')
651 self.wait_for_console_pattern(
652 'Give root password for system maintenance')
654 def test_arm_orangepi(self):
656 :avocado: tags=arch:arm
657 :avocado: tags=machine:orangepi-pc
659 deb_url = ('https://apt.armbian.com/pool/main/l/'
660 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
661 deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
662 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
663 kernel_path = self.extract_from_deb(deb_path,
664 '/boot/vmlinuz-4.20.7-sunxi')
665 dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
666 dtb_path = self.extract_from_deb(deb_path, dtb_path)
668 self.vm.set_console()
669 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
670 'console=ttyS0,115200n8 '
671 'earlycon=uart,mmio32,0x1c28000')
672 self.vm.add_args('-kernel', kernel_path,
673 '-dtb', dtb_path,
674 '-append', kernel_command_line)
675 self.vm.launch()
676 console_pattern = 'Kernel command line: %s' % kernel_command_line
677 self.wait_for_console_pattern(console_pattern)
679 def test_arm_orangepi_initrd(self):
681 :avocado: tags=arch:arm
682 :avocado: tags=machine:orangepi-pc
684 deb_url = ('https://apt.armbian.com/pool/main/l/'
685 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
686 deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
687 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
688 kernel_path = self.extract_from_deb(deb_path,
689 '/boot/vmlinuz-4.20.7-sunxi')
690 dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
691 dtb_path = self.extract_from_deb(deb_path, dtb_path)
692 initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
693 '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
694 'arm/rootfs-armv7a.cpio.gz')
695 initrd_hash = '604b2e45cdf35045846b8bbfbf2129b1891bdc9c'
696 initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
697 initrd_path = os.path.join(self.workdir, 'rootfs.cpio')
698 archive.gzip_uncompress(initrd_path_gz, initrd_path)
700 self.vm.set_console()
701 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
702 'console=ttyS0,115200 '
703 'panic=-1 noreboot')
704 self.vm.add_args('-kernel', kernel_path,
705 '-dtb', dtb_path,
706 '-initrd', initrd_path,
707 '-append', kernel_command_line,
708 '-no-reboot')
709 self.vm.launch()
710 self.wait_for_console_pattern('Boot successful.')
712 exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
713 'Allwinner sun8i Family')
714 exec_command_and_wait_for_pattern(self, 'cat /proc/iomem',
715 'system-control@1c00000')
716 exec_command_and_wait_for_pattern(self, 'reboot',
717 'reboot: Restarting system')
718 # Wait for VM to shut down gracefully
719 self.vm.wait()
721 def test_arm_orangepi_sd(self):
723 :avocado: tags=arch:arm
724 :avocado: tags=machine:orangepi-pc
725 :avocado: tags=device:sd
727 deb_url = ('https://apt.armbian.com/pool/main/l/'
728 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
729 deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
730 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
731 kernel_path = self.extract_from_deb(deb_path,
732 '/boot/vmlinuz-4.20.7-sunxi')
733 dtb_path = '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
734 dtb_path = self.extract_from_deb(deb_path, dtb_path)
735 rootfs_url = ('http://storage.kernelci.org/images/rootfs/buildroot/'
736 'kci-2019.02/armel/base/rootfs.ext2.xz')
737 rootfs_hash = '692510cb625efda31640d1de0a8d60e26040f061'
738 rootfs_path_xz = self.fetch_asset(rootfs_url, asset_hash=rootfs_hash)
739 rootfs_path = os.path.join(self.workdir, 'rootfs.cpio')
740 archive.lzma_uncompress(rootfs_path_xz, rootfs_path)
741 image_pow2ceil_expand(rootfs_path)
743 self.vm.set_console()
744 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
745 'console=ttyS0,115200 '
746 'root=/dev/mmcblk0 rootwait rw '
747 'panic=-1 noreboot')
748 self.vm.add_args('-kernel', kernel_path,
749 '-dtb', dtb_path,
750 '-drive', 'file=' + rootfs_path + ',if=sd,format=raw',
751 '-append', kernel_command_line,
752 '-no-reboot')
753 self.vm.launch()
754 shell_ready = "/bin/sh: can't access tty; job control turned off"
755 self.wait_for_console_pattern(shell_ready)
757 exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
758 'Allwinner sun8i Family')
759 exec_command_and_wait_for_pattern(self, 'cat /proc/partitions',
760 'mmcblk0')
761 exec_command_and_wait_for_pattern(self, 'ifconfig eth0 up',
762 'eth0: Link is Up')
763 exec_command_and_wait_for_pattern(self, 'udhcpc eth0',
764 'udhcpc: lease of 10.0.2.15 obtained')
765 exec_command_and_wait_for_pattern(self, 'ping -c 3 10.0.2.2',
766 '3 packets transmitted, 3 packets received, 0% packet loss')
767 exec_command_and_wait_for_pattern(self, 'reboot',
768 'reboot: Restarting system')
769 # Wait for VM to shut down gracefully
770 self.vm.wait()
772 @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
773 @skipUnless(P7ZIP_AVAILABLE, '7z not installed')
774 def test_arm_orangepi_bionic(self):
776 :avocado: tags=arch:arm
777 :avocado: tags=machine:orangepi-pc
778 :avocado: tags=device:sd
781 # This test download a 196MB compressed image and expand it to 1GB
782 image_url = ('https://dl.armbian.com/orangepipc/archive/'
783 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z')
784 image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e'
785 image_path_7z = self.fetch_asset(image_url, asset_hash=image_hash)
786 image_name = 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.img'
787 image_path = os.path.join(self.workdir, image_name)
788 process.run("7z e -o%s %s" % (self.workdir, image_path_7z))
789 image_pow2ceil_expand(image_path)
791 self.vm.set_console()
792 self.vm.add_args('-drive', 'file=' + image_path + ',if=sd,format=raw',
793 '-nic', 'user',
794 '-no-reboot')
795 self.vm.launch()
797 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
798 'console=ttyS0,115200 '
799 'loglevel=7 '
800 'nosmp '
801 'systemd.default_timeout_start_sec=9000 '
802 'systemd.mask=armbian-zram-config.service '
803 'systemd.mask=armbian-ramlog.service')
805 self.wait_for_console_pattern('U-Boot SPL')
806 self.wait_for_console_pattern('Autoboot in ')
807 exec_command_and_wait_for_pattern(self, ' ', '=>')
808 exec_command_and_wait_for_pattern(self, "setenv extraargs '" +
809 kernel_command_line + "'", '=>')
810 exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel ...');
812 self.wait_for_console_pattern('systemd[1]: Set hostname ' +
813 'to <orangepipc>')
814 self.wait_for_console_pattern('Starting Load Kernel Modules...')
816 @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited')
817 def test_arm_orangepi_uboot_netbsd9(self):
819 :avocado: tags=arch:arm
820 :avocado: tags=machine:orangepi-pc
821 :avocado: tags=device:sd
823 # This test download a 304MB compressed image and expand it to 2GB
824 deb_url = ('http://snapshot.debian.org/archive/debian/'
825 '20200108T145233Z/pool/main/u/u-boot/'
826 'u-boot-sunxi_2020.01%2Bdfsg-1_armhf.deb')
827 deb_hash = 'f67f404a80753ca3d1258f13e38f2b060e13db99'
828 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
829 # We use the common OrangePi PC 'plus' build of U-Boot for our secondary
830 # program loader (SPL). We will then set the path to the more specific
831 # OrangePi "PC" device tree blob with 'setenv fdtfile' in U-Boot prompt,
832 # before to boot NetBSD.
833 uboot_path = '/usr/lib/u-boot/orangepi_plus/u-boot-sunxi-with-spl.bin'
834 uboot_path = self.extract_from_deb(deb_path, uboot_path)
835 image_url = ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.0/'
836 'evbarm-earmv7hf/binary/gzimg/armv7.img.gz')
837 image_hash = '2babb29d36d8360adcb39c09e31060945259917a'
838 image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash)
839 image_path = os.path.join(self.workdir, 'armv7.img')
840 archive.gzip_uncompress(image_path_gz, image_path)
841 image_pow2ceil_expand(image_path)
842 image_drive_args = 'if=sd,format=raw,snapshot=on,file=' + image_path
844 # dd if=u-boot-sunxi-with-spl.bin of=armv7.img bs=1K seek=8 conv=notrunc
845 with open(uboot_path, 'rb') as f_in:
846 with open(image_path, 'r+b') as f_out:
847 f_out.seek(8 * 1024)
848 shutil.copyfileobj(f_in, f_out)
850 self.vm.set_console()
851 self.vm.add_args('-nic', 'user',
852 '-drive', image_drive_args,
853 '-global', 'allwinner-rtc.base-year=2000',
854 '-no-reboot')
855 self.vm.launch()
856 wait_for_console_pattern(self, 'U-Boot 2020.01+dfsg-1')
857 interrupt_interactive_console_until_pattern(self,
858 'Hit any key to stop autoboot:',
859 'switch to partitions #0, OK')
861 exec_command_and_wait_for_pattern(self, '', '=>')
862 cmd = 'setenv bootargs root=ld0a'
863 exec_command_and_wait_for_pattern(self, cmd, '=>')
864 cmd = 'setenv kernel netbsd-GENERIC.ub'
865 exec_command_and_wait_for_pattern(self, cmd, '=>')
866 cmd = 'setenv fdtfile dtb/sun8i-h3-orangepi-pc.dtb'
867 exec_command_and_wait_for_pattern(self, cmd, '=>')
868 cmd = ("setenv bootcmd 'fatload mmc 0:1 ${kernel_addr_r} ${kernel}; "
869 "fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}; "
870 "fdt addr ${fdt_addr_r}; "
871 "bootm ${kernel_addr_r} - ${fdt_addr_r}'")
872 exec_command_and_wait_for_pattern(self, cmd, '=>')
874 exec_command_and_wait_for_pattern(self, 'boot',
875 'Booting kernel from Legacy Image')
876 wait_for_console_pattern(self, 'Starting kernel ...')
877 wait_for_console_pattern(self, 'NetBSD 9.0 (GENERIC)')
878 # Wait for user-space
879 wait_for_console_pattern(self, 'Starting root file system check')
881 def test_s390x_s390_ccw_virtio(self):
883 :avocado: tags=arch:s390x
884 :avocado: tags=machine:s390-ccw-virtio
886 kernel_url = ('https://archives.fedoraproject.org/pub/archive'
887 '/fedora-secondary/releases/29/Everything/s390x/os/images'
888 '/kernel.img')
889 kernel_hash = 'e8e8439103ef8053418ef062644ffd46a7919313'
890 kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
892 self.vm.set_console()
893 kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=sclp0'
894 self.vm.add_args('-nodefaults',
895 '-kernel', kernel_path,
896 '-append', kernel_command_line)
897 self.vm.launch()
898 console_pattern = 'Kernel command line: %s' % kernel_command_line
899 self.wait_for_console_pattern(console_pattern)
901 def test_alpha_clipper(self):
903 :avocado: tags=arch:alpha
904 :avocado: tags=machine:clipper
906 kernel_url = ('http://archive.debian.org/debian/dists/lenny/main/'
907 'installer-alpha/20090123lenny10/images/cdrom/vmlinuz')
908 kernel_hash = '3a943149335529e2ed3e74d0d787b85fb5671ba3'
909 kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
911 uncompressed_kernel = archive.uncompress(kernel_path, self.workdir)
913 self.vm.set_console()
914 kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
915 self.vm.add_args('-nodefaults',
916 '-kernel', uncompressed_kernel,
917 '-append', kernel_command_line)
918 self.vm.launch()
919 console_pattern = 'Kernel command line: %s' % kernel_command_line
920 self.wait_for_console_pattern(console_pattern)
922 def test_ppc64_pseries(self):
924 :avocado: tags=arch:ppc64
925 :avocado: tags=machine:pseries
927 kernel_url = ('https://archives.fedoraproject.org/pub/archive'
928 '/fedora-secondary/releases/29/Everything/ppc64le/os'
929 '/ppc/ppc64/vmlinuz')
930 kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
931 kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
933 self.vm.set_console()
934 kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0'
935 self.vm.add_args('-kernel', kernel_path,
936 '-append', kernel_command_line)
937 self.vm.launch()
938 console_pattern = 'Kernel command line: %s' % kernel_command_line
939 self.wait_for_console_pattern(console_pattern)
941 def test_m68k_q800(self):
943 :avocado: tags=arch:m68k
944 :avocado: tags=machine:q800
946 deb_url = ('https://snapshot.debian.org/archive/debian-ports'
947 '/20191021T083923Z/pool-m68k/main'
948 '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.udeb')
949 deb_hash = '044954bb9be4160a3ce81f8bc1b5e856b75cccd1'
950 deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
951 kernel_path = self.extract_from_deb(deb_path,
952 '/boot/vmlinux-5.3.0-1-m68k')
954 self.vm.set_console()
955 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
956 'console=ttyS0 vga=off')
957 self.vm.add_args('-kernel', kernel_path,
958 '-append', kernel_command_line)
959 self.vm.launch()
960 console_pattern = 'Kernel command line: %s' % kernel_command_line
961 self.wait_for_console_pattern(console_pattern)
962 console_pattern = 'No filesystem could mount root'
963 self.wait_for_console_pattern(console_pattern)
965 def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=0):
966 tar_url = ('https://www.qemu-advent-calendar.org'
967 '/2018/download/day' + day + '.tar.xz')
968 file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
969 archive.extract(file_path, self.workdir)
970 self.vm.set_console(console_index=console)
971 self.vm.add_args('-kernel',
972 self.workdir + '/day' + day + '/' + kernel_name)
973 self.vm.launch()
974 self.wait_for_console_pattern('QEMU advent calendar')
976 def test_arm_vexpressa9(self):
978 :avocado: tags=arch:arm
979 :avocado: tags=machine:vexpress-a9
981 tar_hash = '32b7677ce8b6f1471fb0059865f451169934245b'
982 self.vm.add_args('-dtb', self.workdir + '/day16/vexpress-v2p-ca9.dtb')
983 self.do_test_advcal_2018('16', tar_hash, 'winter.zImage')
985 def test_m68k_mcf5208evb(self):
987 :avocado: tags=arch:m68k
988 :avocado: tags=machine:mcf5208evb
990 tar_hash = 'ac688fd00561a2b6ce1359f9ff6aa2b98c9a570c'
991 self.do_test_advcal_2018('07', tar_hash, 'sanity-clause.elf')
993 def test_microblaze_s3adsp1800(self):
995 :avocado: tags=arch:microblaze
996 :avocado: tags=machine:petalogix-s3adsp1800
998 tar_hash = '08bf3e3bfb6b6c7ce1e54ab65d54e189f2caf13f'
999 self.do_test_advcal_2018('17', tar_hash, 'ballerina.bin')
1001 def test_or1k_sim(self):
1003 :avocado: tags=arch:or1k
1004 :avocado: tags=machine:or1k-sim
1006 tar_hash = '20334cdaf386108c530ff0badaecc955693027dd'
1007 self.do_test_advcal_2018('20', tar_hash, 'vmlinux')
1009 def test_nios2_10m50(self):
1011 :avocado: tags=arch:nios2
1012 :avocado: tags=machine:10m50-ghrd
1014 tar_hash = 'e4251141726c412ac0407c5a6bceefbbff018918'
1015 self.do_test_advcal_2018('14', tar_hash, 'vmlinux.elf')
1017 def test_ppc64_e500(self):
1019 :avocado: tags=arch:ppc64
1020 :avocado: tags=machine:ppce500
1022 tar_hash = '6951d86d644b302898da2fd701739c9406527fe1'
1023 self.vm.add_args('-cpu', 'e5500')
1024 self.do_test_advcal_2018('19', tar_hash, 'uImage')
1026 def test_ppc_g3beige(self):
1028 :avocado: tags=arch:ppc
1029 :avocado: tags=machine:g3beige
1031 tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
1032 self.vm.add_args('-M', 'graphics=off')
1033 self.do_test_advcal_2018('15', tar_hash, 'invaders.elf')
1035 def test_ppc_mac99(self):
1037 :avocado: tags=arch:ppc
1038 :avocado: tags=machine:mac99
1040 tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
1041 self.vm.add_args('-M', 'graphics=off')
1042 self.do_test_advcal_2018('15', tar_hash, 'invaders.elf')
1044 def test_sh4_r2d(self):
1046 :avocado: tags=arch:sh4
1047 :avocado: tags=machine:r2d
1049 tar_hash = 'fe06a4fd8ccbf2e27928d64472939d47829d4c7e'
1050 self.vm.add_args('-append', 'console=ttySC1')
1051 self.do_test_advcal_2018('09', tar_hash, 'zImage', console=1)
1053 def test_sparc_ss20(self):
1055 :avocado: tags=arch:sparc
1056 :avocado: tags=machine:SS-20
1058 tar_hash = 'b18550d5d61c7615d989a06edace051017726a9f'
1059 self.do_test_advcal_2018('11', tar_hash, 'zImage.elf')
1061 def test_xtensa_lx60(self):
1063 :avocado: tags=arch:xtensa
1064 :avocado: tags=machine:lx60
1066 tar_hash = '49e88d9933742f0164b60839886c9739cb7a0d34'
1067 self.vm.add_args('-cpu', 'dc233c')
1068 self.do_test_advcal_2018('02', tar_hash, 'santas-sleigh-ride.elf')