migration-test: Create kvm_opts

So arch_dirty_ring option becomes one option like the others.

Reviewed-by: Peter Xu <peterx@redhat.com>
Message-ID: <20230608224943.3877-8-quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Juan Quintela 2023-06-09 00:49:08 +02:00
parent 36e9aab3c5
commit 71d3612401
1 changed files with 7 additions and 4 deletions

View File

@ -710,6 +710,7 @@ static int test_migrate_start(QTestState **from, QTestState **to,
g_autofree char *bootpath = NULL; g_autofree char *bootpath = NULL;
g_autofree char *shmem_opts = NULL; g_autofree char *shmem_opts = NULL;
g_autofree char *shmem_path = NULL; g_autofree char *shmem_path = NULL;
const char *kvm_opts = NULL;
const char *arch = qtest_get_arch(); const char *arch = qtest_get_arch();
const char *memory_size; const char *memory_size;
@ -785,13 +786,16 @@ static int test_migrate_start(QTestState **from, QTestState **to,
shmem_opts = g_strdup(""); shmem_opts = g_strdup("");
} }
if (args->use_dirty_ring) {
kvm_opts = ",dirty-ring-size=4096";
}
cmd_source = g_strdup_printf("-accel kvm%s -accel tcg " cmd_source = g_strdup_printf("-accel kvm%s -accel tcg "
"-name source,debug-threads=on " "-name source,debug-threads=on "
"-m %s " "-m %s "
"-serial file:%s/src_serial " "-serial file:%s/src_serial "
"%s %s %s %s %s", "%s %s %s %s %s",
args->use_dirty_ring ? kvm_opts ? kvm_opts : "",
",dirty-ring-size=4096" : "",
memory_size, tmpfs, memory_size, tmpfs,
arch_opts ? arch_opts : "", arch_opts ? arch_opts : "",
arch_source ? arch_source : "", arch_source ? arch_source : "",
@ -811,8 +815,7 @@ static int test_migrate_start(QTestState **from, QTestState **to,
"-serial file:%s/dest_serial " "-serial file:%s/dest_serial "
"-incoming %s " "-incoming %s "
"%s %s %s %s %s", "%s %s %s %s %s",
args->use_dirty_ring ? kvm_opts ? kvm_opts : "",
",dirty-ring-size=4096" : "",
memory_size, tmpfs, uri, memory_size, tmpfs, uri,
arch_opts ? arch_opts : "", arch_opts ? arch_opts : "",
arch_target ? arch_target : "", arch_target ? arch_target : "",