diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-05-30 14:31:12 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-06-06 15:44:07 -0400 |
commit | ea71a3369164685d4daeeeac9dfe85a64eeeb877 (patch) | |
tree | 5e1296cc5caa3b4f10d1ce47609b7a0927bd735c /tests/tpm-util.c | |
parent | 2b4ccb87ec498184de50068f840eec7426d5da2a (diff) |
test: Pass TPM interface model to functions creating command line
Pass the TPM interface model, such as 'tpm-crb', through to the functions
that create the command line for QEMU.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'tests/tpm-util.c')
-rw-r--r-- | tests/tpm-util.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/tpm-util.c b/tests/tpm-util.c index e6e3b922fa..e1ac4d1bd5 100644 --- a/tests/tpm-util.c +++ b/tests/tpm-util.c @@ -248,25 +248,26 @@ void tpm_util_migration_start_qemu(QTestState **src_qemu, QTestState **dst_qemu, SocketAddress *src_tpm_addr, SocketAddress *dst_tpm_addr, - const char *miguri) + const char *miguri, + const char *ifmodel) { char *src_qemu_args, *dst_qemu_args; src_qemu_args = g_strdup_printf( "-chardev socket,id=chr,path=%s " "-tpmdev emulator,id=dev,chardev=chr " - "-device tpm-crb,tpmdev=dev ", - src_tpm_addr->u.q_unix.path); + "-device %s,tpmdev=dev ", + src_tpm_addr->u.q_unix.path, ifmodel); *src_qemu = qtest_init(src_qemu_args); dst_qemu_args = g_strdup_printf( "-chardev socket,id=chr,path=%s " "-tpmdev emulator,id=dev,chardev=chr " - "-device tpm-crb,tpmdev=dev " + "-device %s,tpmdev=dev " "-incoming %s", dst_tpm_addr->u.q_unix.path, - miguri); + ifmodel, miguri); *dst_qemu = qtest_init(dst_qemu_args); |