Define an accessor for the shm path. It will be referenced from multiple sites in a subsequent patch.
Signed-off-by: Steve Sistare <[email protected]> --- tests/qtest/migration/framework.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c index 9564293..9d04f36 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -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", -- 1.8.3.1
