Lines Matching +full:boot +full:- +full:serial +full:- +full:test
2 * Test serial output of some machines.
7 * or later. See the COPYING file in the top-level directory.
9 * This test is used to check that the serial output of the firmware
10 * (that we provide for some machines) or some small mini-kernels that
18 #include "ppc-util.h"
34 0xff, 0xf3, 0xff, 0x53, /* b -16 # loop */
61 0xb8, 0x00, 0xff, 0xfc /* bri -4 loop */
69 0xfc, 0xff, 0x00, 0xb8 /* bri -4 loop */
78 0xff, 0xff, 0xff, 0xea, /* b -4 (loop) */
89 0xff, 0xff, 0xff, 0x17, /* b -4 (loop) */
149 const char *expect; /* Expected string in the serial output */
157 { "avr", "arduino-duemilanove", "", "T", sizeof(bios_avr), NULL, bios_avr },
158 { "avr", "arduino-mega-2560-v3", "", "T", sizeof(bios_avr), NULL, bios_avr},
159 { "ppc", "ppce500", "", "U-Boot" },
160 { "ppc", "40p", "-vga none -boot d", "Trying cd:," },
163 { "ppc", "sam460ex", "-m 256", "DRAM: 256 MiB" },
164 { "ppc64", "ppce500", "", "U-Boot" },
165 { "ppc64", "40p", "-m 192", "Memory: 192M" },
168 "-machine " PSERIES_DEFAULT_CAPABILITIES,
172 { "ppc64", "sam460ex", "-device pci-bridge,chassis_nr=2", "1b36 0001" },
173 { "i386", "isapc", "-cpu qemu32 -M graphics=off", "SeaBIOS" },
174 { "i386", "pc", "-M graphics=off", "SeaBIOS" },
175 { "i386", "q35", "-M graphics=off", "SeaBIOS" },
176 { "x86_64", "isapc", "-cpu qemu32 -M graphics=off", "SeaBIOS" },
177 { "x86_64", "q35", "-M graphics=off", "SeaBIOS" },
179 { "sparc", "SS-4", "", "MB86904" },
180 { "sparc", "SS-600MP", "", "TMS390Z55" },
182 { "s390x", "s390-ccw-virtio", "", "device" },
183 { "loongarch64", "virt", "-cpu max", "TT", sizeof(bios_loongarch64),
186 { "m68k", "next-cube", "", "TT", sizeof(bios_nextcube), 0, bios_nextcube },
187 { "microblaze", "petalogix-s3adsp1800", "", "TT",
189 { "microblazeel", "petalogix-ml605", "", "TT",
192 { "aarch64", "virt", "-cpu max", "TT", sizeof(kernel_aarch64),
201 static bool check_guest_output(QTestState *qts, const testdef_t *test, int fd) in check_guest_output() argument
207 /* Poll serial output... */ in check_guest_output()
211 if (ch == test->expect[pos]) { in check_guest_output()
213 if (test->expect[pos] == '\0') { in check_guest_output()
228 if (now - start >= 360) { in check_guest_output()
239 const testdef_t *test = data; in test_machine() local
247 ser_fd = g_file_open_tmp("qtest-boot-serial-sXXXXXX", &serialtmp, NULL); in test_machine()
248 g_assert(ser_fd != -1); in test_machine()
251 if (test->kernel) { in test_machine()
252 code = test->kernel; in test_machine()
253 codeparam = "-kernel"; in test_machine()
254 } else if (test->bios) { in test_machine()
255 code = test->bios; in test_machine()
256 codeparam = "-bios"; in test_machine()
263 code_fd = g_file_open_tmp("qtest-boot-serial-cXXXXXX", &codetmp, NULL); in test_machine()
264 g_assert(code_fd != -1); in test_machine()
265 wlen = write(code_fd, code, test->codesize); in test_machine()
266 g_assert(wlen == test->codesize); in test_machine()
271 * Make sure that this test uses tcg if available: It is used as a in test_machine()
272 * fast-enough smoketest for that. in test_machine()
274 qts = qtest_initf("%s %s -M %s -no-shutdown " in test_machine()
275 "-chardev file,id=serial0,path=%s " in test_machine()
276 "-serial chardev:serial0 -accel tcg -accel kvm %s", in test_machine()
277 codeparam, code ? codetmp : "", test->machine, in test_machine()
278 serialtmp, test->extra); in test_machine()
284 g_assert(ser_fd != -1); in test_machine()
285 if (!check_guest_output(qts, test, ser_fd)) { in test_machine()
311 char *name = g_strdup_printf("boot-serial/%s", tests[i].machine); in main()