|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH] tests/boot-serial-test: Allow the HPPA machine to shudown |
Date: | Thu, 23 Jan 2020 22:37:13 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 1/23/20 7:29 PM, Philippe Mathieu-Daudé wrote:
On 1/23/20 5:39 AM, Thomas Huth wrote:On 23/01/2020 01.36, Philippe Mathieu-Daudé wrote:The boot-serial test uses SeaBIOS on HPPA, and expects to read the "SeaBIOS wants SYSTEM HALT" string, see [*]: 122 void __VISIBLE __noreturn hlt(void) 123 { 124 if (pdc_debug)125 printf("HALT initiated from %p\n", __builtin_return_address(0));126 printf("SeaBIOS wants SYSTEM HALT.\n\n"); 127 asm volatile("\t.word 0xfffdead0": : :"memory"); 128 while (1); 129 } A 'SYSTEM HALT' would really halts the CPU, but SeaBIOS implements it as an infinite loop. If SeaBIOS does not use the expected serial port but another device, we might poll the console indefinitely while the machine is halted. Allow the HPPA machine to 'shutdown'. When it does, we'll get a qtest error: $ make check-qtest-hppa TEST check-qtest-hppa: tests/qtest/boot-serial-test** (tests/qtest/boot-serial-test:31924): ERROR **: 01:12:37.604: Failed to find expected string. Please check '/tmp/qtest-boot-serial-sjxoM6Q' ERROR - Bail out! FATAL-ERROR: Failed to find expected string. Please check '/tmp/qtest-boot-serial-sjxoM6Q'make: *** [tests/Makefile.include:628: check-qtest-hppa] Error 1The tests are run with -no-shutdown. Why does qemu exit in that case?Because the HPPA firmware called HALT.Sounds like a bug in another place, and not in the boot-serial-test.Yes, the bug is elsewhere, but with the bug the boot-serial-test hangs forever.... No output on the console, qtest waiting indefinitely.
Richard explained me on IRC what you probably meant, which was not obvious to me at first.
Now I found in check_guest_output(): /* Poll serial output... */ while (1) { ... /* Wait at most 360 seconds. */ now = time(NULL); if (now - start >= 360) { break; } g_usleep(10000); } $ QTEST_QEMU_BINARY=hppa-softmmu/qemu-system-hppa \ time tests/qtest/boot-serial-test -k /hppa/boot-serial/hppa:** (tests/qtest/boot-serial-test:18604): ERROR **: 22:33:25.010: Failed to find expected string. Please check '/tmp/qtest-boot-serial-sZq7ljM'
Command terminated by signal 5 0.31user 0.66system 6:00.07elapsed 0%CPUIndeed the test fails after 6min, I guess I didn't expect that much while testing interactively.
So please disregard this patch. Thanks, Phil.
[Prev in Thread] | Current Thread | [Next in Thread] |