mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
migration-test: shm path accessor
Define an accessor for the shm path. It will be referenced from multiple sites in a subsequent patch. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/qemu-devel/1759332851-370353-16-git-send-email-steven.sistare@oracle.com Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
committed by
Fabiano Rosas
parent
0a3aeedb39
commit
c454a8d254
@@ -255,6 +255,11 @@ static void migrate_start_set_capabilities(QTestState *from, QTestState *to,
|
||||
return;
|
||||
}
|
||||
|
||||
static char *test_shmem_path(void)
|
||||
{
|
||||
return g_strdup_printf("/dev/shm/qemu-%d", getpid());
|
||||
}
|
||||
|
||||
int migrate_start(QTestState **from, QTestState **to, const char *uri,
|
||||
MigrateStart *args)
|
||||
{
|
||||
@@ -342,7 +347,7 @@ int migrate_start(QTestState **from, QTestState **to, const char *uri,
|
||||
}
|
||||
|
||||
if (args->use_shmem) {
|
||||
shmem_path = g_strdup_printf("/dev/shm/qemu-%d", getpid());
|
||||
shmem_path = test_shmem_path();
|
||||
shmem_opts = g_strdup_printf(
|
||||
"-object memory-backend-file,id=mem0,size=%s"
|
||||
",mem-path=%s,share=on -numa node,memdev=mem0",
|
||||
|
||||
Reference in New Issue
Block a user