From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Eric Auger" <eric.auger@redhat.com>,
eric.auger.pro@gmail.com, stefanb@linux.ibm.com,
qemu-devel@nongnu.org, qemu-arm@nongnu.org,
peter.maydell@linaro.org, mst@redhat.com, imammedo@redhat.com
Subject: Re: [PATCH] bios-tables-test: Fix "-tpmdev: invalid option"
Date: Mon, 15 Jun 2020 18:19:55 +0200 [thread overview]
Message-ID: <34566599-4194-f092-774e-4c60eca647a4@redhat.com> (raw)
In-Reply-To: <aa595991-7f3a-fd83-026b-1b35aaf9c49e@redhat.com>
On 15/06/2020 16.57, Philippe Mathieu-Daudé wrote:
> On 6/15/20 3:50 PM, Eric Auger wrote:
>> When configure is run with "--disable-tpm", the bios-tables-test
>> q35/tis test fails with "-tpmdev: invalid option".
>>
>> Skip the test if CONFIG_TPM is unset.
>>
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>> Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> tests/qtest/bios-tables-test.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
>> index 53f104a9c5..b482f76c03 100644
>> --- a/tests/qtest/bios-tables-test.c
>> +++ b/tests/qtest/bios-tables-test.c
>> @@ -882,6 +882,7 @@ uint64_t tpm_tis_base_addr;
>> static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
>> uint64_t base)
>> {
>> +#ifdef CONFIG_TPM
>> gchar *tmp_dir_name = g_strdup_printf("qemu-test_acpi_%s_tcg_%s.XXXXXX",
>> machine, tpm_if);
>> char *tmp_path = g_dir_make_tmp(tmp_dir_name, NULL);
>> @@ -924,6 +925,9 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
>> g_free(tmp_path);
>> g_free(tmp_dir_name);
>> free_test_data(&data);
>> +#else
>> + g_test_skip("TPM disabled");
>> +#endif
>> }
>>
>> static void test_acpi_q35_tcg_tpm_tis(void)
>>
>
> This is simpler than Thomas' version.
>
> Fixes: 5da7c35e25 ("bios-tables-test: Add Q35/TPM-TIS test")
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Your version is indeed nicer than mine, so let's use yours!
Reviewed-by: Thomas Huth <thuth@redhat.com>
prev parent reply other threads:[~2020-06-15 16:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 13:50 [PATCH] bios-tables-test: Fix "-tpmdev: invalid option" Eric Auger
2020-06-15 14:35 ` Stefan Berger
2020-06-15 14:57 ` Philippe Mathieu-Daudé
2020-06-15 16:19 ` Thomas Huth [this message]
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=34566599-4194-f092-774e-4c60eca647a4@redhat.com \
--to=thuth@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=eric.auger@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.ibm.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).