]> git.ipfire.org Git - thirdparty/qemu.git/commit
tests: Wait for migration completion on destination QEMU to avoid failures
authorStefan Berger <stefanb@linux.ibm.com>
Wed, 16 Oct 2024 15:21:59 +0000 (11:21 -0400)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 10 Nov 2024 08:09:26 +0000 (11:09 +0300)
commit06f97633a65efa8ec44d38093e9e186bc3eba034
tree6808c9265a1b13d8566cd97ac8deb511e708b40a
parentfde43f4b8f30a44e1d73a4f2615cd5ea4c8db9af
tests: Wait for migration completion on destination QEMU to avoid failures

Rather than waiting for the completion of migration on the source side,
wait for it on the destination QEMU side to avoid accessing the TPM TIS
memory mapped registers before QEMU could restore their state. This
error condition could be triggered on busy systems where the destination
QEMU did not have enough time to restore the TIS state while the test case
was already reading its registers. The test case was for example reading
the STS register and received an unexpected value (0xffffffff), which
lead to a segmentation fault later on due to trying to read 0xffff bytes
from the TIS into a buffer.

Cc: <qemu-stable@nongnu.org>
Reported-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
(cherry picked from commit d9280ea3174700170d39c4cdd3f587f260757711)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tests/qtest/tpm-tests.c