Skip to content

Commit

Permalink
Merge tag 'pull-for-7.1-fixes-230822-1' of https://github.com/stsquad…
Browse files Browse the repository at this point in the history
…/qemu into staging

Testing and doc updates:

  - default timeout for all QemuBaseTests is 120s
  - optimise migration tests to run faster
  - removed duplicate migration test
  - add some clarifying language to block options in manual

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmME8Q0ACgkQ+9DbCVqe
# KkQgfAf/eGjKO7tfxQqsyH63ckmxJPRkZ4XAmgUfA39G1a+RlDg/yQg//gBiLjWJ
# pH4hED2CWQklXw24AYe5JCjoOA5e3kG8eqVktns9mbkc+uSjfTqKTXl6v+y/ODxw
# LvaexedbuNWko1TL2Zm6g+YWIoAxj22clbTbLyBdwjnJBENS+47sA4h0ZVq76ThK
# kIeJOOvPE253lddtGiJWJPtCYfsWcyst03hgG0nUW8+uvbrtN1p1kdUX0EJOYjZf
# 6WoV2WJnFXB9jCp1I/PkoTGlZ+RxpxuRKKMkllpMe8rNwUk/qng1MX6fcu1a209M
# R8zK56YJ2HPM8pi4PI1RXB4vd201hQ==
# =21nJ
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 23 Aug 2022 08:23:57 AM PDT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-for-7.1-fixes-230822-1' of https://github.com/stsquad/qemu:
  qemu-options: try and clarify preferred block semantics
  tests/qtest/migration-test: Remove duplicated test_postcopy from the test plan
  tests/migration/i386: Speed up the i386 migration test (when using TCG)
  tests/migration/aarch64: Speed up the aarch64 migration test
  tests/qtest/migration-test: Only wait for serial output where migration succeeds
  tests/avocado: push default timeout to QemuBaseTest

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Aug 23, 2022
2 parents a8cc584 + 876ed1c commit 3be38a1
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 16 deletions.
13 changes: 13 additions & 0 deletions qemu-options.hx
Expand Up @@ -1105,6 +1105,19 @@ DEFHEADING()

DEFHEADING(Block device options:)

SRST
The QEMU block device handling options have a long history and
have gone through several iterations as the feature set and complexity
of the block layer have grown. Many online guides to QEMU often
reference older and deprecated options, which can lead to confusion.

The recommended modern way to describe disks is to use a combination of
``-device`` to specify the hardware device and ``-blockdev`` to
describe the backend. The device defines what the guest sees and the
backend describes how QEMU handles the data.

ERST

