Lines Matching +full:boot +full:- +full:serial +full:- +full:test
3 # Functional tests for the big-endian 32-bit MIPS Malta board
5 # Copyright (c) Philippe Mathieu-Daudé <f4bug@amsat.org>
7 # SPDX-License-Identifier: GPL-2.0-or-later
15 def mips_run_common_commands(test, prompt='#'): argument
16 exec_command_and_wait_for_pattern(test,
17 'uname -m',
19 exec_command_and_wait_for_pattern(test,
20 'grep XT-PIC /proc/interrupts',
22 wait_for_console_pattern(test, prompt)
23 exec_command_and_wait_for_pattern(test,
24 'grep XT-PIC /proc/interrupts',
25 'serial')
26 wait_for_console_pattern(test, prompt)
27 exec_command_and_wait_for_pattern(test,
28 'grep XT-PIC /proc/interrupts',
30 wait_for_console_pattern(test, prompt)
31 exec_command_and_wait_for_pattern(test,
32 'grep XT-PIC /proc/interrupts',
34 wait_for_console_pattern(test, prompt)
35 exec_command_and_wait_for_pattern(test,
38 wait_for_console_pattern(test, prompt)
39 exec_command_and_wait_for_pattern(test,
42 wait_for_console_pattern(test, prompt)
43 exec_command_and_wait_for_pattern(test,
45 ' : serial')
46 wait_for_console_pattern(test, prompt)
47 exec_command_and_wait_for_pattern(test,
50 wait_for_console_pattern(test, prompt)
52 def mips_check_wheezy(test, kernel_path, image_path, kernel_command_line, argument
54 test.require_netdev('user')
55 test.require_device(nic)
56 test.set_machine('malta')
59 test.vm.add_args('-kernel', kernel_path,
60 '-append', kernel_command_line,
61 '-drive', 'file=%s,snapshot=on' % image_path,
62 '-netdev', 'user,id=n1' +
64 ',hostfwd=tcp:127.0.0.1:0-:%d' % port,
65 '-device', f'{nic},netdev=n1',
66 '-no-reboot')
67 test.vm.set_console()
68 test.vm.launch()
70 wait_for_console_pattern(test, 'login: ', 'Oops')
71 exec_command_and_wait_for_pattern(test, 'root', 'Password:')
72 exec_command_and_wait_for_pattern(test, 'root', ':~# ')
73 mips_run_common_commands(test)
75 exec_command_and_wait_for_pattern(test, 'cd /', '# ')
76 test.check_http_download(dl_file, hsum, port,
77 pythoncmd='python -m SimpleHTTPServer')
79 exec_command_and_wait_for_pattern(test, 'cat /proc/cpuinfo', cpuinfo)
80 exec_command_and_wait_for_pattern(test, 'cat /proc/devices', 'usb')
81 exec_command_and_wait_for_pattern(test, 'cat /proc/ioports',
83 exec_command_and_wait_for_pattern(test, 'lspci -d 11ab:4620',
84 'GT-64120')
85 exec_command_and_wait_for_pattern(test,
86 'cat /sys/bus/i2c/devices/i2c-0/name',
88 exec_command_and_wait_for_pattern(test, 'cat /proc/mtd', 'YAMON')
90 exec_command_and_wait_for_pattern(test, 'md5sum /dev/mtd2ro',
98 '20130217T032700Z/pool/main/l/linux-2.6/'
99 'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb'),
105 member='boot/vmlinux-2.6.32-5-4kc-malta')
110 self.vm.add_args('-kernel', kernel_path,
111 '-append', kernel_command_line)
119 'linux-image-4.5.0-2-4kc-malta_4.5.5-1_mips.deb'),
123 ('https://github.com/groeck/linux-build-test/raw/'
135 member='boot/vmlinux-4.5.0-2-4kc-malta')
142 self.vm.add_args('-kernel', kernel_path,
143 '-initrd', initrd_path,
144 '-append', kernel_command_line,
145 '-netdev', 'user,id=n1,tftp=' + self.scratch_file('boot'),
146 '-device', 'pcnet,netdev=n1',
147 '-no-reboot')
149 self.wait_for_console_pattern('Boot successful.')
153 exec_command_and_wait_for_pattern(self, 'uname -a',
154 '4.5.0-2-4kc-malta #1 Debian')
164 'tftp -g -r vmlinux-4.5.0-2-4kc-malta 10.0.2.2', '#')
166 'md5sum vmlinux-4.5.0-2-4kc-malta',
176 'vmlinux-3.2.0-4-4kc-malta'),
191 dl_file='/boot/initrd.img-3.2.0-4-4kc-malta',