summaryrefslogtreecommitdiffstats
path: root/tests/qtest/tpm-emu.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: Use QMP to check whether a TPM device model is availableStefan Berger2021-08-311-0/+38
| | | | | | | | | Use QMP to check whether a given TPM device model is available and if it is not the case then do not register the tests that require it. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20210802215246.1433175-9-stefanb@linux.ibm.com
* tests: tpm: Create TPM 1.2 response in TPM emulatorStefan Berger2021-08-311-0/+5
| | | | | | Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Acked-by: Igor Mammedov <imammedo@redhat.com> Message-id: 20210802215246.1433175-7-stefanb@linux.ibm.com
* tests: Add tpm_version field to TPMTestState and fill itStefan Berger2021-08-311-3/+10
| | | | | | Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 20210802215246.1433175-3-stefanb@linux.ibm.com
* tests: Rename TestState to TPMTestStateStefan Berger2021-08-311-3/+3
| | | | | | Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 20210802215246.1433175-2-stefanb@linux.ibm.com
* tpm: Move backend code under the 'backends/' directoryPhilippe Mathieu-Daudé2020-06-191-1/+1
| | | | | | | | | | | | TPM subsytem is split into backends (see commit f4ede81eed2) and frontends (see i.e. 3676bc69b35). Keep the emulated hardware 'frontends' under hw/tpm/, but move the backends in the backends/tpm/ directory. Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200612085444.8362-13-philmd@redhat.com Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
* tests: tpm-emu: Remove assert on TPM2_ST_NO_SESSIONSEric Auger2020-06-091-1/+0Star
| | | | | | | | | | | | | | | | | | | | bios-tables-test executes SeaBIOS. Indeed FW is needed to fetch tables from QEMU and put them into the guest RAM. Also the FW patches cross table pointers. At some point, SeaBIOS ends up calling the TPM2_CC_HierarchyControl command with TPM2_ST_SESSIONS tag, most probably steming from tpm_set_failure/tpm20_hierarchycontrol SeaBIOS call path. This causes an assert() in the qtest tpm emulation code. As the goal here is not to boot SeaBIOS completely but just let it grab the ACPI tables and consolidate them, let's just remove the assert(). Signed-off-by: Eric Auger <eric.auger@redhat.com> Message-Id: <20200609125409.24179-4-eric.auger@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* test: Move qtests to a separate directoryThomas Huth2020-01-121-0/+183
The tests directory itself is pretty overcrowded, and it's hard to see which test belongs to which test subsystem (unit, qtest, ...). Let's move the qtests to a separate folder for more clarity. Message-Id: <20191218103059.11729-6-thuth@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>