qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 19/26] tests/avocado: raspi2_initrd: Wait for guest shutdo


From: Thomas Huth
Subject: Re: [PATCH v3 19/26] tests/avocado: raspi2_initrd: Wait for guest shutdown message before stopping
Date: Thu, 27 Oct 2022 18:03:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 20/10/2022 13.52, Alex Bennée wrote:
From: Peter Maydell <peter.maydell@linaro.org>

The avocado test
  tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_initrd
finishes wiith

     exec_command(self, 'halt')
     # Wait for VM to shut down gracefully
     self.vm.wait()

In theory this should be fine. In practice it runs into two bugs:

  * when the test calls self.vm.wait() Avocado closes the socket
    connection to the guest serial console immediately, so the
    avocado logs don't have the last part of the guest output:
    https://gitlab.com/qemu-project/qemu/-/issues/1265
  * when the socket is closed, a bug in the QEMU socket chardev
    means that it loses any data that the guest UART has not
    yet consumed. This means that the guest doesn't always read
    the full 'halt' command string, so the test intermittently
    fails with a timeout:
    https://gitlab.com/qemu-project/qemu/-/issues/1264

Work around both of these by waiting for the guest to print the
string that means it has completed the shutdown process.  This fixes
a very long standing intermittent failure in this test.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/636
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221020102012.3015662-1-peter.maydell@linaro.org>

Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]