diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-10-03 17:21:28 +0400 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-10-25 12:46:47 -0400 |
commit | c1d99200dd3d7f73ebe13b32f12944d3e48a2cb9 (patch) | |
tree | dbdd3560a08e6f6a2d7e3955803c89d2103abc5e /tests/tpm-tests.c | |
parent | a4d710251fa5aa9ec26de4626f11c78500195d12 (diff) |
tests/tpm: fix tpm_util_swtpm_has_tpm2()
Using g_spawn_async_with_pipes() is more complicated than running the
sync version. The async version returns a file descriptor for stdout, which may
not be fully read. Sometime "--tpm2" will failed to be read, and will
cause the related test to be silently skipped.
Use g_spawn_sync() instead, simplifying the code and fixing the race.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'tests/tpm-tests.c')
0 files changed, 0 insertions, 0 deletions