From: Stefan Berger <stefanb@linux.ibm.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, marcandre.lureau@redhat.com
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables
Date: Mon, 12 Jul 2021 14:10:16 -0400 [thread overview]
Message-ID: <b18e33e6-b30d-1ffa-70c7-9f313a494486@linux.ibm.com> (raw)
In-Reply-To: <dd9e11e5-c39f-296b-e74a-4c66c8531500@redhat.com>
On 7/12/21 12:26 PM, Philippe Mathieu-Daudé wrote:
> +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").
That above g_test_skip() could be moved to the top of the function and
be preceded by a QMP check for whether TPM is supported.
next prev parent reply other threads:[~2021-07-12 18:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 15:09 [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables Stefan Berger
2021-07-12 15:09 ` [PATCH v3 1/9] tests: Rename TestState to TPMTestState Stefan Berger
2021-07-12 15:09 ` [PATCH v3 2/9] tests: Add tpm_version field to TPMTestState and fill it Stefan Berger
2021-07-12 15:09 ` [PATCH v3 3/9] tests: acpi: Prepare for renaming of TPM2 related ACPI files Stefan Berger
2021-07-12 15:09 ` [PATCH v3 4/9] tests: Add suffix 'tpm2' or 'tpm12' to ACPI table files Stefan Berger
2021-07-12 15:09 ` [PATCH v3 5/9] tests: acpi: tpm2: Add the renamed ACPI files and drop old ones Stefan Berger
2021-07-12 15:09 ` [PATCH v3 6/9] tests: tpm: Create TPM 1.2 response in TPM emulator Stefan Berger
2021-07-12 15:09 ` [PATCH v3 7/9] tests: acpi: prepare for new TPM 1.2 related tables Stefan Berger
2021-07-12 15:09 ` [PATCH v3 8/9] tests: acpi: Add test cases for TPM 1.2 with TCPA table Stefan Berger
2021-07-12 15:09 ` [PATCH v3 9/9] tests: acpi: tpm1.2: Add expected TPM 1.2 ACPI blobs Stefan Berger
2021-07-12 15:29 ` [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables Philippe Mathieu-Daudé
2021-07-12 15:47 ` Stefan Berger
2021-07-12 16:26 ` Philippe Mathieu-Daudé
2021-07-12 18:10 ` Stefan Berger [this message]
2021-07-14 14:43 ` Markus Armbruster
2021-07-14 20:16 ` Philippe Mathieu-Daudé
2021-07-15 5:49 ` Markus Armbruster
2021-07-19 13:38 ` Igor Mammedov
2021-07-19 13:50 ` Markus Armbruster
2021-07-19 13:56 ` Philippe Mathieu-Daudé
2021-07-19 14:44 ` Igor Mammedov
2021-07-19 15:13 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b18e33e6-b30d-1ffa-70c7-9f313a494486@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).