[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt t
|
From: |
Ani Sinha |
|
Subject: |
Re: tests/data/acpi/rebuild-expected-aml.sh creates files for arm virt that don't exist in git |
|
Date: |
Tue, 31 Oct 2023 19:31:18 +0530 |
> On 31-Oct-2023, at 7:21 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Tue, Oct 31, 2023 at 01:08:01PM +0000, Peter Maydell wrote:
>> I'm doing a patchset that requires rebuilding the bios-tables-test
>> expected-data files for the arm virt board. The instructions in
>> bios-tables-test.c say that you should run rebuild-expected-aml.sh
>> to update the data files. But running that script generates a lot
>> of new data files that don't exist in git at all and are unrelated
>> to the change I'm making:
>>
>> tests/data/acpi/virt/APIC.memhp
>> tests/data/acpi/virt/APIC.numamem
>> tests/data/acpi/virt/APIC.pxb
>> tests/data/acpi/virt/DBG2.acpihmatvirt
>> tests/data/acpi/virt/DBG2.memhp
>> tests/data/acpi/virt/DBG2.numamem
>> tests/data/acpi/virt/DBG2.pxb
>> tests/data/acpi/virt/DBG2.topology
>> tests/data/acpi/virt/DSDT.numamem
>> tests/data/acpi/virt/FACP.acpihmatvirt
>> tests/data/acpi/virt/FACP.memhp
>> tests/data/acpi/virt/FACP.numamem
>> tests/data/acpi/virt/FACP.pxb
>> tests/data/acpi/virt/FACP.topology
>> tests/data/acpi/virt/GTDT.acpihmatvirt
>> tests/data/acpi/virt/GTDT.memhp
>> tests/data/acpi/virt/GTDT.numamem
>> tests/data/acpi/virt/GTDT.pxb
>> tests/data/acpi/virt/GTDT.topology
>> tests/data/acpi/virt/IORT.acpihmatvirt
>> tests/data/acpi/virt/IORT.memhp
>> tests/data/acpi/virt/IORT.numamem
>> tests/data/acpi/virt/IORT.pxb
>> tests/data/acpi/virt/IORT.topology
>> tests/data/acpi/virt/MCFG.acpihmatvirt
>> tests/data/acpi/virt/MCFG.memhp
>> tests/data/acpi/virt/MCFG.numamem
>> tests/data/acpi/virt/MCFG.pxb
>> tests/data/acpi/virt/MCFG.topology
>> tests/data/acpi/virt/PPTT.memhp
>> tests/data/acpi/virt/PPTT.numamem
>> tests/data/acpi/virt/PPTT.pxb
>> tests/data/acpi/virt/SPCR.acpihmatvirt
>> tests/data/acpi/virt/SPCR.memhp
>> tests/data/acpi/virt/SPCR.numamem
>> tests/data/acpi/virt/SPCR.pxb
>> tests/data/acpi/virt/SPCR.topology
>>
>> Does the script need fixing to not generate these files, or should
>> they exist in the git repo?
>
> The script is not smart enough to notice that files are identical - e.g.
> tests/data/acpi/virt/PPTT are all the same so we just have one of these
> - and so all the copies don't need to be there.
See this in bios-tables-test.c
if (g_file_test(aml_file, G_FILE_TEST_EXISTS)) {
exp_sdt.aml_file = aml_file;
} else if (*ext != '\0') {
/* try fallback to generic (extension less) expected file */
ext = "";
g_free(aml_file);
goto try_again;
}
Basically we need to make the dumping part of the code smarter. I will try
something if I am too bored :-)