On 4/4/25 5:00 AM, Gustavo Romero wrote:
> Hi Phil,
>
> On 4/3/25 17:40, Philippe Mathieu-Daudé wrote:
>> Add the use case reported as issue #2886 [*]. The test
>> passes while it shouldn't. We are going to fix that in
>> the following commits.
>
> I think this organization is not ideal. I like better your first
> version, i.e., adding the correct blobs that make the new test pass,
> as you did in:
>
> [PATCH-for-10.0 1/5] qtest/bios-tables-test: Add test for -M virt, its=o
> https://mail.gnu.org/archive/html/qemu-devel/2025-03/msg07081.html
>
> The way it is here if you checkout this commit and run the test
> (make check) the acpi test will _not pass_ because of the other changes
> in the APIC, FADT, and IORT tables caused by the other VM options
> (virtualization, gic-version, and iommu), as I pointed out in [0], even
> tho the bug is present and its=off does not take effect.

I do agree with Gustavo. This looks introduced in a non std way.

Found
https://lore.kernel.org/all/20241107123446.902801-6-jonathan.came...@huawei.com/
as an example:
step1) create dummy entries for the variant table data + mark those as
ignored in tests/qtest/bios-tables-test-allowed-diff.h
<https://lore.kernel.org/all/20241107123446.902801-4-jonathan.came...@huawei.com/#Z31tests:qtest:bios-tables-test-allowed-diff.h>
step2) create the new test
step3) Generate & store the new tables and remove lines in
bios-tables-test-allowed-diff.h
<https://lore.kernel.org/all/20241107123446.902801-6-jonathan.came...@huawei.com/#Z31tests:qtest:bios-tables-test-allowed-diff.h>

Thanks

Eric
>
>
> Cheers,
> Gustavo
>
> [0] https://mail.gnu.org/archive/html/qemu-devel/2025-04/msg00438.html
>
>
>> [*] https://gitlab.com/qemu-project/qemu/-/issues/2886
>>
>> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
>> ---
>>   tests/qtest/bios-tables-test.c | 21 +++++++++++++++++++++
>>   1 file changed, 21 insertions(+)
>>
>> diff --git a/tests/qtest/bios-tables-test.c
>> b/tests/qtest/bios-tables-test.c
>> index 0a333ec4353..baaf199e01c 100644
>> --- a/tests/qtest/bios-tables-test.c
>> +++ b/tests/qtest/bios-tables-test.c
>> @@ -2146,6 +2146,25 @@ static void
>> test_acpi_aarch64_virt_tcg_topology(void)
>>       free_test_data(&data);
>>   }
>>   +static void test_acpi_aarch64_virt_tcg_its_off(void)
>> +{
>> +    test_data data = {
>> +        .machine = "virt",
>> +        .arch = "aarch64",
>> +        .tcg_only = true,
>> +        .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
>> +        .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
>> +        .cd =
>> "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
>> +        .ram_start = 0x40000000ULL,
>> +        .scan_len = 128ULL * 1024 * 1024,
>> +    };
>> +
>> +    test_acpi_one("-cpu cortex-a57 "
>> +                  "-M virtualization=on,secure=off "
>> +                  "-M gic-version=max,its=off,iommu=smmuv3", &data);
>> +    free_test_data(&data);
>> +}
>> +
>>   static void test_acpi_q35_viot(void)
>>   {
>>       test_data data = {
>> @@ -2577,6 +2596,8 @@ int main(int argc, char *argv[])
>>                              test_acpi_aarch64_virt_tcg_acpi_hmat);
>>               qtest_add_func("acpi/virt/topology",
>>                              test_acpi_aarch64_virt_tcg_topology);
>> +            qtest_add_func("acpi/virt/its_off",
>> +                           test_acpi_aarch64_virt_tcg_its_off);
>>               qtest_add_func("acpi/virt/numamem",
>>                              test_acpi_aarch64_virt_tcg_numamem);
>>               qtest_add_func("acpi/virt/memhp",
>> test_acpi_aarch64_virt_tcg_memhp);
>
>


Reply via email to