aboutsummaryrefslogtreecommitdiff
path: root/tests/tpm-tests.c
AgeCommit message (Collapse)AuthorFilesLines
2019-09-05tests/libqtest: Use libqtest-single.h in tests that require global_qtestThomas Huth1-1/+1
Tests that require global_qtest or the related wrapper functions now use the libqtest-single.h header that is dedicated for everything related to global_qtest. The core libqtest.c and libqtest.h files are now completely indepedent from global_qtest, so that the core library is now not depending on a global state anymore. Message-Id: <20190904130047.25808-7-thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-08tests/tpm-tests: Use g_test_skip() to mark skipped testsThomas Huth1-1/+1
Since we do not use gtester anymore (which had a bug here), we can now use g_test_skip() to mark skipped tests. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-Id: <20190424094557.28404-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-11-14tests: tpm: Use g_test_message rather than fprintfStefan Berger1-1/+1
Display a message during the test using g_test_message rather than fprintf. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
2018-10-30tests/tpm: Display if swtpm is not found or --tpm2 not supportedMarc-André Lureau1-12/+21
If swtpm is not found in $PATH or --tpm2 isn't supported, we display this in the test log. We cannot mark the test as skipped due to a bug in certain versions of the gtester environment that interprets a skipped test as failure. 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>
2018-06-06test: Pass TPM interface model to functions creating command lineStefan Berger1-5/+8
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>
2018-06-06test: Move common TPM test functions to tpm-tests.cStefan Berger1-0/+124
Move common TPM test functions from tpm-crb-swtpm-test.c to tpm-tests.c so that for example test cases with the TPM TIS interface can use the same code. Prefix all funcions with 'tpm_test_'. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>