* [PATCH] tests/qtest/bios-tables: Only run the TPM test with CONFIG_TPM enabled
@ 2020-06-15 12:54 Thomas Huth
2020-06-15 14:56 ` Philippe Mathieu-Daudé
2020-06-15 15:03 ` Auger Eric
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2020-06-15 12:54 UTC (permalink / raw)
To: Igor Mammedov, Michael S. Tsirkin, Auger Eric, qemu-devel
Cc: Laurent Vivier, Philippe Mathieu-Daudé
"make check-qtest" currently fails if configure has been run with
"--disable-tpm" - the TPM-related tests can only work if the TPM is
enabled in the build. So let's use the CONFIG_TPM switch to disable
the test if TPM is not available.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/bios-tables-test.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 53f104a9c5..d170a617d8 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -877,6 +877,8 @@ static void test_acpi_piix4_tcg_numamem(void)
free_test_data(&data);
}
+#ifdef CONFIG_TPM
+
uint64_t tpm_tis_base_addr;
static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
@@ -931,6 +933,8 @@ static void test_acpi_q35_tcg_tpm_tis(void)
test_acpi_tcg_tpm("q35", "tis", 0xFED40000);
}
+#endif /* CONFIG_TPM */
+
static void test_acpi_tcg_dimm_pxm(const char *machine)
{
test_data data;
@@ -1094,7 +1098,9 @@ int main(int argc, char *argv[])
return ret;
}
+#ifdef CONFIG_TPM
qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_tpm_tis);
+#endif
qtest_add_func("acpi/piix4", test_acpi_piix4_tcg);
qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge);
qtest_add_func("acpi/q35", test_acpi_q35_tcg);
--
2.18.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tests/qtest/bios-tables: Only run the TPM test with CONFIG_TPM enabled
2020-06-15 12:54 [PATCH] tests/qtest/bios-tables: Only run the TPM test with CONFIG_TPM enabled Thomas Huth
@ 2020-06-15 14:56 ` Philippe Mathieu-Daudé
2020-06-15 15:03 ` Auger Eric
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-15 14:56 UTC (permalink / raw)
To: Thomas Huth, Igor Mammedov, Michael S. Tsirkin, Auger Eric, qemu-devel
Cc: Laurent Vivier
On 6/15/20 2:54 PM, Thomas Huth wrote:
> "make check-qtest" currently fails if configure has been run with
> "--disable-tpm" - the TPM-related tests can only work if the TPM is
> enabled in the build. So let's use the CONFIG_TPM switch to disable
> the test if TPM is not available.
>
$ git showfix 5da7c35e25a
Fixes: 5da7c35e25 ("bios-tables-test: Add Q35/TPM-TIS test")
Cc: eric.auger@redhat.com
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> tests/qtest/bios-tables-test.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index 53f104a9c5..d170a617d8 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -877,6 +877,8 @@ static void test_acpi_piix4_tcg_numamem(void)
> free_test_data(&data);
> }
>
> +#ifdef CONFIG_TPM
> +
> uint64_t tpm_tis_base_addr;
>
> static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
> @@ -931,6 +933,8 @@ static void test_acpi_q35_tcg_tpm_tis(void)
> test_acpi_tcg_tpm("q35", "tis", 0xFED40000);
> }
>
> +#endif /* CONFIG_TPM */
> +
> static void test_acpi_tcg_dimm_pxm(const char *machine)
> {
> test_data data;
> @@ -1094,7 +1098,9 @@ int main(int argc, char *argv[])
> return ret;
> }
>
> +#ifdef CONFIG_TPM
> qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_tpm_tis);
> +#endif
> qtest_add_func("acpi/piix4", test_acpi_piix4_tcg);
> qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge);
> qtest_add_func("acpi/q35", test_acpi_q35_tcg);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tests/qtest/bios-tables: Only run the TPM test with CONFIG_TPM enabled
2020-06-15 12:54 [PATCH] tests/qtest/bios-tables: Only run the TPM test with CONFIG_TPM enabled Thomas Huth
2020-06-15 14:56 ` Philippe Mathieu-Daudé
@ 2020-06-15 15:03 ` Auger Eric
1 sibling, 0 replies; 3+ messages in thread
From: Auger Eric @ 2020-06-15 15:03 UTC (permalink / raw)
To: Thomas Huth, Igor Mammedov, Michael S. Tsirkin, qemu-devel
Cc: Laurent Vivier, Philippe Mathieu-Daudé
Hi Thomas,
On 6/15/20 2:54 PM, Thomas Huth wrote:
> "make check-qtest" currently fails if configure has been run with
> "--disable-tpm" - the TPM-related tests can only work if the TPM is
> enabled in the build. So let's use the CONFIG_TPM switch to disable
> the test if TPM is not available.
Please forgive me, I did not notice your patch and sent another one :-(
Either fix is fine for me.
Thanks
Eric
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> tests/qtest/bios-tables-test.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index 53f104a9c5..d170a617d8 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -877,6 +877,8 @@ static void test_acpi_piix4_tcg_numamem(void)
> free_test_data(&data);
> }
>
> +#ifdef CONFIG_TPM
> +
> uint64_t tpm_tis_base_addr;
>
> static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
> @@ -931,6 +933,8 @@ static void test_acpi_q35_tcg_tpm_tis(void)
> test_acpi_tcg_tpm("q35", "tis", 0xFED40000);
> }
>
> +#endif /* CONFIG_TPM */
> +
> static void test_acpi_tcg_dimm_pxm(const char *machine)
> {
> test_data data;
> @@ -1094,7 +1098,9 @@ int main(int argc, char *argv[])
> return ret;
> }
>
> +#ifdef CONFIG_TPM
> qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_tpm_tis);
> +#endif
> qtest_add_func("acpi/piix4", test_acpi_piix4_tcg);
> qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge);
> qtest_add_func("acpi/q35", test_acpi_q35_tcg);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-15 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 12:54 [PATCH] tests/qtest/bios-tables: Only run the TPM test with CONFIG_TPM enabled Thomas Huth
2020-06-15 14:56 ` Philippe Mathieu-Daudé
2020-06-15 15:03 ` Auger Eric
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.