[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 7/9] tests/qtest/migration: Define a machine for all archi
|
From: |
Juan Quintela |
|
Subject: |
Re: [PATCH v2 7/9] tests/qtest/migration: Define a machine for all architectures |
|
Date: |
Wed, 11 Oct 2023 16:28:41 +0200 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) |
Fabiano Rosas <farosas@suse.de> wrote:
> Stop relying on defaults and select a machine explicitly for every
> architecture.
>
> This is a prerequisite for being able to select machine types for
> migration using different QEMU binaries for source and destination.
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
> tests/qtest/migration-test.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> index 46f1c275a2..7c10ac925b 100644
> --- a/tests/qtest/migration-test.c
> +++ b/tests/qtest/migration-test.c
> @@ -746,6 +746,7 @@ static int test_migrate_start(QTestState **from,
> QTestState **to,
> const char *kvm_opts = NULL;
> const char *arch = qtest_get_arch();
> const char *memory_size;
> + const char *machine;
>
> if (args->use_shmem) {
> if (!g_file_test("/dev/shm", G_FILE_TEST_IS_DIR)) {
> @@ -758,11 +759,13 @@ static int test_migrate_start(QTestState **from,
> QTestState **to,
> got_dst_resume = false;
> if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
> memory_size = "150M";
> + machine = "pc";
I would suggest:
if (strcmp(arch, "i386")) {
machine = "pc";
} else {
machine = "q35";
}
New development is happening in q35, so I think this should be the more tested.
> @@ -774,10 +777,12 @@ static int test_migrate_start(QTestState **from,
> QTestState **to,
> "'nvramrc=hex .\" _\" begin %x %x "
> "do i c@ 1 + i c! 1000 +loop .\" B\" 0
> "
> "until'", end_address, start_address);
> + machine = "pseries";
> arch_opts = g_strdup("-nodefaults -machine vsmt=8");
> } else if (strcmp(arch, "aarch64") == 0) {
> memory_size = "150M";
> - arch_opts = g_strdup_printf("-machine virt,gic-version=max -cpu max "
> + machine = "virt";
> + arch_opts = g_strdup_printf("-machine gic-version=max -cpu max "
Does this double -machine command line works?
I expect yes, but who knows.
Later, Juan.
- [PATCH v2 5/9] tests/qtest: Introduce qtest_resolve_machine_alias, (continued)
- [PATCH v2 5/9] tests/qtest: Introduce qtest_resolve_machine_alias, Fabiano Rosas, 2023/10/06
- [PATCH v2 8/9] tests/qtest/migration: Support more than one QEMU binary, Fabiano Rosas, 2023/10/06
- [PATCH v2 6/9] tests/qtest/migration: Introduce find_common_machine_version, Fabiano Rosas, 2023/10/06
- [PATCH v2 7/9] tests/qtest/migration: Define a machine for all architectures, Fabiano Rosas, 2023/10/06
- Re: [PATCH v2 7/9] tests/qtest/migration: Define a machine for all architectures, Thomas Huth, 2023/10/11
- [PATCH v2 4/9] tests/qtest: Introduce qtest_has_machine_with_env, Fabiano Rosas, 2023/10/06
- [PATCH v2 9/9] tests/qtest: Don't print messages from query instances, Fabiano Rosas, 2023/10/06