diff mbox series

[RFC,v12,40/65] tests/qtest: skip bios-tables-test test_acpi_oem_fields_virt for KVM

Message ID 20210326193701.5981-41-cfontana@suse.de (mailing list archive)
State New, archived
Headers show
Series arm cleanup experiment for kvm-only build | expand

Commit Message

Claudio Fontana March 26, 2021, 7:36 p.m. UTC
test is TCG-only.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/qtest/bios-tables-test.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Richard Henderson March 28, 2021, 5:21 p.m. UTC | #1
On 3/26/21 1:36 PM, Claudio Fontana wrote:
> test is TCG-only.
> 
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   tests/qtest/bios-tables-test.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index e020c83d2a..bd7b85909c 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -1488,6 +1488,13 @@ static void test_acpi_oem_fields_virt(void)
>       };
>       char *args;
>   
> +#ifndef CONFIG_TCG
> +    if (data.tcg_only) {
> +        g_test_skip("TCG disabled, skipping ACPI tcg_only test");
> +        return;
> +    }
> +#endif /* CONFIG_TCG */

Why is this an ifdef and not tcg_enabled()?
We're using kvm_enabled() elsewhere...


r~
Claudio Fontana March 29, 2021, 7:02 a.m. UTC | #2
On 3/28/21 7:21 PM, Richard Henderson wrote:
> On 3/26/21 1:36 PM, Claudio Fontana wrote:
>> test is TCG-only.
>>
>> Signed-off-by: Claudio Fontana <cfontana@suse.de>
>> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>   tests/qtest/bios-tables-test.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
>> index e020c83d2a..bd7b85909c 100644
>> --- a/tests/qtest/bios-tables-test.c
>> +++ b/tests/qtest/bios-tables-test.c
>> @@ -1488,6 +1488,13 @@ static void test_acpi_oem_fields_virt(void)
>>       };
>>       char *args;
>>   
>> +#ifndef CONFIG_TCG
>> +    if (data.tcg_only) {
>> +        g_test_skip("TCG disabled, skipping ACPI tcg_only test");
>> +        return;
>> +    }
>> +#endif /* CONFIG_TCG */
> 
> Why is this an ifdef and not tcg_enabled()?

We want to launch this whenever TCG is compiled in.

> We're using kvm_enabled() elsewhere...

where?


> 
> 
> r~
>
Richard Henderson March 29, 2021, 2:03 p.m. UTC | #3
On 3/29/21 1:02 AM, Claudio Fontana wrote:
> On 3/28/21 7:21 PM, Richard Henderson wrote:
>> On 3/26/21 1:36 PM, Claudio Fontana wrote:
>>> test is TCG-only.
>>>
>>> Signed-off-by: Claudio Fontana <cfontana@suse.de>
>>> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>>    tests/qtest/bios-tables-test.c | 7 +++++++
>>>    1 file changed, 7 insertions(+)
>>>
>>> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
>>> index e020c83d2a..bd7b85909c 100644
>>> --- a/tests/qtest/bios-tables-test.c
>>> +++ b/tests/qtest/bios-tables-test.c
>>> @@ -1488,6 +1488,13 @@ static void test_acpi_oem_fields_virt(void)
>>>        };
>>>        char *args;
>>>    
>>> +#ifndef CONFIG_TCG
>>> +    if (data.tcg_only) {
>>> +        g_test_skip("TCG disabled, skipping ACPI tcg_only test");
>>> +        return;
>>> +    }
>>> +#endif /* CONFIG_TCG */
>>
>> Why is this an ifdef and not tcg_enabled()?
> 
> We want to launch this whenever TCG is compiled in.
> 
>> We're using kvm_enabled() elsewhere...
> 
> where?

Whoops, there's a local re-definition of the function at the top of 
tests/qtest/arm-cpu-features.c.  Hmm.

r~
Claudio Fontana April 8, 2021, 1:24 p.m. UTC | #4
On 3/29/21 4:03 PM, Richard Henderson wrote:
> On 3/29/21 1:02 AM, Claudio Fontana wrote:
>> On 3/28/21 7:21 PM, Richard Henderson wrote:
>>> On 3/26/21 1:36 PM, Claudio Fontana wrote:
>>>> test is TCG-only.
>>>>
>>>> Signed-off-by: Claudio Fontana <cfontana@suse.de>
>>>> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>> ---
>>>>    tests/qtest/bios-tables-test.c | 7 +++++++
>>>>    1 file changed, 7 insertions(+)
>>>>
>>>> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
>>>> index e020c83d2a..bd7b85909c 100644
>>>> --- a/tests/qtest/bios-tables-test.c
>>>> +++ b/tests/qtest/bios-tables-test.c
>>>> @@ -1488,6 +1488,13 @@ static void test_acpi_oem_fields_virt(void)
>>>>        };
>>>>        char *args;
>>>>    
>>>> +#ifndef CONFIG_TCG
>>>> +    if (data.tcg_only) {
>>>> +        g_test_skip("TCG disabled, skipping ACPI tcg_only test");
>>>> +        return;
>>>> +    }
>>>> +#endif /* CONFIG_TCG */
>>>
>>> Why is this an ifdef and not tcg_enabled()?
>>
>> We want to launch this whenever TCG is compiled in.
>>
>>> We're using kvm_enabled() elsewhere...
>>
>> where?
> 
> Whoops, there's a local re-definition of the function at the top of 
> tests/qtest/arm-cpu-features.c.  Hmm.
> 
> r~
> 

Indeed, an unfortunate name clash.
diff mbox series

Patch

diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index e020c83d2a..bd7b85909c 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -1488,6 +1488,13 @@  static void test_acpi_oem_fields_virt(void)
     };
     char *args;
 
+#ifndef CONFIG_TCG
+    if (data.tcg_only) {
+        g_test_skip("TCG disabled, skipping ACPI tcg_only test");
+        return;
+    }
+#endif /* CONFIG_TCG */
+
     args = test_acpi_create_args(&data,
                                  "-cpu cortex-a57 "OEM_TEST_ARGS, true);
     data.qts = qtest_init(args);