summaryrefslogtreecommitdiff
path: root/tests/tpm-util.h
AgeCommit message (Collapse)AuthorFilesLines
2018-12-20Clean up includesMarkus Armbruster1-1/+0
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes, with the changes to the following files manually reverted: contrib/libvhost-user/libvhost-user-glib.h contrib/libvhost-user/libvhost-user.c contrib/libvhost-user/libvhost-user.h linux-user/mips64/cpu_loop.c linux-user/mips64/signal.c linux-user/sparc64/cpu_loop.c linux-user/sparc64/signal.c linux-user/x86_64/cpu_loop.c linux-user/x86_64/signal.c target/s390x/gen-features.c tests/migration/s390x/a-b-bios.c tests/test-rcu-simpleq.c tests/test-rcu-tailq.c Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181204172535.2799-1-armbru@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Halil Pasic <pasic@linux.ibm.com> Acked-by: Yuval Shaia <yuval.shaia@oracle.com> Acked-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
2018-10-30tests/tpm: Display if swtpm is not found or --tpm2 not supportedMarc-André Lureau1-0/+2
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: Add swtpm migration test for the TPM TIS interfaceStefan Berger1-0/+3
Add a test case for testing swtpm migration with the TPM TIS interface. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-06test: Pass TPM interface model to functions creating command lineStefan Berger1-1/+2
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 reusable code from tpm-crb-swtpm-test.c to tpm-util.cStefan Berger1-0/+10
Move code we can reuse from tpm-crb-swtpm-test.c into tpm-util.c and prefix functions with 'tpm_util_'. Remove some unnecessary #include's. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-05-25test: Add test cases that use the external swtpm with CRB interfaceStefan Berger1-0/+36
Add a test program for testing the CRB with the external swtpm. The 1st test case extends a PCR and reads back the value and compares it against an expected return packet. The 2nd test case repeats the 1st test case and then migrates the external swtpm's state along with the VM state to a destination QEMU and swtpm and checks that the PCR has the expected value now. The test cases require 'swtpm' to be installed on the system and in the PATH and 'swtpm' must support the --tpm2 option. If this is not the case, the test will be skipped. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>