DEF("fda", HAS_ARG, QEMU_OPTION_fda,
"-fda/-fdb file use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
Expand Down
5 changes: 4 additions & 1 deletion tests/avocado/avocado_qemu/__init__.py
Expand Up @@ -227,6 +227,10 @@ def exec_command_and_wait_for_pattern(test, command,
_console_interaction(test, success_message, failure_message, command + '\r')

class QemuBaseTest(avocado.Test):

# default timeout for all tests, can be overridden
timeout = 120

def _get_unique_tag_val(self, tag_name):
"""
Gets a tag value, if unique for a key
Expand Down Expand Up @@ -512,7 +516,6 @@ class LinuxTest(LinuxSSHMixIn, QemuSystemTest):
to start with than the more vanilla `QemuSystemTest` class.
"""

timeout = 900
distro = None
username = 'root'
password = 'password'
Expand Down
3 changes: 1 addition & 2 deletions tests/migration/aarch64/a-b-kernel.S
Expand Up @@ -53,7 +53,6 @@ innerloop:
/* increment the first byte of each page by 1 */
ldrb w3, [x4]
add w3, w3, #1
and w3, w3, #0xff
strb w3, [x4]

/* make sure QEMU user space can see consistent data as MMU is off */
Expand All @@ -64,7 +63,7 @@ innerloop:
blt innerloop

add w5, w5, #1
and w5, w5, #0xff
and w5, w5, #0x1f
cmp w5, #0
bne mainloop

Expand Down
10 changes: 5 additions & 5 deletions tests/migration/aarch64/a-b-kernel.h
Expand Up @@ -10,9 +10,9 @@ unsigned char aarch64_kernel[] = {
0x03, 0x00, 0x80, 0x52, 0xe4, 0x03, 0x00, 0xaa, 0x83, 0x00, 0x00, 0x39,
0x84, 0x04, 0x40, 0x91, 0x9f, 0x00, 0x01, 0xeb, 0xad, 0xff, 0xff, 0x54,
0x05, 0x00, 0x80, 0x52, 0xe4, 0x03, 0x00, 0xaa, 0x83, 0x00, 0x40, 0x39,
0x63, 0x04, 0x00, 0x11, 0x63, 0x1c, 0x00, 0x12, 0x83, 0x00, 0x00, 0x39,
0x24, 0x7e, 0x0b, 0xd5, 0x84, 0x04, 0x40, 0x91, 0x9f, 0x00, 0x01, 0xeb,
0x2b, 0xff, 0xff, 0x54, 0xa5, 0x04, 0x00, 0x11, 0xa5, 0x1c, 0x00, 0x12,
0xbf, 0x00, 0x00, 0x71, 0x81, 0xfe, 0xff, 0x54, 0x43, 0x08, 0x80, 0x52,
0x43, 0x00, 0x00, 0x39, 0xf1, 0xff, 0xff, 0x17
0x63, 0x04, 0x00, 0x11, 0x83, 0x00, 0x00, 0x39, 0x24, 0x7e, 0x0b, 0xd5,
0x84, 0x04, 0x40, 0x91, 0x9f, 0x00, 0x01, 0xeb, 0x4b, 0xff, 0xff, 0x54,
0xa5, 0x04, 0x00, 0x11, 0xa5, 0x10, 0x00, 0x12, 0xbf, 0x00, 0x00, 0x71,
0xa1, 0xfe, 0xff, 0x54, 0x43, 0x08, 0x80, 0x52, 0x43, 0x00, 0x00, 0x39,
0xf2, 0xff, 0xff, 0x17
};
1 change: 1 addition & 0 deletions tests/migration/i386/a-b-bootblock.S
Expand Up @@ -50,6 +50,7 @@ innerloop:
jl innerloop

inc %bl
andb $0x3f,%bl
jnz mainloop

mov $66,%ax
Expand Down
12 changes: 6 additions & 6 deletions tests/migration/i386/a-b-bootblock.h
Expand Up @@ -4,17 +4,17 @@
* the header and the assembler differences in your patch submission.
*/
unsigned char x86_bootsect[] = {
0xfa, 0x0f, 0x01, 0x16, 0x74, 0x7c, 0x66, 0xb8, 0x01, 0x00, 0x00, 0x00,
0xfa, 0x0f, 0x01, 0x16, 0x78, 0x7c, 0x66, 0xb8, 0x01, 0x00, 0x00, 0x00,
0x0f, 0x22, 0xc0, 0x66, 0xea, 0x20, 0x7c, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x92, 0x0c, 0x02,
0xe6, 0x92, 0xb8, 0x10, 0x00, 0x00, 0x00, 0x8e, 0xd8, 0x66, 0xb8, 0x41,
0x00, 0x66, 0xba, 0xf8, 0x03, 0xee, 0xb3, 0x00, 0xb8, 0x00, 0x00, 0x10,
0x00, 0xfe, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x40,
0x06, 0x7c, 0xf2, 0xfe, 0xc3, 0x75, 0xe9, 0x66, 0xb8, 0x42, 0x00, 0x66,
0xba, 0xf8, 0x03, 0xee, 0xeb, 0xde, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x9a, 0xcf, 0x00,
0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00, 0x27, 0x00, 0x5c, 0x7c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x06, 0x7c, 0xf2, 0xfe, 0xc3, 0x80, 0xe3, 0x3f, 0x75, 0xe6, 0x66, 0xb8,
0x42, 0x00, 0x66, 0xba, 0xf8, 0x03, 0xee, 0xeb, 0xdb, 0x8d, 0x76, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
0x00, 0x9a, 0xcf, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x92, 0xcf, 0x00,
0x27, 0x00, 0x60, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand Down
5 changes: 3 additions & 2 deletions tests/qtest/migration-test.c
Expand Up @@ -1307,7 +1307,9 @@ static void test_precopy_common(MigrateCommon *args)
}

/* Wait for the first serial output from the source */
wait_for_serial("src_serial");
if (args->result == MIG_TEST_SUCCEED) {
wait_for_serial("src_serial");
}

if (!args->connect_uri) {
g_autofree char *local_connect_uri =
Expand Down Expand Up @@ -2459,7 +2461,6 @@ int main(int argc, char **argv)
module_call_init(MODULE_INIT_QOM);

if (has_uffd) {
qtest_add_func("/migration/postcopy/unix", test_postcopy);
qtest_add_func("/migration/postcopy/plain", test_postcopy);
qtest_add_func("/migration/postcopy/recovery/plain",
test_postcopy_recovery);
Expand Down

0 comments on commit 3be38a1

Please sign in to comment.