[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables |
Date: |
Mon, 12 Jul 2021 18:26:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
+Markus
On 7/12/21 5:47 PM, Stefan Berger wrote:
>
> On 7/12/21 11:29 AM, Philippe Mathieu-Daudé wrote:
>> Hi Stefan,
>>
>> On 7/12/21 5:09 PM, Stefan Berger wrote:
>>> This series of patches adds test case for TPM 1.2 ACPI tables.
>>>
>>> Stefan
>>>
>>> v3:
>>> - Define enum TPMVersion for when CONFIG_TPM is not defined
>>> affected patches 2 and 6
>> I think in 11fb99e6f48..e542b71805d we missed an extra patch
>> for qtests. Probably (untested):
>
> Shouldn't we have seen test compilation errors already?
>
> I didn't go down this route for the build system (as you show below)
> because in this series we are testing ACPI tables and I introduce the
> reference to enum TPMVersion here, which wasn't needed before. The
> alternative may be to go into 8/9 and eliminate all TPM code if
> CONFIG_TPM is not set. The introduction of the enum now passes the tests
> with --enable-tpm and --disable-tpm.
>
> Otherwise the BIOS test are skipped due to this here:
>
>
> static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
> uint64_t base, enum TPMVersion tpm_version)
> {
> #ifdef CONFIG_TPM
> [...]
>
> #else
> g_test_skip("TPM disabled");
> #endif
> }
>
> So I didn't want to clutter this code with more #ifdef CONFIG_TPM but
> maybe that would be the right solution.
IMO the "right" solution is to check via QMP if TMP is supported
or not. This is now doable since commit caff255a546 ("tpm: Return
QMP error when TPM is disabled in build").
Long term we'd like to decouple the tests/ build from the various
QEMU configurations, and build the tests once.
>> -- >8 --
>> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
>> index ee7347b7275..eeaa0d7302b 100644
>> --- a/tests/qtest/meson.build
>> +++ b/tests/qtest/meson.build
>> @@ -60,10 +60,14 @@
>> (config_all_devices.has_key('CONFIG_USB_UHCI') and
>> \
>> config_all_devices.has_key('CONFIG_USB_EHCI') ?
>> ['usb-hcd-ehci-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ?
>> ['usb-hcd-xhci-test'] : []) + \
>> - (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-test'] :
>> []) + \
>> - (config_all_devices.has_key('CONFIG_TPM_CRB') ?
>> ['tpm-crb-swtpm-test'] : []) + \
>> - (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test']
>> : []) + \
>> - (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ?
>> ['tpm-tis-swtpm-test'] : []) + \
>> + (config_host.has_key('CONFIG_TPM') and \
>> + config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-test'] :
>> []) + \
>> + (config_host.has_key('CONFIG_TPM') and \
>> + config_all_devices.has_key('CONFIG_TPM_CRB') ?
>> ['tpm-crb-swtpm-test'] : []) + \
>> + (config_host.has_key('CONFIG_TPM') and \
>> + config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test']
>> : []) + \
>> + (config_host.has_key('CONFIG_TPM') and \
>> + config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ?
>> ['tpm-tis-swtpm-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test']
>> : []) + \
>> (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ?
>> ['fuzz-e1000e-test'] : []) + \
>> (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] :
>> []) + \
>> ---
>>
>> Cc'ing Paolo/Thomas because there surely exists a clever way to do it...
>>
>
- [PATCH v3 2/9] tests: Add tpm_version field to TPMTestState and fill it, (continued)
- [PATCH v3 2/9] tests: Add tpm_version field to TPMTestState and fill it, Stefan Berger, 2021/07/12
- [PATCH v3 4/9] tests: Add suffix 'tpm2' or 'tpm12' to ACPI table files, Stefan Berger, 2021/07/12
- [PATCH v3 6/9] tests: tpm: Create TPM 1.2 response in TPM emulator, Stefan Berger, 2021/07/12
- [PATCH v3 8/9] tests: acpi: Add test cases for TPM 1.2 with TCPA table, Stefan Berger, 2021/07/12
- [PATCH v3 7/9] tests: acpi: prepare for new TPM 1.2 related tables, Stefan Berger, 2021/07/12
- [PATCH v3 3/9] tests: acpi: Prepare for renaming of TPM2 related ACPI files, Stefan Berger, 2021/07/12
- [PATCH v3 5/9] tests: acpi: tpm2: Add the renamed ACPI files and drop old ones, Stefan Berger, 2021/07/12
- [PATCH v3 9/9] tests: acpi: tpm1.2: Add expected TPM 1.2 ACPI blobs, Stefan Berger, 2021/07/12
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Philippe Mathieu-Daudé, 2021/07/12
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Stefan Berger, 2021/07/12
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables,
Philippe Mathieu-Daudé <=
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Stefan Berger, 2021/07/12
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Markus Armbruster, 2021/07/14
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Philippe Mathieu-Daudé, 2021/07/14
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Markus Armbruster, 2021/07/15
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Igor Mammedov, 2021/07/19
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Markus Armbruster, 2021/07/19
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Philippe Mathieu-Daudé, 2021/07/19
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Igor Mammedov, 2021/07/19
- Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables, Markus Armbruster, 2021/07/19